summaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2006-03-10 20:08:57 +0000
committerjlam <jlam@pkgsrc.org>2006-03-10 20:08:57 +0000
commit5ee52161e8fd989ddf58065750e7a938a06240a9 (patch)
tree08a75141f33a9620e29e128cc086c133412de131 /mail
parentdc953ec88faa0301823a37c8f2e8c613b64900f7 (diff)
downloadpkgsrc-5ee52161e8fd989ddf58065750e7a938a06240a9.tar.gz
Use the pkginstall framework to create the INSTALL/DEINSTALL scripts
instead. XXX This package really needs an overhaul to use modern pkgsrc XXX conventions.
Diffstat (limited to 'mail')
-rw-r--r--mail/majordomo/Makefile42
1 files changed, 13 insertions, 29 deletions
diff --git a/mail/majordomo/Makefile b/mail/majordomo/Makefile
index c9024344bb4..d75810583f8 100644
--- a/mail/majordomo/Makefile
+++ b/mail/majordomo/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.22 2006/01/06 02:35:32 garbled Exp $
+# $NetBSD: Makefile,v 1.23 2006/03/10 20:08:57 jlam Exp $
DISTNAME= majordomo-1.94.5
PKGREVISION= 1
@@ -32,8 +32,8 @@ NO_BIN_ON_CDROM= ${NO_BIN_ON_FTP}
BUILD_TARGET= wrapper
INSTALL_TARGET= install install-wrapper
-INSTALL_FILE= ${WRKDIR}/INSTALL
-DEINSTALL_FILE= ${WRKDIR}/DEINSTALL
+INSTALL_SRC= ${PKGDIR}/INSTALL
+DEINSTALL_SRC= ${PKGDIR}/DEINSTALL
MAKEFILE= Makefile.netbsd
MAJORDOMO_TMPDIR?= /var/tmp
@@ -41,11 +41,16 @@ MAJORDOMO_HOMEDIR?= /home
MAJORDOMO_USER?= majordom
MAJORDOMO_GROUP?= majordom
-PLIST_SUBST+= HOME=${MAJORDOMO_HOMEDIR:Q} \
+PLIST_SUBST+= HOME=${MAJORDOMO_HOMEDIR:Q} \
MAJORDOMO_USER=${MAJORDOMO_USER:Q}
-MESSAGE_SUBST+= HOME=${MAJORDOMO_HOMEDIR} \
- MAJORDOMO_USER=${MAJORDOMO_USER} \
+MESSAGE_SUBST+= HOME=${MAJORDOMO_HOMEDIR} \
+ MAJORDOMO_USER=${MAJORDOMO_USER} \
MAJORDOMO_GROUP=${MAJORDOMO_GROUP}
+FILES_SUBST+= HOME=${MAJORDOMO_HOMEDIR:Q} \
+ MAJORDOMO_USER=${MAJORDOMO_USER} \
+ MAJORDOMO_GROUP=${MAJORDOMO_GROUP} \
+ ADDUSER=${ADDUSER} ADDGROUP=${ADDGROUP} \
+ CHGRP=${CHGRP} ID=${ID} TOUCH=${TOUCH} RM=${RM}
DOCDIR= ${PREFIX}/share/doc/majordomo
DOCFILES= Changelog FUTURE INSTALL LICENSE NEWLIST README
@@ -73,26 +78,9 @@ require-uid:
${RM} -f "/tmp/grouptestmajordomo1.$$"; \
fi
-root-require-uid:
- @${SH} ${INSTALL_FILE} ${PKGNAME} PRE-INSTALL
+root-require-uid: pre-install-script
-do-configure:
- @${SED} \
- -e 's|@MAJORDOMO_USER@|${MAJORDOMO_USER}|g' \
- -e 's|@MAJORDOMO_GROUP@|${MAJORDOMO_GROUP}|g' \
- -e 's|@HOME@|${MAJORDOMO_HOMEDIR}|g' \
- -e 's|@ADDUSER@|${ADDUSER}|g' \
- -e 's|@ADDGROUP@|${ADDGROUP}|g' \
- -e 's|@CHGRP@|${CHGRP}|g' \
- -e 's|@ID@|${ID}|g' \
- -e 's|@TOUCH@|${TOUCH}|g' \
- -e 's|@RM@|${RM}|g' \
- < ${PKGDIR}/INSTALL > ${INSTALL_FILE}
- @${SED} \
- -e 's|@MAJORDOMO_USER@|${MAJORDOMO_USER}|g' \
- -e 's|@MAJORDOMO_GROUP@|${MAJORDOMO_GROUP}|g' \
- -e 's|@HOME@|${MAJORDOMO_HOMEDIR}|g' \
- < ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE}
+do-configure: generate-install-scripts
@${MAKE} ${.MAKEFLAGS} require-uid
@${SED} \
-e 's:@PREFIX@:${PREFIX}:g' \
@@ -115,10 +103,6 @@ do-configure:
-e 's:@MAJORDOMO_USER@:${MAJORDOMO_USER}:g' \
< ${FILESDIR}/aliases.majordomo > ${WRKSRC}/aliases.majordomo
-pre-install:
-# for safety's sake, if the user/group got deleted since configuration
- @${SH} ${INSTALL_FILE} ${PKGNAME} PRE-INSTALL
-
post-install:
@${LN} -sf archive2.pl ${PREFIX}/libexec/majordomo/archive
${INSTALL_DATA_DIR} ${DOCDIR}