pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk Introduce a PKGSRC_MESSAGE_RECIPIENTS, which takes ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/eca23e190364
branches:  trunk
changeset: 459798:eca23e190364
user:      agc <agc%pkgsrc.org@localhost>
date:      Thu Aug 07 16:14:05 2003 +0000

description:
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:

 mk/bsd.pkg.defaults.mk |   7 ++++++-
 mk/bsd.pkg.mk          |  14 ++++++++++++--
 2 files changed, 18 insertions(+), 3 deletions(-)

diffs (56 lines):

diff -r 2112bc68f998 -r eca23e190364 mk/bsd.pkg.defaults.mk
--- a/mk/bsd.pkg.defaults.mk    Thu Aug 07 15:36:23 2003 +0000
+++ b/mk/bsd.pkg.defaults.mk    Thu Aug 07 16:14:05 2003 +0000
@@ -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 @@
 # 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 -r 2112bc68f998 -r eca23e190364 mk/bsd.pkg.mk
--- a/mk/bsd.pkg.mk     Thu Aug 07 15:36:23 2003 +0000
+++ b/mk/bsd.pkg.mk     Thu Aug 07 16:14:05 2003 +0000
@@ -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 @@
                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 @@
        @${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



Home | Main Index | Thread Index | Old Index