Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

If an R package's licence X is, do all the content in that package have to be licenced under X? [closed]

Hope the question above is clear.

Now my case: For my package, i'm using several libraries (jars). Each library has been licenced under one of these: Apache v2, BSD or LPGL.

Edit [some clarification] I have my own java classes packed in a jar. These import classes (dynamic linking) from the libraries mentioned here [End Edit]

Question 1: Can i pack all these libraries in a single package?
Question 1a: If yes, under what licence Apache, BSD, LGPL or any other?
Question 1b: If yes, would it be enough to put all the library names in a NOTICE and to write under what licence is a library licenced together?

Question 2: Or do i have to create for each type of licence a separate package and put libraries in it according to their licence type?

like image 276
ilhami visne Avatar asked Nov 30 '10 14:11

ilhami visne


People also ask

What license should I use for my R package?

We recommend one of two Creative Commons licenses: If you want to make the data as freely available as possible, you use the CC0 license with use_cc0_license() . This is a permissive license that's equivalent to the MIT license (but applies to data, not code).

What are the two compulsory files in package directory structure in R?

Every package must have a DESCRIPTION file and an R directory containing code. These are created by us. A NAMESPACE file is needed as well, and a man directory containing documentation, but both can be autogenerated.

Can I use R for commercial purposes?

It is the opinion of the R Core Team that one can use R for commercial purposes (e.g., in business or in consulting). The GPL , like all Open Source licenses, permits all and any use of the package. It only restricts distribution of R or of other programs containing code from R.


2 Answers

You can't use a single license for your package. Instead, in your DESCRIPTION put "License: file LICENSE" and describe the individual licenses in that file.

like image 193
hadley Avatar answered Nov 14 '22 23:11

hadley


R itself is licensed under the GPL. It contains other functionality released under different licences, such a PCRE which is licensed under BSD. The R sources contain separate licence files for the different components as well as copyright statements/acknowledgements.

Edit [some clarification] So in and of itself, if you are redistributing libraries as part of your package you need to preserve their licence details and respect the licence under which they were distributed. Your package can have whatever licence you want as long as it is not in conflict with the licences of the libraries you are redistributing (unlikely given the ones you cite). You make clear what licence your package is under in the DESCRIPTION file (as Hadley mentions in his answer), but you should make sure a LICENCE, or COPYING file is included in the top level of the package source so it is clear what code is under what licence etc. [End edit]

The problem you are going to have is that unless we have some lawyers hereabouts who are coders, any advice given should be taken with a big pinch of salt. If you are worried about this, you should seek expert advice.

like image 43
Gavin Simpson Avatar answered Nov 15 '22 00:11

Gavin Simpson