summaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
authorzuntum <zuntum>2001-11-26 22:22:19 +0000
committerzuntum <zuntum>2001-11-26 22:22:19 +0000
commit6cc5daa934c1dfab7452551a4c207ccada4a6caa (patch)
treecab737d342d5464280a26c3a7c5d36bb5df10c9e /mail
parent18e3801a7295b892e4842676de2ea193edce0908 (diff)
downloadpkgsrc-6cc5daa934c1dfab7452551a4c207ccada4a6caa.tar.gz
o switched to bsd.pkg.install.mk logic -- now it depends on qmail-users package
Diffstat (limited to 'mail')
-rw-r--r--mail/qmail/DEINSTALL39
-rw-r--r--mail/qmail/MESSAGE4
-rw-r--r--mail/qmail/Makefile37
-rwxr-xr-xmail/qmail/files/checkusers.sh57
-rwxr-xr-xmail/qmail/files/removeusers.sh14
5 files changed, 18 insertions, 133 deletions
diff --git a/mail/qmail/DEINSTALL b/mail/qmail/DEINSTALL
index efd7f289945..b9d05b46a5b 100644
--- a/mail/qmail/DEINSTALL
+++ b/mail/qmail/DEINSTALL
@@ -1,28 +1,11 @@
-# $NetBSD: DEINSTALL,v 1.1 2001/11/01 01:01:10 zuntum Exp $
-
-PKGNAME=$1
-STAGE=$2
-
-if [ "$STAGE" != "POST-DEINSTALL" ]; then
- exit 0
-fi
-
-QMAILDIR=@QMAILDIR@
-
-echo ===========================================================================
-echo
-echo Note: this package did not remove qmail users and groups in case you may
-echo want to use them later.
-echo
-echo These qmail users still exist in the system:
-echo " alias qmaill qmaild qmailp qmailq qmailr qmails"
-echo and these groups:
-echo " nofiles qmail"
-echo
-echo If you won\'t be using ${PKGNAME} any longer, you may remove qmail
-echo users and groups automatically by typing \"make remove-users\".
-echo
-echo Directories \"alias control queue users\" from ${QMAILDIR} were also untouched
-echo and they are ready for future use. You may safely remove them - type \"make remove-dirs\".
-echo
-echo ===========================================================================
+# $NetBSD: DEINSTALL,v 1.2 2001/11/26 22:22:19 zuntum Exp $
+
+case "${STAGE}" in
+POST-DEINSTALL)
+ ${ECHO} ===========================================================================
+ ${ECHO}
+ ${ECHO} You may want to remove qmail-users package now, as it is no longer needed.
+ ${ECHO}
+ ${ECHO} ===========================================================================
+ ;;
+esac
diff --git a/mail/qmail/MESSAGE b/mail/qmail/MESSAGE
index 35ab0a7f696..646b9f59088 100644
--- a/mail/qmail/MESSAGE
+++ b/mail/qmail/MESSAGE
@@ -1,7 +1,7 @@
======================================================================
-$NetBSD: MESSAGE,v 1.1 2001/11/25 08:57:29 zuntum Exp $
+$NetBSD: MESSAGE,v 1.2 2001/11/26 22:22:19 zuntum Exp $
- To be able to view manpages either add \"/var/qmail/man/\" to the
+ To be able to view manpages either add "/var/qmail/man/" to the
_default line in /etc/man.conf or specify this directory in
MANPATH variable in your environment.
diff --git a/mail/qmail/Makefile b/mail/qmail/Makefile
index 14c312fcf2e..c1b05e7d30e 100644
--- a/mail/qmail/Makefile
+++ b/mail/qmail/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2001/09/27 23:18:22 jlam Exp $
+# $NetBSD: Makefile,v 1.4 2001/11/26 22:22:19 zuntum Exp $
#
DISTNAME= qmail-1.03
@@ -21,14 +21,7 @@ MAINTAINER= zuntum@netbsd.org
HOMEPAGE= http://www.qmail.org/
COMMENT= SECURE, reliable, efficient, simple, and FAST MTA for UNIX systems
-.if exists(/usr/sbin/user)
-USER_CMD= /usr/sbin/user
-GROUP_CMD= /usr/sbin/group
-.else
-DEPENDS+= user-[0-9]*:../../sysutils/user
-USER_CMD= ${LOCALBASE}/sbin/user
-GROUP_CMD= ${LOCALBASE}/sbin/group
-.endif
+DEPENDS+= qmail-users>=1.0:../../mail/qmail-users
ALL_TARGET= it man
INSTALL_TARGET= setup check
@@ -38,28 +31,15 @@ NO_PACKAGE= "Has to be compiled on target system due to installation path issue"
QMAILDIR= /var/qmail
-DEINSTALL_FILE= ${WRKDIR}/DEINSTALL
+OWN_DIRS+= ${QMAILDIR}
-FILES_SUBST+= QMAILDIR=${QMAILDIR}
-FILES_SUBST+= USER_CMD=${USER_CMD:Q}
-FILES_SUBST+= GROUP_CMD=${GROUP_CMD:Q}
-FILES_SUBST_SED= ${FILES_SUBST:S/=/@!/:S/$/!g/:S/^/ -e s!@/}
-
-PLIST_SUBST+= QMAILDIR=${QMAILDIR}
+DEINSTALL_EXTRA_TMPL= ${PKGDIR}/DEINSTALL
pre-build:
- @if [ `id -u` != 0 ]; then \
- ${ECHO} "Error: must be root to build qmail."; \
- exit 1; \
- fi
${ECHO} ${CC} ${CFLAGS} > ${WRKSRC}/conf-cc
${ECHO} ${QMAILDIR} > ${WRKSRC}/conf-qmail
- ${SED} ${FILES_SUBST_SED} ${FILESDIR}/checkusers.sh \
- > ${WRKDIR}/checkusers.sh
- ${SH} ${WRKDIR}/checkusers.sh
pre-install:
- ${SED} ${FILES_SUBST_SED} ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE}
${LN} -sf ${QMAILDIR} ${PREFIX}/qmail
post-install:
@@ -67,12 +47,5 @@ post-install:
cd ${QMAILDIR}/alias && \
${TOUCH} .qmail-postmaster .qmail-mailer-daemon .qmail-root
-remove-users: extract
- ${SED} ${FILES_SUBST_SED} ${FILESDIR}/removeusers.sh \
- > ${WRKDIR}/removeusers.sh
- ${SH} ${WRKDIR}/removeusers.sh
-
-remove-dirs:
- ${RM} -rf ${QMAILDIR}
-
+.include "../../mk/bsd.pkg.install.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/mail/qmail/files/checkusers.sh b/mail/qmail/files/checkusers.sh
deleted file mode 100755
index d44327ef40f..00000000000
--- a/mail/qmail/files/checkusers.sh
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: checkusers.sh,v 1.1.1.1 2001/08/13 09:10:10 zuntum Exp $
-
-QMAILDIR=@QMAILDIR@
-USER_CMD=@USER_CMD@
-GROUP_CMD=@GROUP_CMD@
-
-create_group()
-{
- GROUP=$1
-
- ${GROUP_CMD} info -e ${GROUP}
- if [ $? -eq 0 ]; then
- echo "Group '${GROUP}' already exists... proceeding."
- else
- echo -n "Creating '${GROUP}' group... "
- ${GROUP_CMD} add ${GROUP}
- echo "done."
- fi
-
- return
-}
-
-create_user()
-{
- USER=$1
- GROUP=$2
-
- if [ "$USER" = alias ]; then
- HOME="$QMAILDIR/alias"
- else
- HOME="$QMAILDIR"
- fi
-
- ${USER_CMD} info -e ${USER}
- if [ $? -eq 0 ]; then
- echo "User '${USER}' already exists... proceeding."
- else
- echo -n "Creating '${USER}' user... "
- ${USER_CMD} add -g ${GROUP} -s /sbin/nologin -d ${HOME} ${USER}
- echo "done."
- fi
-
- return
-}
-
-create_group qmail
-create_group nofiles
-
-create_user alias nofiles
-create_user qmaill nofiles
-create_user qmaild nofiles
-create_user qmailp nofiles
-create_user qmailq qmail
-create_user qmailr qmail
-create_user qmails qmail
diff --git a/mail/qmail/files/removeusers.sh b/mail/qmail/files/removeusers.sh
deleted file mode 100755
index f6be9ba9cd8..00000000000
--- a/mail/qmail/files/removeusers.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: removeusers.sh,v 1.1.1.1 2001/08/13 09:10:10 zuntum Exp $
-
-USER_CMD=@USER_CMD@
-GROUP_CMD=@GROUP_CMD@
-
-USERS="alias qmaill qmaild qmailp qmailq qmailr qmails"
-GROUPS="qmail nofiles"
-
-for i in $USERS; do ${USER_CMD} del $i 2> /dev/null > /dev/null; done
-for i in $GROUPS; do ${GROUP_CMD} del $i 2> /dev/null > /dev/null; done
-
-echo "qmail users and groups removed."