summaryrefslogtreecommitdiff
path: root/chat/gale/Makefile
diff options
context:
space:
mode:
authorlukem <lukem@pkgsrc.org>2001-11-19 04:58:59 +0000
committerlukem <lukem@pkgsrc.org>2001-11-19 04:58:59 +0000
commit69c6587c3786455f6bab8acfbc7257790a668432 (patch)
tree5dec8ebae1b11ab78958f1b1631c25cb9d017efc /chat/gale/Makefile
parent90908af1f81c1a904c6d8aac8fdda9d639d1483d (diff)
downloadpkgsrc-69c6587c3786455f6bab8acfbc7257790a668432.tar.gz
cleanup per ../sysutils/ups-nut:
- use FILES_SUBST_SED et al - do NOT try and remove the gale user & group or ${PREFIX}/etc/gale on deinstall. instead, remind the admin to do it manually.
Diffstat (limited to 'chat/gale/Makefile')
-rw-r--r--chat/gale/Makefile40
1 files changed, 17 insertions, 23 deletions
diff --git a/chat/gale/Makefile b/chat/gale/Makefile
index 71a1e9ed070..1b51c3bc2ff 100644
--- a/chat/gale/Makefile
+++ b/chat/gale/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2001/08/14 03:41:37 jlam Exp $
+# $NetBSD: Makefile,v 1.6 2001/11/19 04:58:59 lukem Exp $
#
DISTNAME= gale-0.99a
@@ -18,20 +18,14 @@ DEPENDS+= rsaref-2.0p3:../../security/rsaref/
.if exists(/usr/sbin/user)
ADDUSER= /usr/sbin/useradd
ADDGROUP= /usr/sbin/groupadd
-USERDEL= /usr/sbin/userdel
-GROUPDEL= /usr/sbin/groupdel
.else
DEPENDS+= user>=20000313:../../sysutils/user
ADDUSER= ${LOCALBASE}/sbin/useradd
ADDGROUP= ${LOCALBASE}/sbin/groupadd
-USERDEL= ${LOCALBASE}/sbin/userdel
-GROUPDEL= ${LOCALBASE}/sbin/groupdel
.endif
.elif ${OPSYS} == "SunOS"
ADDUSER= useradd
ADDGROUP= groupadd
-USERDEL= userdel
-GROUPDEL= groupdel
.endif
WRKSRC= ${WRKDIR}/${DISTNAME}
DEINSTALL_FILE= ${WRKDIR}/DEINSTALL
@@ -45,22 +39,22 @@ CPPFLAGS+= -I${LOCALBASE}/include/rsaref -I${LOCALBASE}/include/w3c-libwww
GALE_USER= gale
GALE_GROUP= gale
+FILES_SUBST= GALE_USER=${GALE_USER}
+FILES_SUBST+= GALE_GROUP=${GALE_GROUP}
+
+FILES_SUBST+= ADDGROUP=${ADDGROUP:Q}
+FILES_SUBST+= ADDUSER=${ADDUSER:Q}
+FILES_SUBST+= CAT=${CAT:Q}
+FILES_SUBST+= CHGRP=${CHGRP:Q}
+FILES_SUBST+= ID=${ID:Q}
+FILES_SUBST+= RM=${RM:Q}
+FILES_SUBST+= TOUCH=${TOUCH:Q}
+
+FILES_SUBST_SED= ${FILES_SUBST:S/=/@!/:S/$/!g/:S/^/ -e s!@/}
+
pre-install:
- ${SED} -e 's|@GALE_USER@|${GALE_USER}|g' \
- -e 's|@GALE_GROUP@|${GALE_GROUP}|g' \
- -e 's|@USERDEL@|${USERDEL}|g' \
- -e 's|@GROUPDEL@|${GROUPDEL}|g' \
- < ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE}
- ${SED} -e 's|@GALE_USER@|${GALE_USER}|g' \
- -e 's|@GALE_GROUP@|${GALE_GROUP}|g' \
- -e 's|@USERDIR@|${USERDIR}|g' \
- -e 's|@ADDUSER@|${ADDUSER}|g' \
- -e 's|@ADDGROUP@|${ADDGROUP}|g' \
- -e 's|@CHGRP@|${CHGRP}|g' \
- -e 's|@ID@|${ID}|g' \
- -e 's|@RM@|${RM}|g' \
- -e 's|@TOUCH@|${TOUCH}|g' \
- < ${PKGDIR}/INSTALL > ${INSTALL_FILE}
- ${SH} ${INSTALL_FILE}
+ ${SED} ${FILES_SUBST_SED} ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE}
+ ${SED} ${FILES_SUBST_SED} ${PKGDIR}/INSTALL > ${INSTALL_FILE}
+ PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} PRE-INSTALL
.include "../../mk/bsd.pkg.mk"