pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mail/nmh Make this package honour PKG_SYSCONFDIR by co...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/24fa7db63a8d
branches:  trunk
changeset: 487544:24fa7db63a8d
user:      jmmv <jmmv%pkgsrc.org@localhost>
date:      Sun Jan 16 19:19:46 2005 +0000

description:
Make this package honour PKG_SYSCONFDIR by copying the configuration files
into the examples hierarchy and using bsd.pkg.install.mk to copy them into
place.  While here, sort PLIST.  Bump PKGREVISION to 6.

Patch from PR pkg/28978 made by Greg A. Woods with very slight modifications
by me.

diffstat:

 mail/nmh/DEINSTALL        |  22 -----------------
 mail/nmh/INSTALL          |  42 --------------------------------
 mail/nmh/Makefile         |  56 +++++++++++++++++++++++++++++++++----------
 mail/nmh/PLIST            |  60 +++++++++++++++++++++++-----------------------
 mail/nmh/distinfo         |   6 ++--
 mail/nmh/patches/patch-ca |  42 +++++++++++++++++++++++++++-----
 mail/nmh/patches/patch-cj |  34 ++++++++++++++++++++++++--
 7 files changed, 142 insertions(+), 120 deletions(-)

diffs (truncated from 395 to 300 lines):

diff -r 2a7ad29a0a22 -r 24fa7db63a8d mail/nmh/DEINSTALL
--- a/mail/nmh/DEINSTALL        Sun Jan 16 18:15:55 2005 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: DEINSTALL,v 1.2 2003/08/30 20:22:57 jlam Exp $
-
-PKGNAME=$1
-STAGE=$2
-
-case ${STAGE} in
-POST-DEINSTALL)
-       CONFDIR=${PKG_PREFIX}/etc/nmh
-
-       cat << EOF
-===========================================================================
-If you won't be using ${PKGNAME} any longer, you may want to remove the
-following directories:
-
-       ${CONFDIR}
-===========================================================================
-EOF
-       ;;
-esac
-exit 0
diff -r 2a7ad29a0a22 -r 24fa7db63a8d mail/nmh/INSTALL
--- a/mail/nmh/INSTALL  Sun Jan 16 18:15:55 2005 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-#! /bin/sh
-#
-# $NetBSD: INSTALL,v 1.3 2003/08/30 20:22:57 jlam Exp $
-#
-
-PKGNAME=$1
-STAGE=$2
-
-case ${STAGE} in
-POST-INSTALL)
-       CONFDIR=${PKG_PREFIX}/etc/nmh
-
-       echo "Installing configuration files:"
-       for file in \
-               mhn.defaults \
-               mts.conf
-       do
-               if [ -f ${CONFDIR}/${file} ]
-               then
-                       echo "    ${CONFDIR}/${file} already exists"
-               else
-                       echo "    ${CONFDIR}/${file}"
-                       cp ${CONFDIR}/${file}.dist ${CONFDIR}/${file}
-                       chmod 644 ${CONFDIR}/${file}
-               fi
-       done
-       cat << EOF
-=============================================================
-
-Some files you might need to customize include the following:
-
-    ${PKG_PREFIX}/etc/nmh/mhn.defaults
-    ${PKG_PREFIX}/etc/nmh/mts.conf
-
-In particular, edit mts.conf to point to an available SMTP
-server if you are not running one locally.
-
-=============================================================
-EOF
-       ;;
-esac
-exit 0
diff -r 2a7ad29a0a22 -r 24fa7db63a8d mail/nmh/Makefile
--- a/mail/nmh/Makefile Sun Jan 16 18:15:55 2005 +0000
+++ b/mail/nmh/Makefile Sun Jan 16 19:19:46 2005 +0000
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.54 2004/01/02 20:54:17 cjep Exp $
+# $NetBSD: Makefile,v 1.55 2005/01/16 19:19:46 jmmv Exp $
 # FreeBSD Id: Makefile,v 1.2 1997/08/04 06:51:28 markm Exp
 #
 
 DISTNAME=              nmh-1.0.4
-PKGREVISION=           5
+PKGREVISION=           6
 CATEGORIES=            mail
 MASTER_SITES=          ftp://ftp.mhost.com/pub/nmh/ \
                        ftp://ftp.gw.com/pub/unix/mail/mh/nmh/
@@ -27,8 +27,10 @@
 NMH_MTA?=              smtp
 
 GNU_CONFIGURE=         # defined
+USE_PKGINSTALL=                yes
+
 CONFIGURE_ARGS+=       --libdir=${PREFIX}/libexec/nmh
-CONFIGURE_ARGS+=       --sysconfdir=${PREFIX}/etc/nmh
+CONFIGURE_ARGS+=       --sysconfdir=${PKG_SYSCONFDIR}
 CONFIGURE_ARGS+=       --enable-nmh-pop
 CONFIGURE_ARGS+=       --with-mts=${NMH_MTA}
 
