| @@ -1,131 +1,128 @@ | | | @@ -1,131 +1,128 @@ |
1 | # $NetBSD: license.mk,v 1.15 2009/04/25 13:15:43 gdt Exp $ | | 1 | # $NetBSD: license.mk,v 1.16 2009/04/29 23:50:07 gdt Exp $ |
2 | # | | | |
3 | # Note: This file is in draft state and not yet included in default | | | |
4 | # pkgsrc operations. | | | |
5 | # | | 2 | # |
6 | # This file handles everything about the LICENSE variable. It is | | 3 | # This file handles everything about the LICENSE variable. It is |
7 | # included automatically by bsd.pkg.mk. | | 4 | # included automatically by bsd.pkg.mk. |
8 | # | | 5 | # |
9 | # XXX: Some of this content arguably belongs in the pkgsrc guide | | 6 | # XXX: Some of this content arguably belongs in the pkgsrc guide |
10 | # instead. | | 7 | # instead. |
11 | # | | 8 | # |
12 | # === User-settable variables === | | 9 | # === User-settable variables === |
13 | # | | 10 | # |
14 | # ACCEPTABLE_LICENSES | | 11 | # ACCEPTABLE_LICENSES |
15 | # If a package declares a license and that license is not a | | 12 | # If a package declares a license and that license is not a |
16 | # member of the list defined by this variable, pkgsrc will | | 13 | # member of the list defined by this variable, pkgsrc will |
17 | # refuse to build the package. | | 14 | # refuse to build the package. |
18 | # | | 15 | # |
19 | # XXX: pkg_install should also check LICENSE and decline to | | 16 | # XXX: pkg_install should also check LICENSE and decline to |
20 | # install if it is not in ACCEPTABLE_LICENSES. | | 17 | # install if it is not in ACCEPTABLE_LICENSES. |
21 | # | | 18 | # |
22 | # XXX: Perhaps there should be some mechanism to prevent running | | 19 | # XXX: Perhaps there should be some mechanism to prevent running |
23 | # programs that are part of packages that declare LICENSEs that | | 20 | # programs that are part of packages that declare LICENSEs that |
24 | # are not in ACCEPTABLE_LICENSES or some per-user variable. | | 21 | # are not in ACCEPTABLE_LICENSES or some per-user variable. |
25 | # This is surely controversial and requires discussion. | | 22 | # This is surely controversial and requires discussion. |
26 | # | | 23 | # |
27 | # To include the default licenses, you can use the += operator | | 24 | # To include the default licenses, you can use the += operator |
28 | # in mk.conf. To override it, use the plain = operator. | | 25 | # in mk.conf. To override it, use the plain = operator. |
29 | # | | 26 | # |
30 | # Default value: ${DEFAULT_ACCEPTABLE_LICENSES} | | 27 | # Default value: ${DEFAULT_ACCEPTABLE_LICENSES} |
31 | # | | 28 | # |
32 | # === Package-settable variables === | | 29 | # === Package-settable variables === |
33 | # | | 30 | # |
34 | # LICENSE | | 31 | # LICENSE |
35 | # The license of the package. | | 32 | # The license of the package. |
36 | # | | 33 | # |
37 | # Sometimes licensing is other than a single text file. See | | 34 | # Sometimes licensing is other than a single text file. See |
38 | # doc/TODO for discussion of how to handle packages with dual | | 35 | # doc/TODO for discussion of how to handle packages with dual |
39 | # licensing (a choice) or where multiple licenses apply | | 36 | # licensing (a choice) or where multiple licenses apply |
40 | # simultaneously. | | 37 | # simultaneously. |
41 | # | | 38 | # |
42 | # Every package should specify its license. (Prior to early 2009, | | 39 | # Every package should specify its license. (Prior to early 2009, |
43 | # Open Source and Free software did not have license tags.) | | 40 | # Open Source and Free software did not have license tags.) |
44 | # | | 41 | # |
45 | # Licenses are collected in the licenses/ subdirectory of | | 42 | # Licenses are collected in the licenses/ subdirectory of |
46 | # pkgsrc. For open source license, we generally use the same | | 43 | # pkgsrc. For open source license, we generally use the same |
47 | # names as either the Open Source Initiative or the Free | | 44 | # names as either the Open Source Initiative or the Free |
48 | # Software Foundation, choosing a name to reduce confusion. | | 45 | # Software Foundation, choosing a name to reduce confusion. |
49 | # Open source and free licenses do not have a -license suffix, | | 46 | # Open source and free licenses do not have a -license suffix, |
50 | # and non-free licenses do. | | 47 | # and non-free licenses do. |
51 | # | | 48 | # |
52 | # http://opensource.org/licenses/category | | 49 | # http://opensource.org/licenses/category |
53 | # http://www.fsf.org/licensing/licenses/index_html | | 50 | # http://www.fsf.org/licensing/licenses/index_html |
54 | # | | 51 | # |
55 | # === Predefined variables === | | 52 | # === Predefined variables === |
56 | # | | 53 | # |
57 | # DEFAULT_ACCEPTABLE_LICENSES | | 54 | # DEFAULT_ACCEPTABLE_LICENSES |
58 | # The list of licenses that will be the default value of | | 55 | # The list of licenses that will be the default value of |
59 | # ACCEPTABLE_LICENSES. Adapting the longstanding policy of Open | | 56 | # ACCEPTABLE_LICENSES. Adapting the longstanding policy of Open |
60 | # Source or Free licenses not requiring tags, it should contain | | 57 | # Source or Free licenses not requiring tags, it should contain |
61 | # all licenses that are Open Source or Free, so as to provide | | 58 | # all licenses that are Open Source or Free, so as to provide |
62 | # the most expansive default that almost all people find | | 59 | # the most expansive default that almost all people find |
63 | # acceptable. (Many people will want to add more licenses to | | 60 | # acceptable. (Many people will want to add more licenses to |
64 | # ACCEPTABLE_LICENSES; the point is to have a default that very | | 61 | # ACCEPTABLE_LICENSES; the point is to have a default that very |
65 | # few people want to shrink.) | | 62 | # few people want to shrink.) |
66 | # | | 63 | # |
67 | # Licenses not formally approved as Free or Open Source may be | | 64 | # Licenses not formally approved as Free or Open Source may be |
68 | # added if they have terms that would obviously be approved if | | 65 | # added if they have terms that would obviously be approved if |
69 | # the effort were made. Such license names will have a comment | | 66 | # the effort were made. Such license names will have a comment |
70 | # near them in the assignment to DEFAULT_ACCEPTABLE_LICENSES. | | 67 | # near them in the assignment to DEFAULT_ACCEPTABLE_LICENSES. |
71 | # | | 68 | # |
72 | # === See also === | | 69 | # === See also === |
73 | # | | 70 | # |
74 | # ../doc/TODO, section "Licenses of packages" | | 71 | # ../doc/TODO, section "Licenses of packages" |
75 | # | | 72 | # |
76 | # Keywords: licence license | | 73 | # Keywords: licence license |
77 | # | | 74 | # |
78 | | | 75 | |
79 | # This list is not complete. Free and Open Source licenses should be | | 76 | # This list is not complete. Free and Open Source licenses should be |
80 | # added to the list as they are added to pkgsrc. | | 77 | # added to the list as they are added to pkgsrc. |
81 | | | 78 | |
82 | # The convention is that Free or Open Source licenses do not have a | | 79 | # The convention is that Free or Open Source licenses do not have a |
83 | # -license suffix, and nonfree licenses end in -license. | | 80 | # -license suffix, and nonfree licenses end in -license. |
84 | | | 81 | |
85 | # XXX open-font-license should perhaps be changed to open-font | | 82 | # XXX open-font-license should perhaps be changed to open-font |
86 | | | 83 | |
87 | DEFAULT_ACCEPTABLE_LICENSES= \ | | 84 | DEFAULT_ACCEPTABLE_LICENSES= \ |
88 | public-domain \ | | 85 | public-domain \ |
89 | gnu-gpl-v2 gnu-lgpl-v2 gnu-lgpl-v2.1 \ | | 86 | gnu-gpl-v2 gnu-lgpl-v2 gnu-lgpl-v2.1 \ |
90 | gnu-gpl-v3 gnu-lgpl-v3 \ | | 87 | gnu-gpl-v3 gnu-lgpl-v3 \ |
91 | original-bsd modified-bsd \ | | 88 | original-bsd modified-bsd \ |
92 | x11 \ | | 89 | x11 \ |
93 | apache-2.0 \ | | 90 | apache-1.1 apache-2.0 \ |
94 | artistic artistic-2.0 \ | | 91 | artistic artistic-2.0 \ |
95 | cddl-1.0 \ | | 92 | cddl-1.0 \ |
96 | open-font-license | | 93 | open-font-license |
97 | | | 94 | |
98 | ##### Variant spellings | | 95 | ##### Variant spellings |
99 | | | 96 | |
100 | .if defined(ACCEPTABLE_LICENCES) && !defined(ACCEPTABLE_LICENSES) | | 97 | .if defined(ACCEPTABLE_LICENCES) && !defined(ACCEPTABLE_LICENSES) |
101 | ACCEPTABLE_LICENSES= ${ACCEPTABLE_LICENCES} | | 98 | ACCEPTABLE_LICENSES= ${ACCEPTABLE_LICENCES} |
102 | .endif | | 99 | .endif |
103 | | | 100 | |
104 | .if !defined(LICENSE) | | 101 | .if !defined(LICENSE) |
105 | . if defined(PKG_DEVELOPER) | | 102 | . if defined(PKG_DEVELOPER) |
106 | WARNINGS+= "[license.mk] Every package should define a LICENSE." | | 103 | WARNINGS+= "[license.mk] Every package should define a LICENSE." |
107 | . endif | | 104 | . endif |
108 | | | 105 | |
109 | .else | | 106 | .else |
110 | | | 107 | |
111 | # Note: some bulk builders rely on the fact that they can set | | 108 | # Note: some bulk builders rely on the fact that they can set |
112 | # _ACCEPTABLE to bypass license checks. Inform them when you intend to | | 109 | # _ACCEPTABLE to bypass license checks. Inform them when you intend to |
113 | # remove this variable. | | 110 | # remove this variable. |
114 | . if defined(ACCEPTABLE_LICENSES) && !empty(ACCEPTABLE_LICENSES:M${LICENSE}) | | 111 | . if defined(ACCEPTABLE_LICENSES) && !empty(ACCEPTABLE_LICENSES:M${LICENSE}) |
115 | _ACCEPTABLE= yes | | 112 | _ACCEPTABLE= yes |
116 | . endif | | 113 | . endif |
117 | | | 114 | |
118 | . if !defined(_ACCEPTABLE) | | 115 | . if !defined(_ACCEPTABLE) |
119 | . if defined(MAKECONF) | | 116 | . if defined(MAKECONF) |
120 | _MAKECONF?= ${MAKECONF} | | 117 | _MAKECONF?= ${MAKECONF} |
121 | . elif ${OPSYS} == "NetBSD" && ${MAKE} != "${PREFIX}/bin/bmake" | | 118 | . elif ${OPSYS} == "NetBSD" && ${MAKE} != "${PREFIX}/bin/bmake" |
122 | _MAKECONF?= /etc/mk.conf | | 119 | _MAKECONF?= /etc/mk.conf |
123 | . else | | 120 | . else |
124 | _MAKECONF?= ${PREFIX}/etc/mk.conf | | 121 | _MAKECONF?= ${PREFIX}/etc/mk.conf |
125 | . endif | | 122 | . endif |
126 | PKG_FAIL_REASON+= "${PKGNAME} has an unacceptable license: ${LICENSE}." \ | | 123 | PKG_FAIL_REASON+= "${PKGNAME} has an unacceptable license: ${LICENSE}." \ |
127 | " To view the license, enter \"${MAKE} show-license\"." \ | | 124 | " To view the license, enter \"${MAKE} show-license\"." \ |
128 | " To indicate acceptance, add this line to ${_MAKECONF}:" \ | | 125 | " To indicate acceptance, add this line to ${_MAKECONF}:" \ |
129 | " ACCEPTABLE_LICENSES+=${LICENSE}" | | 126 | " ACCEPTABLE_LICENSES+=${LICENSE}" |
130 | . endif | | 127 | . endif |
131 | .endif | | 128 | .endif |