diff options
author | agc <agc@pkgsrc.org> | 2003-08-07 16:14:05 +0000 |
---|---|---|
committer | agc <agc@pkgsrc.org> | 2003-08-07 16:14:05 +0000 |
commit | 69f3ac9ea8568398178b0aec50bd490ae4a218d7 (patch) | |
tree | 8cb7336273a4429199cdf5142c43dcfdabe184b2 /mk | |
parent | 04eeb16a1b6b98f4a26cf491a92a8dc312389f64 (diff) | |
download | pkgsrc-69f3ac9ea8568398178b0aec50bd490ae4a218d7.tar.gz |
Introduce a PKGSRC_MESSAGE_RECIPIENTS, which takes the login names of
users to whom the MESSAGE file should be mailed at package
installation time, and mail the MESSAGE file at the "make install"
stage (if PKGSRC_MESSAGE_RECIPIENTS is not empty).
Inspired by PR 22328 from Jeremy Reed.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/bsd.pkg.defaults.mk | 7 | ||||
-rw-r--r-- | mk/bsd.pkg.mk | 14 |
2 files changed, 18 insertions, 3 deletions
diff --git a/mk/bsd.pkg.defaults.mk b/mk/bsd.pkg.defaults.mk index ccc4dce1aa6..9bcef7f02f2 100644 --- a/mk/bsd.pkg.defaults.mk +++ b/mk/bsd.pkg.defaults.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.defaults.mk,v 1.170 2003/08/04 16:11:39 jmc Exp $ +# $NetBSD: bsd.pkg.defaults.mk,v 1.171 2003/08/07 16:14:05 agc Exp $ # # A file providing defaults for pkgsrc and the packages collection. @@ -85,6 +85,11 @@ PKGSRC_SLEEPSECS?= 5 # Possible: YES, NO # Default: YES +PKGSRC_MESSAGE_RECIPIENTS?= +# login names of recipients of any MESSAGE files which will be mailed +# Possible: any login names +# Default: none + PKGSRC_RUN_TEST?= no # Run test target before install # Possible: yes, no diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index 4b2ffafe6a0..c1b40cfdc8c 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.1230 2003/08/04 21:06:47 jmc Exp $ +# $NetBSD: bsd.pkg.mk,v 1.1231 2003/08/07 16:14:05 agc Exp $ # # This file is in the public domain. # @@ -2488,7 +2488,7 @@ real-su-install: ${MESSAGE} done; \ fi .if ${_DO_SHLIB_CHECKS} == "yes" - ${_PKG_SILENT}${_PKG_DEBUG}\ + ${_PKG_SILENT}${_PKG_DEBUG} \ ${MAKE} ${MAKEFLAGS} do-shlib-handling SHLIB_PLIST_MODE=0 .endif .ifdef MESSAGE @@ -2496,6 +2496,16 @@ real-su-install: ${MESSAGE} @${ECHO_MSG} "" @${CAT} ${MESSAGE} @${ECHO_MSG} "" +. if !empty(PKGSRC_MESSAGE_RECIPIENTS) + ${_PKG_SILENT}${_PKG_DEBUG} \ + (${ECHO} "The ${PKGNAME} package was installed on `${HOSTNAME_CMD}` at `date`"; \ + ${ECHO} ""; \ + ${ECHO} "Please note the following:"; \ + ${ECHO} ""; \ + ${CAT} ${MESSAGE}; \ + ${ECHO} "") | \ + mail -s"Package ${PKGNAME} installed" ${PKGSRC_MESSAGE_RECIPIENTS} +. endif .endif .if !defined(NO_PKG_REGISTER) ${_PKG_SILENT}${_PKG_DEBUG}cd ${.CURDIR} && ${MAKE} ${MAKEFLAGS} fake-pkg |