summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2002-06-22 02:48:35 +0000
committerjlam <jlam@pkgsrc.org>2002-06-22 02:48:35 +0000
commit063b3c32e8adcd017a383a78ee17c4584f92d3ae (patch)
tree1f43bde483824893a84970061dbb80c33ea28c4f /mk
parent6fcfc63b9168f7009e589aca2a3226cae0eaf193 (diff)
downloadpkgsrc-063b3c32e8adcd017a383a78ee17c4584f92d3ae.tar.gz
Change PKG_CREATE_USERGROUP and PKG_CONFIG so that their values are merely
defaults for the INSTALL/DEINSTALL scripts. The environment variables of the same name take precedence during installation of a binary package.
Diffstat (limited to 'mk')
-rw-r--r--mk/bsd.pkg.install.mk20
-rw-r--r--mk/bsd.pkg.mk13
-rw-r--r--mk/install/header6
3 files changed, 25 insertions, 14 deletions
diff --git a/mk/bsd.pkg.install.mk b/mk/bsd.pkg.install.mk
index 49b8d965103..fe5415d0c22 100644
--- a/mk/bsd.pkg.install.mk
+++ b/mk/bsd.pkg.install.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.install.mk,v 1.19 2002/06/20 20:15:47 jlam Exp $
+# $NetBSD: bsd.pkg.install.mk,v 1.20 2002/06/22 02:48:35 jlam Exp $
#
# This Makefile fragment is included by package Makefiles to use the common
# INSTALL/DEINSTALL scripts. To use this Makefile fragment, simply:
@@ -153,6 +153,24 @@ FILES_SUBST+= MAKE_DIRS_PERMS=${MAKE_DIRS_PERMS:Q}
FILES_SUBST+= OWN_DIRS=${OWN_DIRS:Q}
FILES_SUBST+= OWN_DIRS_PERMS=${OWN_DIRS_PERMS:Q}
+# PKG_CREATE_USERGROUP indicates whether the INSTALL script should
+# automatically add any needed users/groups to the system using
+# useradd/groupadd. It is either YES or NO and defaults to YES.
+#
+# PKG_CONFIG indicates whether the INSTALL/DEINSTALL scripts should do
+# automatic config file and directory handling, or if it should
+# merely inform the admin of the list of required files and
+# directories needed to use the package. It is either YES or NO
+# and defaults to YES.
+#
+# These values merely set the defaults for INSTALL/DEINSTALL scripts, but
+# they may be overridden by resetting them in the environment.
+#
+PKG_CREATE_USERGROUP?= YES
+PKG_CONFIG?= YES
+FILES_SUBST+= PKG_CREATE_USERGROUP=${PKG_CREATE_USERGROUP}
+FILES_SUBST+= PKG_CONFIG=${PKG_CONFIG}
+
# Substitute for various programs used in the DEINSTALL/INSTALL scripts.
FILES_SUBST+= AWK=${AWK:Q}
FILES_SUBST+= BASENAME=${BASENAME:Q}
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index c982ad6df23..add136aa35e 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.993 2002/06/20 20:15:48 jlam Exp $
+# $NetBSD: bsd.pkg.mk,v 1.994 2002/06/22 02:48:35 jlam Exp $
#
# This file is in the public domain.
#
@@ -1921,13 +1921,6 @@ do-build:
# Install
-.if defined(PKG_CREATE_USERGROUP)
-INSTALL_SCRIPT_ENV+= PKG_CREATE_USERGROUP=${PKG_CREATE_USERGROUP}
-.endif
-.if defined(PKG_CONFIG)
-INSTALL_SCRIPT_ENV+= PKG_CONFIG=${PKG_CONFIG}
-.endif
-
.if !target(do-install)
do-install:
${_PKG_SILENT}${_PKG_DEBUG}cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} -f ${MAKEFILE} ${INSTALL_TARGET}
@@ -2049,11 +2042,11 @@ real-su-install: ${MESSAGE}
${ECHO_MSG} "Become root and try again to ensure correct permissions."; \
fi
.endif # !NO_MTREE
- ${_PKG_SILENT}${_PKG_DEBUG}cd ${.CURDIR} && ${SETENV} ${INSTALL_SCRIPT_ENV} ${MAKE} ${MAKEFLAGS} pre-install-script
+ ${_PKG_SILENT}${_PKG_DEBUG}cd ${.CURDIR} && ${MAKE} ${MAKEFLAGS} pre-install-script
${_PKG_SILENT}${_PKG_DEBUG}cd ${.CURDIR} && ${MAKE} ${MAKEFLAGS} pre-install
${_PKG_SILENT}${_PKG_DEBUG}cd ${.CURDIR} && ${MAKE} ${MAKEFLAGS} do-install
${_PKG_SILENT}${_PKG_DEBUG}cd ${.CURDIR} && ${MAKE} ${MAKEFLAGS} post-install
- ${_PKG_SILENT}${_PKG_DEBUG}cd ${.CURDIR} && ${SETENV} ${INSTALL_SCRIPT_ENV} ${MAKE} ${MAKEFLAGS} post-install-script
+ ${_PKG_SILENT}${_PKG_DEBUG}cd ${.CURDIR} && ${MAKE} ${MAKEFLAGS} post-install-script
.for f in ${INFO_FILES}
${_PKG_SILENT}${_PKG_DEBUG}${ECHO} "${INSTALL_INFO} --info-dir=${PREFIX}/info ${PREFIX}/info/${f}"; \
${INSTALL_INFO} --remove --info-dir=${PREFIX}/info ${PREFIX}/info/${f}; \
diff --git a/mk/install/header b/mk/install/header
index 6f6c7cd50cc..8cea8bcc2be 100644
--- a/mk/install/header
+++ b/mk/install/header
@@ -2,7 +2,7 @@
#
# start of header
#
-# $NetBSD: header,v 1.8 2002/06/20 20:15:50 jlam Exp $
+# $NetBSD: header,v 1.9 2002/06/22 02:48:36 jlam Exp $
PKGNAME=$1
STAGE=$2
@@ -70,7 +70,7 @@ case "${PKG_CREATE_USERGROUP}" in
_PKG_CREATE_USERGROUP=NO
;;
*)
- _PKG_CREATE_USERGROUP=YES
+ _PKG_CREATE_USERGROUP=@PKG_CREATE_USERGROUP@
;;
esac
@@ -82,7 +82,7 @@ case "${PKG_CONFIG}" in
_PKG_CONFIG=NO
;;
*)
- _PKG_CONFIG=YES
+ _PKG_CONFIG=@PKG_CONFIG@
;;
esac