summaryrefslogtreecommitdiff
path: root/mail/nmh
diff options
context:
space:
mode:
authorjmmv <jmmv>2005-01-16 19:19:46 +0000
committerjmmv <jmmv>2005-01-16 19:19:46 +0000
commite6ddb2c17ddd504bf9752b5c6fa2db9d0d9e0f45 (patch)
tree1b199e5a134d1e5763d8aa636d40b17891b9ebc1 /mail/nmh
parenteb95f687af714dfda87ae810b385600fc19c14ab (diff)
downloadpkgsrc-e6ddb2c17ddd504bf9752b5c6fa2db9d0d9e0f45.tar.gz
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 (limited to 'mail/nmh')
-rw-r--r--mail/nmh/DEINSTALL22
-rw-r--r--mail/nmh/INSTALL42
-rw-r--r--mail/nmh/Makefile56
-rw-r--r--mail/nmh/PLIST60
-rw-r--r--mail/nmh/distinfo6
-rw-r--r--mail/nmh/patches/patch-ca42
-rw-r--r--mail/nmh/patches/patch-cj34
7 files changed, 142 insertions, 120 deletions
diff --git a/mail/nmh/DEINSTALL b/mail/nmh/DEINSTALL
deleted file mode 100644
index 853408ede92..00000000000
--- a/mail/nmh/DEINSTALL
+++ /dev/null
@@ -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 --git a/mail/nmh/INSTALL b/mail/nmh/INSTALL
deleted file mode 100644
index 056826a07dc..00000000000
--- a/mail/nmh/INSTALL
+++ /dev/null
@@ -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 --git a/mail/nmh/Makefile b/mail/nmh/Makefile
index 0fbaf70f1c1..408d8bfcaed 100644
--- a/mail/nmh/Makefile
+++ b/mail/nmh/Makefile
@@ -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 @@ CONFLICTS+= ja-mh6-[0-9]*
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 @@ CONFIGURE_ARGS+= --without-krb4
.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 @@ post-configure:
< ${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 --git a/mail/nmh/PLIST b/mail/nmh/PLIST
index d4a8c0ec626..de6feed3288 100644
--- a/mail/nmh/PLIST
+++ b/mail/nmh/PLIST
@@ -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/sortm
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/FAQ
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 --git a/mail/nmh/distinfo b/mail/nmh/distinfo
index b0f3bb4fa25..cab910632d0 100644
--- a/mail/nmh/distinfo
+++ b/mail/nmh/distinfo
@@ -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 --git a/mail/nmh/patches/patch-ca b/mail/nmh/patches/patch-ca
index 2b4b2e8d2e9..3165fa77a55 100644
--- a/mail/nmh/patches/patch-ca
+++ b/mail/nmh/patches/patch-ca
@@ -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 @@ Install configuration files as <conf-file>.dist
# 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
+
+ install-files:
+- $(top_srcdir)/mkinstalldirs $(etcdir)
++ $(top_srcdir)/mkinstalldirs $(egdir)
+ for file in $(DIST_FILES); do \
+- if [ -f $(etcdir)/$$file ]; then \
+- mv $(etcdir)/$$file $(etcdir)/$$file.old; \
++ if [ -f $(egdir)/$$file ]; then \
++ mv $(egdir)/$$file $(egdir)/$$file.old; \
+ fi; \
+- $(INSTALL_DATA) $(srcdir)/$$file $(etcdir)/$$file; \
++ $(INSTALL_DATA) $(srcdir)/$$file $(egdir)/$$file; \
done
for file in $(GEN_FILES); do \
- if [ -f $(etcdir)/$$file ]; then \
- mv $(etcdir)/$$file $(etcdir)/$$file.old; \
-+ if [ -f $(etcdir)/$$file.dist ]; then \
-+ mv $(etcdir)/$$file.dist $(etcdir)/$$file.old; \
++ if [ -f $(egdir)/$$file ]; then \
++ mv $(egdir)/$$file $(egdir)/$$file.old; \
fi; \
- $(INSTALL_DATA) $$file $(etcdir)/$$file; \
-+ $(INSTALL_DATA) $$file $(etcdir)/$$file.dist; \
++ $(INSTALL_DATA) $$file $(egdir)/$$file; \
done
install-scripts:
@@ -34,3 +54,11 @@ Install configuration files as <conf-file>.dist
done
uninstall: uninstall-files uninstall-scripts
+
+ uninstall-files:
+ for file in $(FILES); do \
+- rm -f $(etcdir)/$$file; \
++ rm -f $(egdir)/$$file; \
+ done
+
+ uninstall-scripts:
diff --git a/mail/nmh/patches/patch-cj b/mail/nmh/patches/patch-cj
index d876c88fb83..a1a93026e59 100644
--- a/mail/nmh/patches/patch-cj
+++ b/mail/nmh/patches/patch-cj
@@ -1,10 +1,18 @@
-$NetBSD: patch-cj,v 1.1 2004/01/06 09:18:21 cjep Exp $
+$NetBSD: patch-cj,v 1.2 2005/01/16 19:19:46 jmmv Exp $
Add manual links for folders and flists (PR#23466).
--- man/Makefile.in.orig 2000-01-27 20:14:58.000000000 +0000
+++ man/Makefile.in 2004-01-02 20:38:09.000000000 +0000
-@@ -78,6 +78,9 @@
+@@ -17,6 +17,7 @@
+ bindir = @bindir@
+ libdir = @libdir@
+ etcdir = @sysconfdir@
++egdir = @prefix@/share/examples/nmh
+ mandir = @mandir@
+ manext1 = 1
+ manext5 = 5
+@@ -78,6 +79,9 @@
fmtdump.$(manext8) install-mh.$(manext8) mh-mts.$(manext8) \
post.$(manext8)
@@ -14,7 +22,18 @@ Add manual links for folders and flists (PR#23466).
# source for man pages
DIST_MAN = ali.man anno.man ap.man burst.man comp.man conflict.man \
dist.man dp.man flist.man fmtdump.man folder.man forw.man \
-@@ -138,6 +141,14 @@
+@@ -129,8 +133,8 @@
+
+ # install the include file for man pages
+ install-hdr:
+- $(top_srcdir)/mkinstalldirs $(etcdir)
+- $(INSTALL_DATA) tmac.h $(etcdir)/tmac.h
++ $(top_srcdir)/mkinstalldirs $(egdir)
++ $(INSTALL_DATA) tmac.h $(egdir)/tmac.h
+
+ # install the man pages in man1
+ install-man1:
+@@ -138,6 +142,14 @@
for file in $(MAN1); do \
$(INSTALL_DATA) $$file $(mandir)/man$(manext1) ; \
done
@@ -29,3 +48,12 @@ Add manual links for folders and flists (PR#23466).
# install the man pages in man5
install-man5:
+@@ -163,7 +175,7 @@
+
+ # uninstall the include file for man pages
+ uninstall-hdr:
+- rm -f $(etcdir)/tmac.h
++ rm -f $(egdir)/tmac.h
+
+ # uninstall the man pages in man1
+ uninstall-man1: