pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mail/qmail DESTDIR support, PKGMANDIR support, OS X fi...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/a6cd15ac3253
branches:  trunk
changeset: 589410:a6cd15ac3253
user:      schmonz <schmonz%pkgsrc.org@localhost>
date:      Tue Jun 07 02:53:42 2011 +0000

description:
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:

 mail/qmail/INSTALL          |   6 ++-
 mail/qmail/Makefile         |  76 +++++++++++++++++++++++++++++++++-----------
 mail/qmail/distinfo         |   7 +--
 mail/qmail/options.mk       |  17 +--------
 mail/qmail/patches/patch-aa |  53 +++++++++++++++++++++++++++++++
 mail/qmail/patches/patch-ab |  15 ++++++++
 6 files changed, 134 insertions(+), 40 deletions(-)

diffs (truncated from 309 to 300 lines):

diff -r 9bcef1646575 -r a6cd15ac3253 mail/qmail/INSTALL
--- a/mail/qmail/INSTALL        Mon Jun 06 16:20:32 2011 +0000
+++ b/mail/qmail/INSTALL        Tue Jun 07 02:53:42 2011 +0000
@@ -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 @@
                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 -r 9bcef1646575 -r a6cd15ac3253 mail/qmail/Makefile
--- a/mail/qmail/Makefile       Mon Jun 06 16:20:32 2011 +0000
+++ b/mail/qmail/Makefile       Tue Jun 07 02:53:42 2011 +0000
@@ -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 @@
 
 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
+PKG_SYSCONFSUBDIR=     qmail
+OWN_DIRS+=             ${PKG_SYSCONFDIR} ${PKG_SYSCONFDIR}/alias
+OWN_DIRS+=             ${PKG_SYSCONFDIR}/control ${PKG_SYSCONFDIR}/users
 OWN_DIRS+=             ${QMAILDIR} ${QMAIL_QUEUE_DIR}
-PKG_SYSCONFSUBDIR=     qmail
 
 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/${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_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 @@
 
 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 -r 9bcef1646575 -r a6cd15ac3253 mail/qmail/distinfo
--- a/mail/qmail/distinfo       Mon Jun 06 16:20:32 2011 +0000
+++ b/mail/qmail/distinfo       Tue Jun 07 02:53:42 2011 +0000
@@ -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 @@
 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 @@
 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 -r 9bcef1646575 -r a6cd15ac3253 mail/qmail/options.mk
--- a/mail/qmail/options.mk     Mon Jun 06 16:20:32 2011 +0000
+++ b/mail/qmail/options.mk     Tue Jun 07 02:53:42 2011 +0000
@@ -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 @@
 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 -r 9bcef1646575 -r a6cd15ac3253 mail/qmail/patches/patch-aa
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/qmail/patches/patch-aa       Tue Jun 07 02:53:42 2011 +0000
@@ -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 -r 9bcef1646575 -r a6cd15ac3253 mail/qmail/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/qmail/patches/patch-ab       Tue Jun 07 02:53:42 2011 +0000
@@ -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



Home | Main Index | Thread Index | Old Index