summaryrefslogtreecommitdiff
path: root/mail/qmail
diff options
context:
space:
mode:
authorschmonz <schmonz@pkgsrc.org>2018-11-14 16:43:17 +0000
committerschmonz <schmonz@pkgsrc.org>2018-11-14 16:43:17 +0000
commitb9138570e45129754743fc57946fc9c2e267a14c (patch)
tree1f9fc856ede877b3c13bb238325687470c1c26de /mail/qmail
parent97720411d2c7a6161e52bb5fdfbe546256322f0f (diff)
downloadpkgsrc-b9138570e45129754743fc57946fc9c2e267a14c.tar.gz
Build and install config-fast-pkgsrc, which is like config-fast but
installs the generated files elsewhere, so we can simulate CONF_FILES-like behavior. qmail-run will switch to config-fast-pkgsrc. We'll take advantage to deinstall these config files (as well as the three basic .qmail files in ~alias) provided they haven't been changed. Both of these commands stop leaving leftovers in ${PKG_SYSCONFDIR}: # pkg_add qmail && pkg_delete qmail # pkg_add qmail-run && pkg_delete -r qmail While here, warn if the queue directory is on a case-insensitive filesystem. Probably not gonna work perfectly. Bump PKGREVISION.
Diffstat (limited to 'mail/qmail')
-rw-r--r--mail/qmail/DEINSTALL23
-rw-r--r--mail/qmail/INSTALL27
-rw-r--r--mail/qmail/Makefile12
-rw-r--r--mail/qmail/PLIST3
4 files changed, 54 insertions, 11 deletions
diff --git a/mail/qmail/DEINSTALL b/mail/qmail/DEINSTALL
index a83d7e244cb..d98dee7630e 100644
--- a/mail/qmail/DEINSTALL
+++ b/mail/qmail/DEINSTALL
@@ -1,4 +1,4 @@
-# $NetBSD: DEINSTALL,v 1.5 2006/04/29 04:53:17 schmonz Exp $
+# $NetBSD: DEINSTALL,v 1.6 2018/11/14 16:43:17 schmonz Exp $
QMAILDIR=@QMAILDIR@
@@ -6,12 +6,23 @@ VAR_QMAIL_DIRS="alias bin boot control doc man queue users"
case "${STAGE}" in
-POST-DEINSTALL)
+DEINSTALL)
+ cd ${PKG_SYSCONFDIR}
+ for i in postmaster mailer-daemon root; do
+ [ -s alias/.qmail-${i} ] \
+ || ${RM} -f alias/.qmail-${i}
+ done
+ for i in defaultdomain locals me plusdomain rcpthosts; do
+ ${CMP} -s control/${i} .pkgsrc-defaults-do-not-edit/${i} \
+ && ${RM} -f control/${i}
+ ${RM} -f .pkgsrc-defaults-do-not-edit/${i}
+ done
- for dir in $VAR_QMAIL_DIRS; do
- if [ -h ${QMAILDIR}/$dir ]; then
- ${RM} -f ${QMAILDIR}/$dir
- fi
+ cd ${QMAILDIR}
+ for dir in ${VAR_QMAIL_DIRS}; do
+ [ -h ${dir} ] \
+ && ${RM} -f ${dir}
done
+
;;
esac
diff --git a/mail/qmail/INSTALL b/mail/qmail/INSTALL
index a81e23e4cb8..c2848c8951d 100644
--- a/mail/qmail/INSTALL
+++ b/mail/qmail/INSTALL
@@ -1,4 +1,4 @@
-# $NetBSD: INSTALL,v 1.10 2017/08/13 23:42:55 schmonz Exp $
+# $NetBSD: INSTALL,v 1.11 2018/11/14 16:43:17 schmonz Exp $
DOCDIR=@DOCDIR@
EGDIR=@EGDIR@
@@ -6,9 +6,24 @@ PKGMANDIR=@PKGMANDIR@
QMAILDIR=@QMAILDIR@
QMAIL_QUEUE_DIR=@QMAIL_QUEUE_DIR@
QMAIL_QUEUE_EXTRA=@QMAIL_QUEUE_EXTRA@
+WC=@WC@
VAR_QMAIL_DIRS="alias bin boot control doc man queue users"
+is_queue_fs_case_sensitive() {
+ cd ${QMAIL_QUEUE_DIR}
+ ${MKDIR} pkgsrc
+ ${TOUCH} pkgsrc/case-check pkgsrc/case-CHECK
+ count=$(${ECHO} case-* | ${WC} -w)
+ ${RM} -f pkgsrc/case-*
+ ${RMDIR} pkgsrc
+ if [ ${count} -eq 2 ]; then
+ return 0
+ else
+ return 1
+ fi
+}
+
case ${STAGE} in
PRE-INSTALL)
@@ -40,6 +55,16 @@ EOF
exit 1
fi
+ if ! is_queue_fs_case_sensitive; then
+ ${CAT} <<EOF
+===========================================================================
+
+WARNING: QMAIL_QUEUE_DIR is on a case-insensitive filesystem.
+
+===========================================================================
+EOF
+ fi
+
# keep in sync with Makefile:pre-install
${LN} -s ${PKG_SYSCONFDIR}/alias ${QMAILDIR}/alias
${LN} -s ${PREFIX}/bin ${QMAILDIR}/bin
diff --git a/mail/qmail/Makefile b/mail/qmail/Makefile
index 37f7ea17026..185c9fefef2 100644
--- a/mail/qmail/Makefile
+++ b/mail/qmail/Makefile
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.102 2018/11/10 16:42:52 schmonz Exp $
+# $NetBSD: Makefile,v 1.103 2018/11/14 16:43:17 schmonz Exp $
#
DISTNAME= netqmail-1.06
PKGNAME= qmail-1.03
-PKGREVISION= 40
+PKGREVISION= 41
CATEGORIES= mail
MASTER_SITES= http://qmail.org/
@@ -42,6 +42,7 @@ DJB_RESTRICTED= no
PKG_SYSCONFSUBDIR= qmail
OWN_DIRS+= ${PKG_SYSCONFDIR} ${PKG_SYSCONFDIR}/alias
OWN_DIRS+= ${PKG_SYSCONFDIR}/control ${PKG_SYSCONFDIR}/users
+OWN_DIRS+= ${PKG_SYSCONFDIR}/.pkgsrc-defaults-do-not-edit
OWN_DIRS+= ${QMAILDIR} ${QMAIL_QUEUE_DIR}
DOCDIR= ${PREFIX}/share/doc/qmail
@@ -57,10 +58,11 @@ FILES_SUBST+= QMAIL_QMAIL_GROUP=${QMAIL_QMAIL_GROUP:Q}
FILES_SUBST+= QMAIL_QUEUE_DIR=${QMAIL_QUEUE_DIR:Q}
FILES_SUBST+= QMAIL_QUEUE_EXTRA=${QMAIL_QUEUE_EXTRA:Q}
FILES_SUBST+= PKGNAME=${PKGNAME:Q}
+FILES_SUBST+= WC=${WC:Q}
SETUP_PROGRAMS= dnsfq dnsip dnsptr hostname ipmeprint
SETUP_PROGRAMS+= install-destdir instcheck
-SETUP_SCRIPTS= config config-fast
+SETUP_SCRIPTS= config config-fast config-fast-pkgsrc
MANDIRS= man
.for j in 1 5 7 8
@@ -205,6 +207,10 @@ post-patch:
mv $$i.new $$i; \
done
+post-build:
+ cd ${WRKSRC}; \
+ ${SED} -e 's|${QMAILDIR}/control/|${PKG_SYSCONFDIR}/.pkgsrc-defaults-do-not-edit/|' < config-fast > config-fast-pkgsrc
+
pre-install:
${MKDIR} ${DESTDIR}${QMAILDIR}
${MKDIR} ${DESTDIR}${QMAIL_QUEUE_DIR}
diff --git a/mail/qmail/PLIST b/mail/qmail/PLIST
index 28426aaaae9..da486d769ef 100644
--- a/mail/qmail/PLIST
+++ b/mail/qmail/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.20 2018/05/28 12:57:36 schmonz Exp $
+@comment $NetBSD: PLIST,v 1.21 2018/11/14 16:43:17 schmonz Exp $
bin/bouncesaying
bin/condredirect
bin/datemail
@@ -132,6 +132,7 @@ share/examples/qmail/boot/proc
share/examples/qmail/boot/proc+df
share/qmail/setup/config
share/qmail/setup/config-fast
+share/qmail/setup/config-fast-pkgsrc
share/qmail/setup/dnsfq
share/qmail/setup/dnsip
share/qmail/setup/dnsptr