diff options
Diffstat (limited to 'mk/package')
-rw-r--r-- | mk/package/bsd.package.mk | 15 | ||||
-rw-r--r-- | mk/package/package.mk | 6 |
2 files changed, 19 insertions, 2 deletions
diff --git a/mk/package/bsd.package.mk b/mk/package/bsd.package.mk index 4c1530f0c7b..91f4d112675 100644 --- a/mk/package/bsd.package.mk +++ b/mk/package/bsd.package.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.package.mk,v 1.7 2006/07/22 16:31:35 jlam Exp $ +# $NetBSD: bsd.package.mk,v 1.8 2006/10/08 20:31:38 rillig Exp $ # # This Makefile fragment is included by bsd.pkg.mk and provides all # variables and targets related to binary packages. @@ -7,6 +7,19 @@ # # package, repackage # +# The following variables may be set by the package: +# +# MAKE_PACKAGE_AS_ROOT: YesNo +# When this variable is set to "no", the package is created by +# the user that also built the package. Since most packages don't +# need root privileges to create the package, the default value +# is "no". Packages that install unreadable files (for example +# with mode 4111) need to set this variable to "yes". +# +# Default value: "yes", but this will change to "no" after most +# packages that really need this option have been identified. + +MAKE_PACKAGE_AS_ROOT?= yes _COOKIE.package= ${WRKDIR}/.package_done diff --git a/mk/package/package.mk b/mk/package/package.mk index e956f751d37..8b4920b4d13 100644 --- a/mk/package/package.mk +++ b/mk/package/package.mk @@ -1,4 +1,4 @@ -# $NetBSD: package.mk,v 1.15 2006/07/22 16:31:35 jlam Exp $ +# $NetBSD: package.mk,v 1.16 2006/10/08 20:31:38 rillig Exp $ ###################################################################### ### package (PUBLIC) @@ -83,8 +83,12 @@ _PACKAGE_ALL_TARGETS+= package-warnings _PACKAGE_ALL_TARGETS+= error-check .PHONY: package-all su-package-all +.if !empty(MAKE_PACKAGE_AS_ROOT:M[Yy][Ee][Ss]) package-all: su-target su-package-all: ${_PACKAGE_ALL_TARGETS} +.else +package-all: ${_PACKAGE_ALL_TARGETS} +.endif ###################################################################### ### package-check-installed (PRIVATE, override) |