@@ -51,9 +53,43 @@
 .endif
 
 DOCDIR=                        share/doc/nmh
+EGDIR=                 ${PREFIX}/share/examples/nmh
 
 BUILD_DEFS+=           NMH_MTA NMH_EDITOR NMH_PAGER NMH_HASH_BACKUP
 
+PKG_SYSCONFSUBDIR=     nmh
+CONF_FILES=            # empty
+.for f in              MailAliases             \
+                       components              \
+                       digestcomps             \
+                       distcomps               \
+                       forwcomps               \
+                       mhl.body                \
+                       mhl.digest              \
+                       mhl.format              \
+                       mhl.forward             \
+                       mhl.headers             \
+                       mhl.reply               \
+                       mhn.defaults            \
+                       mts.conf                \
+                       rcvdistcomps            \
+                       rcvdistcomps.outbox     \
+                       replcomps               \
+                       replgroupcomps          \
+                       scan.MMDDYY             \
+                       scan.YYYYMMDD           \
+                       scan.default            \
+                       scan.mailx              \
+                       scan.nomime             \
+                       scan.size               \
+                       scan.time               \
+                       scan.timely             \
+                       scan.unseen             \
+                       tmac.h
+CONF_FILES+=           ${EGDIR}/${f} ${PKG_SYSCONFDIR}/${f}
+.endfor
+.undef f
+
 .if defined(NMH_HASH_BACKUP) && (${NMH_HASH_BACKUP} == yes)
 post-configure:
        ${MV} ${WRKSRC}/config.h ${WRKSRC}/config.h.bak
@@ -61,21 +97,15 @@
            < ${WRKSRC}/config.h.bak > ${WRKSRC}/config.h
 .endif
 
-# ABOUT CONFIGURATION FILES:
-# - mhn.defaults is generated by nmh during make; we don't use that
-#   copy because its contents depend on what happened to be installed
-#   on the build system; we want a reliably reconstructable package
-# - mhn.defaults and mts.conf are only created if they don't exist;
-#   the PLIST only has mhn.defaults.dist and mts.conf.dist, so that
-#   local modifications to the configuration files won't get lost on
-#   upgrading the package
+# This hopefully makes sure the permissions and ownership are right.
+pre-install:
+       ${INSTALL_DATA_DIR} ${EGDIR}
 
 post-install:
        ${INSTALL_DATA_DIR} ${PREFIX}/${DOCDIR}
        for f in `${GREP} '^${DOCDIR}/' ${PKGDIR}/PLIST`; do \
            ${INSTALL_DATA} ${WRKSRC}/`${BASENAME} $$f` ${PREFIX}/${DOCDIR}; \
        done
-       ${INSTALL_DATA} ${FILESDIR}/mhn.defaults.dist ${PREFIX}/etc/nmh
-       PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL
+       ${INSTALL_DATA} ${FILESDIR}/mhn.defaults.dist ${EGDIR}/mhn.defaults
 
 .include "../../mk/bsd.pkg.mk"
diff -r 2a7ad29a0a22 -r 24fa7db63a8d mail/nmh/PLIST
--- a/mail/nmh/PLIST    Sun Jan 16 18:15:55 2005 +0000
+++ b/mail/nmh/PLIST    Sun Jan 16 19:19:46 2005 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.4 2004/01/02 20:54:17 cjep Exp $
+@comment $NetBSD: PLIST,v 1.5 2005/01/16 19:19:46 jmmv Exp $
 bin/ali
 bin/anno
 bin/burst
@@ -38,33 +38,6 @@
 bin/viamail
 bin/whatnow
 bin/whom
-etc/nmh/MailAliases
-etc/nmh/components
-etc/nmh/digestcomps
-etc/nmh/distcomps
-etc/nmh/forwcomps
-etc/nmh/mhl.body
-etc/nmh/mhl.digest
-etc/nmh/mhl.format
-etc/nmh/mhl.forward
-etc/nmh/mhl.headers
-etc/nmh/mhl.reply
-etc/nmh/mhn.defaults.dist
-etc/nmh/mts.conf.dist
-etc/nmh/rcvdistcomps
-etc/nmh/rcvdistcomps.outbox
-etc/nmh/replcomps
-etc/nmh/replgroupcomps
-etc/nmh/scan.MMDDYY
-etc/nmh/scan.YYYYMMDD
-etc/nmh/scan.default
-etc/nmh/scan.mailx
-etc/nmh/scan.nomime
-etc/nmh/scan.size
-etc/nmh/scan.time
-etc/nmh/scan.timely
-etc/nmh/scan.unseen
-etc/nmh/tmac.h
 libexec/nmh/ap
 libexec/nmh/conflict
 libexec/nmh/dp
@@ -148,6 +121,33 @@
 share/doc/nmh/MAIL.FILTERING
 share/doc/nmh/README
 share/doc/nmh/TODO
