summaryrefslogtreecommitdiff
path: root/chat
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
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')
-rw-r--r--chat/gale/DEINSTALL37
-rw-r--r--chat/gale/INSTALL75
-rw-r--r--chat/gale/Makefile40
-rw-r--r--chat/gale/PLIST3
4 files changed, 90 insertions, 65 deletions
diff --git a/chat/gale/DEINSTALL b/chat/gale/DEINSTALL
index d1f897f5e25..6f8ad485259 100644
--- a/chat/gale/DEINSTALL
+++ b/chat/gale/DEINSTALL
@@ -1,19 +1,36 @@
#!/bin/sh
#
-# $NetBSD: DEINSTALL,v 1.1 2001/10/31 20:06:24 zuntum Exp $
+# $NetBSD: DEINSTALL,v 1.2 2001/11/19 04:58:59 lukem Exp $
#
+PKGNAME=$1
+STAGE=$2
+
USER="@GALE_USER@"
GROUP="@GALE_GROUP@"
-USERDEL="@USERDEL@"
-GROUPDEL="@GROUPDEL@"
-
-case "$2" in
- DEINSTALL)
- echo "Removing user ${USER}"
- ${USERDEL} -r ${USER}
- echo "Removing group ${GROUP}"
- ${GROUPDEL} ${GROUP}
+
+CAT="@CAT@"
+
+case ${STAGE} in
+DEINSTALL)
+ ;;
+
+POST-DEINSTALL)
+ ${CAT} << EOF
+===========================================================================
+If you won't be using ${PKGNAME} any longer, you may want to remove:
+
+ * the \`${USER}' user
+ * the \`${GROUP}' group
+ * the \`${PKG_PREFIX}/etc/gale' directory
+
+===========================================================================
+EOF
+ ;;
+
+*)
+ echo "Unexpected argument: ${STAGE}"
+ exit 1
;;
esac
exit 0
diff --git a/chat/gale/INSTALL b/chat/gale/INSTALL
index b59b84e5475..b3ddb6eb715 100644
--- a/chat/gale/INSTALL
+++ b/chat/gale/INSTALL
@@ -1,6 +1,9 @@
#!/bin/sh
#
-# $NetBSD: INSTALL,v 1.1 2001/10/31 20:06:25 zuntum Exp $
+# $NetBSD: INSTALL,v 1.2 2001/11/19 04:58:59 lukem Exp $
+
+PKGNAME=$1
+STAGE=$2
USER=@GALE_USER@
GROUP=@GALE_GROUP@
@@ -12,34 +15,46 @@ ID="@ID@"
RM="@RM@"
TOUCH="@TOUCH@"
-# Group... the default's shipped with NetBSD
-# We need to check that ${GROUP} exists before adding the user.
-# Do it with chgrp to be able to use NIS.
-#
-${TOUCH} "/tmp/grouptest.$$"
-${CHGRP} ${GROUP} "/tmp/grouptest.$$" >/dev/null 2>&1
-if [ $? -eq 0 ]
-then
- echo "Group '${GROUP}' already exists...proceeding."
-else
- echo "Creating '${GROUP}' group..."
- ${ADDGROUP} ${GROUP}
- echo "Done."
-fi
-${RM} -f "/tmp/grouptest.$$"
+case ${STAGE} in
+PRE-INSTALL)
+ # Group... the default's shipped with NetBSD
+ # We need to check that ${GROUP} exists before adding the user.
+ # Do it with chgrp to be able to use NIS.
+ #
+ ${TOUCH} "/tmp/grouptest.$$"
+ ${CHGRP} ${GROUP} "/tmp/grouptest.$$" >/dev/null 2>&1
+ if [ $? -eq 0 ]
+ then
+ echo "Group '${GROUP}' already exists...proceeding."
+ else
+ echo "Creating '${GROUP}' group..."
+ ${ADDGROUP} ${GROUP}
+ echo "Done."
+ fi
+ ${RM} -f "/tmp/grouptest.$$"
-# Use `id' to be able to use NIS.
-#
-${ID} ${USER} 2>/dev/null >/dev/null
-if [ $? -eq 0 ]
-then
- echo "User '${USER}' already exists...proceeding."
-else
- echo "Creating '${USER}' user..."
- ${ADDUSER} \
- -c "Gale instant messaging system" \
- -d /var/${USER} \
- -g ${GROUP} -s /bin/sh -m ${USER}
- echo "Done."
-fi
+ # Use `id' to be able to use NIS.
+ #
+ ${ID} ${USER} 2>/dev/null >/dev/null
+ if [ $? -eq 0 ]
+ then
+ echo "User '${USER}' already exists...proceeding."
+ else
+ echo "Creating '${USER}' user..."
+ ${ADDUSER} \
+ -c "Gale instant messaging system" \
+ -d /var/${USER} \
+ -g ${GROUP} -s /bin/sh -m ${USER}
+ echo "Done."
+ fi
+ ;;
+
+POST-INSTALL)
+ ;;
+
+*)
+ echo "Unexpected argument: ${STAGE}"
+ exit 1
+ ;;
+esac
exit 0
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"
diff --git a/chat/gale/PLIST b/chat/gale/PLIST
index 46877b9a037..645fc7a6a58 100644
--- a/chat/gale/PLIST
+++ b/chat/gale/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.1 2001/10/31 20:06:25 zuntum Exp $
+@comment $NetBSD: PLIST,v 1.2 2001/11/19 04:58:59 lukem Exp $
bin/gale-config
bin/gale-install
bin/galed
@@ -57,4 +57,3 @@ sbin/gksign
@dirrm etc/gale/auth/private
@dirrm etc/gale/auth/trusted
@dirrm etc/gale/auth
-@dirrm etc/gale