1 # $NetBSD: license.mk,v 1.10 2008/01/09 14:38:05 gdt Exp $
3 # Note: This file is in draft state and not yet included in default
6 # This file handles everything about the LICENSE variable. It is
7 # included automatically by bsd.pkg.mk.
9 # XXX: Some of this content arguably belongs in the pkgsrc guide
12 # === User-settable variables ===
15 # If a package declares a license and that license is not a
16 # member of the list defined by this variable, pkgsrc will
17 # refuse to build the package.
19 # XXX: pkg_install should also check LICENSE and decline to
20 # install if it is not in ACCEPTABLE_LICENSES.
22 # XXX: Perhaps there should be some mechanism to prevent running
23 # programs that are part of packages that declare LICENSEs that
24 # are not in ACCEPTABLE_LICENSES or some per-user variable.
25 # This is surely controversial and requires discussion.
27 # To include the default licenses, you can use the += operator
28 # in mk.conf. To override it, use the plain = operator.
30 # Default value: ${DEFAULT_ACCEPTABLE_LICENSES}
32 # === Package-settable variables ===
35 # The license of the package.
37 # Sometimes licensing is other than a single text file. See
38 # doc/TODO for discussion of how to handle packages with dual
39 # licensing (a choice) or where multiple licenses apply
42 # Every package should specify its license. (Prior to July 2007,
43 # Open Source and Free software did not have license tags.)
45 # As of 2008-01, we are adding #LICENSE=; until this file is
46 # included from bsd.pkg.mk such tags will cause failure because
47 # DEFAULT_ACCEPTABLE_LICENSES is not yet implemented.
49 # Licenses are collected in the licenses/ subdirectory of
50 # pkgsrc. For open source license, we generally use the same
51 # names as either the Open Source Initiative or the Free
52 # Software Foundation, choosing a name to reduce confusion.
53 # Open source and free licenses do not have a -license suffix,
54 # and non-free licenses do.
56 # http://opensource.org/licenses/category
57 # http://www.fsf.org/licensing/licenses/index_html
59 # === Predefined variables ===
61 # DEFAULT_ACCEPTABLE_LICENSES
62 # The list of licenses that will be the default value of
63 # ACCEPTABLE_LICENSES. Adapting the longstanding policy of Open
64 # Source or Free licenses not requiring tags, it should contain
65 # all licenses that are Open Source or Free, so as to provide
66 # the most expansive default that almost all people find
67 # acceptable. (Many people will want to add more licenses to
68 # ACCEPTABLE_LICENSES; the point is to have a default that very
69 # few people want to shrink.)
73 # ../doc/TODO, section "Licenses of packages"
78 # This list is not complete. Free and Open Source licenses should be
79 # added to the list as they are added to pkgsrc.
81 # The convention is that Free or Open Source licenses do not have a
82 # -license suffix, and nonfree licenses end in -license.
84 # XXX open-font-license should perhaps be changed to open-font
86 # XXX Surely we will encounter licenses that clearly are Free, but
87 # which have not been formally approved. These licenses, if added,
88 # should be somehow marked.
90 DEFAULT_ACCEPTABLE_LICENSES= \
92 gnu-gpl-v2 gnu-lgpl-v2 \
93 gnu-gpl-v3 gnu-lgpl-v3 \
94 original-bsd modified-bsd \
100 .if !defined(LICENSE)
102 . if defined(AFTER_2007Q3)
104 PKG_FAIL_REASON+= "[license.mk] Every package must define a LICENSE."
106 WARNINGS+= "[license.mk] Every package should define a LICENSE."
111 # Note: some bulk builders rely on the fact that they can set
112 # _ACCEPTABLE to bypass license checks. Inform them when you intend to
113 # remove this variable.
114 . if defined(ACCEPTABLE_LICENSES) && !empty(ACCEPTABLE_LICENSES:M${LICENSE})
118 . if !defined(_ACCEPTABLE)
119 PKG_FAIL_REASON+= "${PKGNAME} has an unacceptable license: ${LICENSE}." \
120 " To view the license, enter \"${MAKE} show-license\"." \
121 " To indicate acceptance, add this line to your mk.conf:" \
122 " ACCEPTABLE_LICENSES+=${LICENSE}"