2009-06-03 15:40:03 +02:00
|
|
|
# $NetBSD: license.mk,v 1.23 2009/06/03 13:40:03 ahoka Exp $
|
2007-07-03 07:08:12 +02:00
|
|
|
#
|
|
|
|
# This file handles everything about the LICENSE variable. It is
|
|
|
|
# included automatically by bsd.pkg.mk.
|
|
|
|
#
|
2009-04-30 14:27:16 +02:00
|
|
|
# XXX There should be one place to set the default list and for users
|
|
|
|
# to set the ACCEPTABLE_LICENSES list, used by both source builds and
|
|
|
|
# binary installs#
|
|
|
|
#
|
2007-07-05 20:16:47 +02:00
|
|
|
# XXX: Some of this content arguably belongs in the pkgsrc guide
|
|
|
|
# instead.
|
|
|
|
#
|
2007-07-03 07:08:12 +02:00
|
|
|
# === User-settable variables ===
|
|
|
|
#
|
|
|
|
# ACCEPTABLE_LICENSES
|
2007-07-05 20:16:47 +02:00
|
|
|
#
|
2009-04-30 14:27:16 +02:00
|
|
|
# If a package declares a license and that license is not a
|
|
|
|
# member of the list defined by this variable, pkgsrc will not
|
|
|
|
# build the package and instead print an error message.
|
|
|
|
# (pkg_install has code to behave the same way, but it is not
|
|
|
|
# yet turned on.)
|
2007-07-03 07:08:12 +02:00
|
|
|
#
|
2007-07-05 20:16:47 +02:00
|
|
|
# XXX: Perhaps there should be some mechanism to prevent running
|
|
|
|
# programs that are part of packages that declare LICENSEs that
|
|
|
|
# are not in ACCEPTABLE_LICENSES or some per-user variable.
|
|
|
|
# This is surely controversial and requires discussion.
|
2007-07-03 07:08:12 +02:00
|
|
|
#
|
2007-07-06 03:22:40 +02:00
|
|
|
# To include the default licenses, you can use the += operator
|
|
|
|
# in mk.conf. To override it, use the plain = operator.
|
|
|
|
#
|
|
|
|
# Default value: ${DEFAULT_ACCEPTABLE_LICENSES}
|
|
|
|
#
|
2007-07-03 07:08:12 +02:00
|
|
|
# === Package-settable variables ===
|
|
|
|
#
|
|
|
|
# LICENSE
|
2009-04-30 14:27:16 +02:00
|
|
|
#
|
2007-07-03 07:08:12 +02:00
|
|
|
# The license of the package.
|
|
|
|
#
|
2008-01-09 15:38:05 +01:00
|
|
|
# Sometimes licensing is other than a single text file. See
|
|
|
|
# doc/TODO for discussion of how to handle packages with dual
|
|
|
|
# licensing (a choice) or where multiple licenses apply
|
|
|
|
# simultaneously.
|
|
|
|
#
|
2009-04-23 14:10:15 +02:00
|
|
|
# Every package should specify its license. (Prior to early 2009,
|
2007-07-05 20:16:47 +02:00
|
|
|
# Open Source and Free software did not have license tags.)
|
2007-07-03 07:08:12 +02:00
|
|
|
#
|
2007-07-20 15:05:28 +02:00
|
|
|
# Licenses are collected in the licenses/ subdirectory of
|
|
|
|
# pkgsrc. For open source license, we generally use the same
|
|
|
|
# names as either the Open Source Initiative or the Free
|
|
|
|
# Software Foundation, choosing a name to reduce confusion.
|
|
|
|
# Open source and free licenses do not have a -license suffix,
|
|
|
|
# and non-free licenses do.
|
2007-07-03 07:08:12 +02:00
|
|
|
#
|
2007-07-20 15:05:28 +02:00
|
|
|
# http://opensource.org/licenses/category
|
|
|
|
# http://www.fsf.org/licensing/licenses/index_html
|
2007-07-03 07:08:12 +02:00
|
|
|
#
|
|
|
|
# === Predefined variables ===
|
|
|
|
#
|
|
|
|
# DEFAULT_ACCEPTABLE_LICENSES
|
2007-08-22 18:29:15 +02:00
|
|
|
# The list of licenses that will be the default value of
|
|
|
|
# ACCEPTABLE_LICENSES. Adapting the longstanding policy of Open
|
|
|
|
# Source or Free licenses not requiring tags, it should contain
|
|
|
|
# all licenses that are Open Source or Free, so as to provide
|
|
|
|
# the most expansive default that almost all people find
|
|
|
|
# acceptable. (Many people will want to add more licenses to
|
|
|
|
# ACCEPTABLE_LICENSES; the point is to have a default that very
|
|
|
|
# few people want to shrink.)
|
2007-07-05 20:16:47 +02:00
|
|
|
#
|
2009-04-23 14:10:15 +02:00
|
|
|
# Licenses not formally approved as Free or Open Source may be
|
|
|
|
# added if they have terms that would obviously be approved if
|
|
|
|
# the effort were made. Such license names will have a comment
|
|
|
|
# near them in the assignment to DEFAULT_ACCEPTABLE_LICENSES.
|
|
|
|
#
|
2009-04-30 14:27:16 +02:00
|
|
|
# The pkg_install sources also have a
|
|
|
|
# DEFAULT_ACCEPTABLE_LICENSES list, and that should be updated
|
|
|
|
# to match the list here. See
|
|
|
|
# pkgsrc/pkgtools/pkg_install/files/lib/license.c
|
|
|
|
#
|
2007-07-03 07:08:12 +02:00
|
|
|
# === See also ===
|
|
|
|
#
|
|
|
|
# ../doc/TODO, section "Licenses of packages"
|
|
|
|
#
|
2009-04-08 16:47:26 +02:00
|
|
|
# Keywords: licence license
|
2009-03-25 14:50:44 +01:00
|
|
|
#
|
2007-07-03 07:08:12 +02:00
|
|
|
|
2007-07-20 15:05:28 +02:00
|
|
|
# This list is not complete. Free and Open Source licenses should be
|
|
|
|
# added to the list as they are added to pkgsrc.
|
|
|
|
|
2008-01-09 15:38:05 +01:00
|
|
|
# The convention is that Free or Open Source licenses do not have a
|
|
|
|
# -license suffix, and nonfree licenses end in -license.
|
|
|
|
|
|
|
|
# XXX open-font-license should perhaps be changed to open-font
|
|
|
|
|
2007-07-20 15:05:28 +02:00
|
|
|
DEFAULT_ACCEPTABLE_LICENSES= \
|
|
|
|
public-domain \
|
2009-05-18 11:57:28 +02:00
|
|
|
gnu-fdl-v1.1 gnu-fdl-v1.2 gnu-fdl-v1.3 \
|
2009-05-21 21:05:01 +02:00
|
|
|
gnu-gpl-v2 gnu-lgpl-v2 gnu-lgpl-v2.1 \
|
2007-08-22 18:29:15 +02:00
|
|
|
gnu-gpl-v3 gnu-lgpl-v3 \
|
2007-07-20 15:05:28 +02:00
|
|
|
original-bsd modified-bsd \
|
2009-06-03 15:40:03 +02:00
|
|
|
x11 mit miros \
|
2009-04-30 01:50:07 +02:00
|
|
|
apache-1.1 apache-2.0 \
|
2009-04-25 15:15:43 +02:00
|
|
|
artistic artistic-2.0 \
|
2007-11-08 20:31:05 +01:00
|
|
|
cddl-1.0 \
|
2009-05-14 08:01:00 +02:00
|
|
|
cpl-1.0 \
|
2007-11-08 20:31:05 +01:00
|
|
|
open-font-license
|
2007-07-20 16:21:26 +02:00
|
|
|
|
2009-04-08 16:47:26 +02:00
|
|
|
##### Variant spellings
|
|
|
|
|
|
|
|
.if defined(ACCEPTABLE_LICENCES) && !defined(ACCEPTABLE_LICENSES)
|
|
|
|
ACCEPTABLE_LICENSES= ${ACCEPTABLE_LICENCES}
|
|
|
|
.endif
|
|
|
|
|
2007-07-20 16:21:26 +02:00
|
|
|
.if !defined(LICENSE)
|
2009-04-08 16:47:26 +02:00
|
|
|
. if defined(PKG_DEVELOPER)
|
2007-07-20 16:21:26 +02:00
|
|
|
WARNINGS+= "[license.mk] Every package should define a LICENSE."
|
|
|
|
. endif
|
|
|
|
|
|
|
|
.else
|
|
|
|
|
2007-08-14 09:54:22 +02:00
|
|
|
# Note: some bulk builders rely on the fact that they can set
|
2007-08-14 17:23:53 +02:00
|
|
|
# _ACCEPTABLE to bypass license checks. Inform them when you intend to
|
2007-08-14 09:54:22 +02:00
|
|
|
# remove this variable.
|
2007-07-20 16:21:26 +02:00
|
|
|
. if defined(ACCEPTABLE_LICENSES) && !empty(ACCEPTABLE_LICENSES:M${LICENSE})
|
|
|
|
_ACCEPTABLE= yes
|
|
|
|
. endif
|
|
|
|
|
|
|
|
. if !defined(_ACCEPTABLE)
|
2009-04-08 16:47:26 +02:00
|
|
|
. if defined(MAKECONF)
|
|
|
|
_MAKECONF?= ${MAKECONF}
|
|
|
|
. elif ${OPSYS} == "NetBSD" && ${MAKE} != "${PREFIX}/bin/bmake"
|
|
|
|
_MAKECONF?= /etc/mk.conf
|
|
|
|
. else
|
|
|
|
_MAKECONF?= ${PREFIX}/etc/mk.conf
|
|
|
|
. endif
|
2007-07-20 16:21:26 +02:00
|
|
|
PKG_FAIL_REASON+= "${PKGNAME} has an unacceptable license: ${LICENSE}." \
|
|
|
|
" To view the license, enter \"${MAKE} show-license\"." \
|
2009-04-08 16:47:26 +02:00
|
|
|
" To indicate acceptance, add this line to ${_MAKECONF}:" \
|
2007-07-20 16:21:26 +02:00
|
|
|
" ACCEPTABLE_LICENSES+=${LICENSE}"
|
|
|
|
. endif
|
|
|
|
.endif
|