diff options
author | jlam <jlam> | 2001-12-02 03:11:35 +0000 |
---|---|---|
committer | jlam <jlam> | 2001-12-02 03:11:35 +0000 |
commit | 77f7fc5d39245d400e8ec79fa531f29c951fa641 (patch) | |
tree | 6957c1e8841b0717a421dbaf650bf82cdbb1aa9c /mk/bsd.pkg.install.mk | |
parent | 8e64c09614956b3aa86da90bf9c23450d71dc47f (diff) | |
download | pkgsrc-77f7fc5d39245d400e8ec79fa531f29c951fa641.tar.gz |
Support automatically calling the INSTALL script during installation. This
currently only occurs for packages that use bsd.pkg.install.mk.
There are two new targets, pre-install-script and post-install-script, that
default to doing nothing. The order of targets called for a "make install"
is:
pre-install-script
pre-install
do-install
post-install
post-install-script
The new targets are defined in bsd.pkg.install.mk to call the INSTALL
script with the PRE-INSTALL and POST-INSTALL options.
Diffstat (limited to 'mk/bsd.pkg.install.mk')
-rw-r--r-- | mk/bsd.pkg.install.mk | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/mk/bsd.pkg.install.mk b/mk/bsd.pkg.install.mk index cc0f1a2fe6d..a34132349ea 100644 --- a/mk/bsd.pkg.install.mk +++ b/mk/bsd.pkg.install.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.install.mk,v 1.7 2001/11/26 20:37:38 jlam Exp $ +# $NetBSD: bsd.pkg.install.mk,v 1.8 2001/12/02 03:11:36 jlam Exp $ # # This Makefile fragment is included by package Makefiles to use the common # INSTALL/DEINSTALL scripts. To use this Makefile fragment, simply: @@ -182,9 +182,13 @@ FILES_SUBST+= USERADD=${USERADD:Q} FILES_SUBST_SED= ${FILES_SUBST:S/=/@!/:S/$/!g/:S/^/ -e s!@/} -pre-install: install-scripts +pre-install-script: generate-install-scripts + PKG_PREFIX=${PREFIX} ${INSTALL_FILE} ${PKGNAME} PRE-INSTALL -install-scripts: +post-install-script: + PKG_PREFIX=${PREFIX} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL + +generate-install-scripts: ${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${DEINSTALL_SRC} | \ ${SED} ${FILES_SUBST_SED} > ${DEINSTALL_FILE} ${_PKG_SILENT}${_PKG_DEBUG}${CHMOD} +x ${DEINSTALL_FILE} |