-@dirrm libexec/nmh
+share/examples/nmh/MailAliases
+share/examples/nmh/components
+share/examples/nmh/digestcomps
+share/examples/nmh/distcomps
+share/examples/nmh/forwcomps
+share/examples/nmh/mhl.body
+share/examples/nmh/mhl.digest
+share/examples/nmh/mhl.format
+share/examples/nmh/mhl.forward
+share/examples/nmh/mhl.headers
+share/examples/nmh/mhl.reply
+share/examples/nmh/mhn.defaults
+share/examples/nmh/mts.conf
+share/examples/nmh/rcvdistcomps
+share/examples/nmh/rcvdistcomps.outbox
+share/examples/nmh/replcomps
+share/examples/nmh/replgroupcomps
+share/examples/nmh/scan.MMDDYY
+share/examples/nmh/scan.YYYYMMDD
+share/examples/nmh/scan.default
+share/examples/nmh/scan.mailx
+share/examples/nmh/scan.nomime
+share/examples/nmh/scan.size
+share/examples/nmh/scan.time
+share/examples/nmh/scan.timely
+share/examples/nmh/scan.unseen
+share/examples/nmh/tmac.h
+@dirrm share/examples/nmh
 @dirrm share/doc/nmh
-@unexec ${RMDIR} %D/etc/nmh 2>/dev/null || ${TRUE}
+@dirrm libexec/nmh
diff -r 2a7ad29a0a22 -r 24fa7db63a8d mail/nmh/distinfo
--- a/mail/nmh/distinfo Sun Jan 16 18:15:55 2005 +0000
+++ b/mail/nmh/distinfo Sun Jan 16 19:19:46 2005 +0000
@@ -1,11 +1,11 @@
-$NetBSD: distinfo,v 1.8 2004/05/04 06:18:14 mrg Exp $
+$NetBSD: distinfo,v 1.9 2005/01/16 19:19:46 jmmv Exp $
 
 SHA1 (nmh-1.0.4.tar.gz) = 71441a884d898db2fd9184a92e663682536425f5
 Size (nmh-1.0.4.tar.gz) = 683215 bytes
 SHA1 (patch-aa) = 88e3e0445cb0102bb3748eb2c9503950ae631931
-SHA1 (patch-ca) = 43aaf15dc5d07de03ff912894d7128d03eb1889d
+SHA1 (patch-ca) = 126d53b3af216754c40b828d7c444a6ee077073f
 SHA1 (patch-cb) = 6e498988c08e393fdd4e8e27f2ff6ce457e2c803
 SHA1 (patch-cd) = 13901025ef3a1b7fc07d0c13f8e1aef3e9bee2d6
 SHA1 (patch-ce) = b93b07c3ee82e6ab8599f362e14ad2dbe1955325
 SHA1 (patch-ci) = 98f1c80281656d05c460bdb237de3efbf80b9e32
-SHA1 (patch-cj) = 1f8455ddeb9bf46cb8fd1663f904e8ae79d2b9da
+SHA1 (patch-cj) = cb6a8ca83a7a94651668a70c697c4ec5fa402b48
diff -r 2a7ad29a0a22 -r 24fa7db63a8d mail/nmh/patches/patch-ca
--- a/mail/nmh/patches/patch-ca Sun Jan 16 18:15:55 2005 +0000
+++ b/mail/nmh/patches/patch-ca Sun Jan 16 19:19:46 2005 +0000
@@ -1,11 +1,19 @@
-$NetBSD: patch-ca,v 1.4 2000/04/15 07:56:16 simonb Exp $
+$NetBSD: patch-ca,v 1.5 2005/01/16 19:19:46 jmmv Exp $
 
 Use ${INSTALL_SCRIPT} to install scripts
 Install configuration files as <conf-file>.dist
 
 --- etc/Makefile.in.orig       Wed Mar 15 07:40:47 2000
 +++ etc/Makefile.in    Sat Apr 15 17:13:49 2000
-@@ -23,6 +23,7 @@
+@@ -15,6 +15,7 @@
+ bindir      = @bindir@
+ libdir      = @libdir@
+ etcdir      = @sysconfdir@
++egdir       = @prefix@/share/examples/nmh
+ 
+ mailspool   = @mailspool@
+ masquerade  = @masquerade@
+@@ -23,6 +24,7 @@
  INSTALL         = @INSTALL@
  INSTALL_PROGRAM = @INSTALL_PROGRAM@
  INSTALL_DATA    = @INSTALL_DATA@
@@ -13,17 +21,29 @@
  
  # Path to search for programs to handle MIME
  # content.  Used to create mhn.defaults
-@@ -84,16 +85,16 @@
-         $(INSTALL_DATA) $(srcdir)/$$file $(etcdir)/$$file; \
+@@ -76,31 +78,31 @@
+ install: install-files install-scripts
+ 



Home | Main Index | Thread Index | Old Index