diff options
author | schmonz <schmonz@pkgsrc.org> | 2011-06-07 02:53:42 +0000 |
---|---|---|
committer | schmonz <schmonz@pkgsrc.org> | 2011-06-07 02:53:42 +0000 |
commit | f3edc0ecff7ceb4aa6d7adbe88f6a60b151ef63c (patch) | |
tree | 34c9a8f106c457f3fd643bebf2a5e0b07c4af7c9 /mail/qmail | |
parent | 04720be6e78ef15eafb8dc2b1ed2b4d138f483eb (diff) | |
download | pkgsrc-f3edc0ecff7ceb4aa6d7adbe88f6a60b151ef63c.tar.gz |
DESTDIR support, PKGMANDIR support, OS X fixes, general cleanups.
For ${OPSYS}/${USE_DESTDIR}/${PKGMANDIR} combinations that already
worked, no functional change (hence no PKGREVISION bump).
Diffstat (limited to 'mail/qmail')
-rw-r--r-- | mail/qmail/INSTALL | 6 | ||||
-rw-r--r-- | mail/qmail/Makefile | 76 | ||||
-rw-r--r-- | mail/qmail/distinfo | 7 | ||||
-rw-r--r-- | mail/qmail/options.mk | 17 | ||||
-rw-r--r-- | mail/qmail/patches/patch-aa | 53 | ||||
-rw-r--r-- | mail/qmail/patches/patch-ab | 15 |
6 files changed, 134 insertions, 40 deletions
diff --git a/mail/qmail/INSTALL b/mail/qmail/INSTALL index 1180956a2a2..80dadac1ef9 100644 --- a/mail/qmail/INSTALL +++ b/mail/qmail/INSTALL @@ -1,7 +1,8 @@ -# $NetBSD: INSTALL,v 1.4 2004/12/21 05:32:56 schmonz Exp $ +# $NetBSD: INSTALL,v 1.5 2011/06/07 02:53:42 schmonz Exp $ DOCDIR=@DOCDIR@ EGDIR=@EGDIR@ +PKGMANDIR=@PKGMANDIR@ QMAILDIR=@QMAILDIR@ QMAIL_QUEUE_DIR=@QMAIL_QUEUE_DIR@ QMAIL_QUEUE_EXTRA=@QMAIL_QUEUE_EXTRA@ @@ -40,12 +41,13 @@ EOF exit 1 fi + # keep in sync with Makefile:pre-install ${LN} -s ${PKG_SYSCONFDIR}/alias ${QMAILDIR}/alias ${LN} -s ${PREFIX}/bin ${QMAILDIR}/bin ${LN} -s ${EGDIR}/boot ${QMAILDIR}/boot ${LN} -s ${PKG_SYSCONFDIR}/control ${QMAILDIR}/control ${LN} -s ${DOCDIR} ${QMAILDIR}/doc - ${LN} -s ${PREFIX}/man ${QMAILDIR}/man + ${LN} -s ${PREFIX}/${PKGMANDIR} ${QMAILDIR}/man ${LN} -s ${QMAIL_QUEUE_DIR} ${QMAILDIR}/queue ${LN} -s ${PKG_SYSCONFDIR}/users ${QMAILDIR}/users diff --git a/mail/qmail/Makefile b/mail/qmail/Makefile index 380da8223cc..f10dc7503ae 100644 --- a/mail/qmail/Makefile +++ b/mail/qmail/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.59 2009/05/19 09:07:14 wiz Exp $ +# $NetBSD: Makefile,v 1.60 2011/06/07 02:53:42 schmonz Exp $ # DISTNAME= ${PKGNAME_NOREV} @@ -27,23 +27,28 @@ NOT_FOR_UNPRIVILEGED= yes WRKSRC= ${WRKDIR}/${DISTNAME} +PKG_DESTDIR_SUPPORT= destdir PKG_INSTALLATION_TYPES= overwrite pkgviews USE_TOOLS+= nroff +DJB_CONFIG_CMDS= ${ECHO} ${DESTDIR:Q}${QMAILDIR:Q} > conf-destdir DJB_BUILD_TARGETS= man DJB_RESTRICTED= no -MAKE_DIRS+= ${PKG_SYSCONFDIR} ${PKG_SYSCONFDIR}/alias -MAKE_DIRS+= ${PKG_SYSCONFDIR}/control ${PKG_SYSCONFDIR}/users -OWN_DIRS+= ${QMAILDIR} ${QMAIL_QUEUE_DIR} PKG_SYSCONFSUBDIR= qmail +OWN_DIRS+= ${PKG_SYSCONFDIR} ${PKG_SYSCONFDIR}/alias +OWN_DIRS+= ${PKG_SYSCONFDIR}/control ${PKG_SYSCONFDIR}/users +OWN_DIRS+= ${QMAILDIR} ${QMAIL_QUEUE_DIR} DOCDIR= ${PREFIX}/share/doc/qmail EGDIR= ${PREFIX}/share/examples/qmail SHAREDIR= ${PREFIX}/share/qmail +PLIST_SUBST+= DARWINSUFX=${DARWINSUFX:Q} MESSAGE_SUBST+= DOCDIR=${DOCDIR:Q} EGDIR=${EGDIR:Q} -FILES_SUBST+= DOCDIR=${DOCDIR:Q} EGDIR=${EGDIR:Q} SHAREDIR=${SHAREDIR:Q} -FILES_SUBST+= QMAILDIR=${QMAILDIR:Q} QMAIL_QUEUE_DIR=${QMAIL_QUEUE_DIR:Q} +FILES_SUBST+= DOCDIR=${DOCDIR:Q} EGDIR=${EGDIR:Q} +FILES_SUBST+= PKGMANDIR=${PKGMANDIR:Q} SHAREDIR=${SHAREDIR:Q} +FILES_SUBST+= QMAILDIR=${QMAILDIR:Q} +FILES_SUBST+= QMAIL_QUEUE_DIR=${QMAIL_QUEUE_DIR:Q} FILES_SUBST+= QMAIL_QUEUE_EXTRA=${QMAIL_QUEUE_EXTRA:Q} FILES_SUBST+= VIRUSCAN_SIGS_SRCFILE=${VIRUSCAN_SIGS_SRCFILE:Q} FILES_SUBST+= PKGNAME=${PKGNAME:Q} @@ -57,8 +62,9 @@ MANDIRS= man MANDIRS+= man/${i}${j} . endfor .endfor -INSTALLATION_DIRS= bin ${MANDIRS} -INSTALLATION_DIRS+= share/doc/qmail share/examples/qmail/boot share/qmail +INSTALLATION_DIRS= bin ${MANDIRS} ${DOCDIR} ${SHAREDIR} +INSTALLATION_DIRS+= ${EGDIR}/alias ${EGDIR}/boot ${EGDIR}/control +INSTALLATION_DIRS+= ${EGDIR}/users .include "../../mk/bsd.prefs.mk" @@ -80,12 +86,18 @@ SUBST_SED.logging+= -e 's|""|${QUEUE_EXTRA}|g' SUBST_MESSAGE.logging= Setting QUEUE_EXTRA. .endif +SUBST_CLASSES+= caseclash +SUBST_STAGE.caseclash= do-configure +SUBST_FILES.caseclash= hier.c +SUBST_SED.caseclash= -e 's|"INSTALL"|"INSTALL${DARWINSUFX}"|g' +SUBST_SED.caseclash+= -e 's|"SENDMAIL"|"SENDMAIL${DARWINSUFX}"|g' + SUBST_CLASSES+= paths -SUBST_FILES.paths= ${WRKDIR}/README.pkgsrc -SUBST_SED.paths+= -e 's,@PKGNAME@,${PKGNAME:Q},g' +SUBST_STAGE.paths= do-configure +SUBST_FILES.paths= README.pkgsrc +SUBST_SED.paths= -e 's,@PKGNAME@,${PKGNAME:Q},g' SUBST_SED.paths+= -e 's,@PKG_INFO@,${PKG_INFO:Q},g' SUBST_SED.paths+= -e 's,@GREP@,${GREP:Q},g' -SUBST_STAGE.paths= post-patch SUBST_FILES.djbware+= cdb_seek.c dns.c @@ -101,31 +113,57 @@ PKG_HOME.alias= ${QMAILDIR}/alias SPECIAL_PERMS+= ${PREFIX}/bin/qmail-queue qmailq qmail 4555 +.if ${OPSYS} == "Darwin" +DARWINSUFX= .doc +.else +DARWINSUFX= # empty +.endif + post-extract: - ${CP} ${FILESDIR}/README.pkgsrc ${WRKDIR}/README.pkgsrc + ${CP} ${FILESDIR}/README.pkgsrc ${WRKSRC} +. for i in INSTALL SENDMAIL + mv ${WRKSRC}/${i} ${WRKSRC}/${i}${DARWINSUFX} +. endfor + +pre-install: +. if ${USE_DESTDIR} != "no" + ${MKDIR} ${DESTDIR}${QMAILDIR} + ${MKDIR} ${DESTDIR}${QMAIL_QUEUE_DIR} + # keep in sync with INSTALL:PRE-INSTALL + ${LN} -s ${DESTDIR}${EGDIR}/alias ${DESTDIR}${QMAILDIR}/alias + ${LN} -s ${DESTDIR}${PREFIX}/bin ${DESTDIR}${QMAILDIR}/bin + ${LN} -s ${DESTDIR}${EGDIR}/boot ${DESTDIR}${QMAILDIR}/boot + ${LN} -s ${DESTDIR}${EGDIR}/control ${DESTDIR}${QMAILDIR}/control + ${LN} -s ${DESTDIR}${DOCDIR} ${DESTDIR}${QMAILDIR}/doc + ${LN} -s ${DESTDIR}${PREFIX}/${PKGMANDIR} ${DESTDIR}${QMAILDIR}/man + ${LN} -s ${DESTDIR}${QMAIL_QUEUE_DIR} ${DESTDIR}${QMAILDIR}/queue + ${LN} -s ${DESTDIR}${EGDIR}/users ${DESTDIR}${QMAILDIR}/users +. endif post-install: # qmail's installer sets strange permissions, set them back . if (${PKG_INSTALLATION_TYPE} == "overwrite") . for i in bin boot - ${CHGRP} ${BINGRP} ${QMAILDIR}/${i} + ${CHGRP} ${BINGRP} ${DESTDIR}${QMAILDIR}/${i} . endfor . for i in doc - ${CHGRP} ${SHAREGRP} ${QMAILDIR}/${i} + ${CHGRP} ${SHAREGRP} ${DESTDIR}${QMAILDIR}/${i} . endfor . for i in ${MANDIRS} - ${CHGRP} ${MANGRP} ${QMAILDIR}/${i} + ${CHGRP} ${MANGRP} ${DESTDIR}${QMAILDIR}/${i} . endfor . endif - ${INSTALL_DATA} ${WRKDIR}/README.pkgsrc ${DOCDIR} + ${INSTALL_DATA} ${WRKSRC}/README.pkgsrc ${DESTDIR}${DOCDIR} - ${INSTALL_PROGRAM_DIR} ${SHAREDIR}/setup + ${INSTALL_PROGRAM_DIR} ${DESTDIR}${SHAREDIR}/setup for i in ${SETUP_PROGRAMS}; do \ - ${INSTALL_PROGRAM} ${WRKSRC}/$$i ${SHAREDIR}/setup; \ + ${INSTALL_PROGRAM} ${WRKSRC}/$$i \ + ${DESTDIR}${SHAREDIR}/setup; \ done for i in ${SETUP_SCRIPTS}; do \ - ${INSTALL_SCRIPT} ${WRKSRC}/$$i ${SHAREDIR}/setup; \ + ${INSTALL_SCRIPT} ${WRKSRC}/$$i \ + ${DESTDIR}${SHAREDIR}/setup; \ done .include "../../mk/djbware.mk" diff --git a/mail/qmail/distinfo b/mail/qmail/distinfo index 4e0dc953ea4..7642a52a1a7 100644 --- a/mail/qmail/distinfo +++ b/mail/qmail/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.18 2008/03/20 03:30:32 schmonz Exp $ +$NetBSD: distinfo,v 1.19 2011/06/07 02:53:42 schmonz Exp $ SHA1 (qmail-1.03.tar.gz) = 18fb960481291a0503e93a94df3f6094edb7f27a RMD160 (qmail-1.03.tar.gz) = b851f273f1d365d38efd949b1efcf35768ffa30f @@ -12,9 +12,6 @@ Size (badrcptto.patch) = 3033 bytes SHA1 (qmail-103.patch) = dfb9cdabe91449dad2117115177b0a6a356baa9f RMD160 (qmail-103.patch) = 437f8b3063438bbd82c59557333b3566214afa9c Size (qmail-103.patch) = 2104 bytes -SHA1 (panther.patch) = 57c64d8fff7702b2196d7b06d3e95ee9b8ff0e77 -RMD160 (panther.patch) = d51d409b06202bdf87c7cc687eca5895d90a2f7c -Size (panther.patch) = 2563 bytes SHA1 (outgoingip.patch) = c37b50facc72f82cad6505d2db88d5eccc5418b2 RMD160 (outgoingip.patch) = 032c653d395e5f599c0998e92debb09d84f90f0f Size (outgoingip.patch) = 6839 bytes @@ -33,3 +30,5 @@ Size (qmail-smtpd-viruscan-1.3.patch) = 8891 bytes SHA1 (qmail-smtpd-viruscan-logging.patch) = ca7105b5561cf280e9e3a465d2d68a16673ff56c RMD160 (qmail-smtpd-viruscan-logging.patch) = 79631cb7b5b120f98397011c4fb94726c48b83e4 Size (qmail-smtpd-viruscan-logging.patch) = 2157 bytes +SHA1 (patch-aa) = 2c8c50889cbc7da8c51bf6d44c0b31f5f0853896 +SHA1 (patch-ab) = 15e6466c655058664cb660e5e12232bf45010814 diff --git a/mail/qmail/options.mk b/mail/qmail/options.mk index 4273854d95b..bf058aebd24 100644 --- a/mail/qmail/options.mk +++ b/mail/qmail/options.mk @@ -1,15 +1,11 @@ -# $NetBSD: options.mk,v 1.30 2008/04/12 22:43:04 jlam Exp $ +# $NetBSD: options.mk,v 1.31 2011/06/07 02:53:42 schmonz Exp $ PKG_OPTIONS_VAR= PKG_OPTIONS.qmail PKG_OPTIONS_OPTIONAL_GROUPS= rcpt PKG_OPTIONS_GROUP.rcpt= qmail-badrcptto qmail-qregex qmail-realrcptto -PKG_SUPPORTED_OPTIONS+= darwin sasl syncdir tls qmail-bigdns qmail-netqmail +PKG_SUPPORTED_OPTIONS+= sasl syncdir tls qmail-bigdns qmail-netqmail PKG_SUPPORTED_OPTIONS+= qmail-outgoingip qmail-viruscan -.if ${OPSYS} == "Darwin" -PKG_SUGGESTED_OPTIONS+= darwin -.endif - .include "../../mk/bsd.options.mk" .if !empty(PKG_OPTIONS:Mqmail-badrcptto) @@ -26,15 +22,6 @@ SITES.${BIGDNS_PATCH}= http://www.ckdhr.com/ckd/ PATCH_DIST_STRIP.${BIGDNS_PATCH}= -p1 .endif -PLIST_SUBST+= DARWINSUFX="" -.if !empty(PKG_OPTIONS:Mdarwin) -DARWIN_PATCH= panther.patch -PATCHFILES+= ${DARWIN_PATCH} -SITES.${DARWIN_PATCH}= http://http.netdevice.com:9080/qmail/patch/ -PATCH_DIST_STRIP.${DARWIN_PATCH}= -p1 -PLIST_SUBST+= DARWINSUFX=".doc" -.endif - .if !empty(PKG_OPTIONS:Mqmail-netqmail) DISTNAME= netqmail-1.06 .endif diff --git a/mail/qmail/patches/patch-aa b/mail/qmail/patches/patch-aa new file mode 100644 index 00000000000..e7eedd444c3 --- /dev/null +++ b/mail/qmail/patches/patch-aa @@ -0,0 +1,53 @@ +$NetBSD: patch-aa,v 1.4 2011/06/07 02:53:42 schmonz Exp $ + +DESTDIR support. + +--- Makefile.orig 1998-06-15 10:53:16.000000000 +0000 ++++ Makefile +@@ -78,6 +78,14 @@ auto_break.o: \ + compile auto_break.c + ./compile auto_break.c + ++auto_destdir.c: \ ++auto-str conf-destdir ++ ./auto-str auto_qmail `head -1 conf-destdir` > auto_destdir.c ++ ++auto_destdir.o: \ ++compile auto_destdir.c ++ ./compile auto_destdir.c ++ + auto_patrn.c: \ + auto-int8 conf-patrn + ./auto-int8 auto_patrn `head -1 conf-patrn` > auto_patrn.c +@@ -740,15 +748,15 @@ seek.h fork.h + ./compile idedit.c + + install: \ +-load install.o fifo.o hier.o auto_qmail.o auto_split.o auto_uids.o \ ++load install.o fifo.o hier.o auto_destdir.o auto_split.o auto_uids.o \ + strerr.a substdio.a open.a error.a str.a fs.a +- ./load install fifo.o hier.o auto_qmail.o auto_split.o \ ++ ./load install fifo.o hier.o auto_destdir.o auto_split.o \ + auto_uids.o strerr.a substdio.a open.a error.a str.a fs.a + + install-big: \ +-load install-big.o fifo.o install.o auto_qmail.o auto_split.o \ ++load install-big.o fifo.o install.o auto_destdir.o auto_split.o \ + auto_uids.o strerr.a substdio.a open.a error.a str.a fs.a +- ./load install-big fifo.o install.o auto_qmail.o \ ++ ./load install-big fifo.o install.o auto_destdir.o \ + auto_split.o auto_uids.o strerr.a substdio.a open.a error.a \ + str.a fs.a + +@@ -763,9 +771,9 @@ exit.h + ./compile install.c + + instcheck: \ +-load instcheck.o fifo.o hier.o auto_qmail.o auto_split.o auto_uids.o \ ++load instcheck.o fifo.o hier.o auto_destdir.o auto_split.o auto_uids.o \ + strerr.a substdio.a error.a str.a fs.a +- ./load instcheck fifo.o hier.o auto_qmail.o auto_split.o \ ++ ./load instcheck fifo.o hier.o auto_destdir.o auto_split.o \ + auto_uids.o strerr.a substdio.a error.a str.a fs.a + + instcheck.o: \ diff --git a/mail/qmail/patches/patch-ab b/mail/qmail/patches/patch-ab new file mode 100644 index 00000000000..28a63568bca --- /dev/null +++ b/mail/qmail/patches/patch-ab @@ -0,0 +1,15 @@ +$NetBSD: patch-ab,v 1.4 2011/06/07 02:53:42 schmonz Exp $ + +Compile on Darwin. + +--- strerr_sys.c.orig 1998-06-15 10:53:16.000000000 +0000 ++++ strerr_sys.c +@@ -1,7 +1,7 @@ + #include "error.h" + #include "strerr.h" + +-struct strerr strerr_sys; ++struct strerr strerr_sys = {0,0,0,0}; + + void strerr_sysinit() + { |