summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authoragc <agc>1998-07-06 15:10:48 +0000
committeragc <agc>1998-07-06 15:10:48 +0000
commitdfb362d38372f27eb5d039b2df7aa42171deef8e (patch)
treecf4d8b5b1d0b5f6340e75c152fe97fdfc3458d64 /mk
parentb056684f9b6c1db09ee1a6400aa1255ecffdd950 (diff)
downloadpkgsrc-dfb362d38372f27eb5d039b2df7aa42171deef8e.tar.gz
Add an ACCEPTABLE_LICENCES definition to /etc/mk.conf. This is a
whitespace-delimited list, and details which types of licences are allowed. Package Makefiles with non-standard licences (shareware, non-commercial-use only) should have a LICENCE= <type> added. Normal package Makefiles remain unchanged. Add logic to bsd.pkg.mk to check, if LICENCE is defined, that the package is acceptable.
Diffstat (limited to 'mk')
-rw-r--r--mk/bsd.pkg.mk13
-rw-r--r--mk/mk.conf.example12
2 files changed, 23 insertions, 2 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index ca0bbe4eae6..74a99837c99 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.107 1998/07/03 19:27:39 hubertf Exp $
+# $NetBSD: bsd.pkg.mk,v 1.108 1998/07/06 15:10:49 agc Exp $
#
# This file is in the public domain.
#
@@ -569,6 +569,17 @@ IGNORE= "is restricted: ${RESTRICTED}"
IGNORE= "uses X11, but ${X11BASE} not found"
.elif defined(BROKEN)
IGNORE= "is marked as broken: ${BROKEN}"
+.elif defined(LICENCE)
+.ifdef ACCEPTABLE_LICENCES
+.for _lic in ${ACCEPTABLE_LICENCES}
+.if ${LICENCE} == "${_lic}"
+_ACCEPTABLE= yes
+.endif
+.endfor # _lic
+.endif # ACCEPTABLE_LICENCES
+.ifndef _ACCEPTABLE
+IGNORE= "Unacceptable licence: ${LICENCE}"
+.endif
.endif
.if defined(IGNORE)
diff --git a/mk/mk.conf.example b/mk/mk.conf.example
index 67f354b9d9f..cc4a62c2176 100644
--- a/mk/mk.conf.example
+++ b/mk/mk.conf.example
@@ -1,4 +1,4 @@
-# $NetBSD: mk.conf.example,v 1.17 1998/07/03 06:18:43 hubertf Exp $
+# $NetBSD: mk.conf.example,v 1.18 1998/07/06 15:10:48 agc Exp $
#
# Sample /etc/mk.conf file, which can be used to set specific values
# for building either NetBSD or some of the NetBSD packages collection
@@ -45,6 +45,16 @@ MANZ= 1 # gzip manual pages at installation time
# Possible: defined, not defined
# Default: not defined
+#ACCEPTABLE_LICENCES= shareware non-commercial-use
+ # Whitespace-delimited list of the types of
+ # licence which are acceptable for installation.
+ # (apart from standard "free" licences such as
+ # Berkeley/CMU and GPL).
+ # Possible: shareware, non-commercial-use
+ #
+ # Default: none
+
+
# Definitions used only in the packages collection
#AMANDA_USER= backup # Used in the amanda package to specify the
# login user and group responsible for backups