diff options
author | spz <spz> | 2008-12-21 16:00:04 +0000 |
---|---|---|
committer | spz <spz> | 2008-12-21 16:00:04 +0000 |
commit | 4f8e8444d375c180eca1f7acac1645d84f1b7673 (patch) | |
tree | 017ee3fc9d90394d218a7a1880ee8cbecccb099f /news/inn | |
parent | 8573d9b249f63a9f253b25b450cbd5b99239cc7d (diff) | |
download | pkgsrc-4f8e8444d375c180eca1f7acac1645d84f1b7673.tar.gz |
make package DESTDIR'able
Diffstat (limited to 'news/inn')
-rw-r--r-- | news/inn/Makefile | 68 | ||||
-rw-r--r-- | news/inn/PLIST | 25 | ||||
-rw-r--r-- | news/inn/distinfo | 4 | ||||
-rw-r--r-- | news/inn/files/innd.sh | 21 | ||||
-rw-r--r-- | news/inn/patches/patch-ah | 20 |
5 files changed, 70 insertions, 68 deletions
diff --git a/news/inn/Makefile b/news/inn/Makefile index 3888bebd43d..203d74f3b73 100644 --- a/news/inn/Makefile +++ b/news/inn/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.94 2008/12/21 11:55:25 spz Exp $ +# $NetBSD: Makefile,v 1.95 2008/12/21 16:00:04 spz Exp $ DISTNAME= inn-2.4.5 -PKGREVISION= 2 +PKGREVISION= 3 CATEGORIES= news MASTER_SITES= ftp://ftp.isc.org/isc/inn/ \ ftp://ftp.fu-berlin.de/unix/news/inn/ @@ -107,14 +107,27 @@ CFILES= actsync.cfg actsync.ign buffindexed.conf \ innreport.conf innwatch.ctl moderators \ motd.news news2mail.cf newsfeeds nnrpd.track \ nntpsend.ctl ovdb.conf overview.fmt passwd.nntp \ - radius.conf readers.conf sasl.conf storage.conf + radius.conf readers.conf sasl.conf storage.conf \ + subscriptions .for file in ${CFILES} CONF_FILES_PERMS+= ${EXAMPLEDIR}/${file} ${PKG_SYSCONFDIR}/${file} \ ${INN_USER} ${INN_GROUP} 0664 .endfor +CONF_FILES_PERMS+= ${EXAMPLEDIR}/active.minimal ${INN_DATA_DIR}/db/active ${INN_USER} ${INN_GROUP} 0664 +CONF_FILES_PERMS+= ${EXAMPLEDIR}/newsgroups.minimal ${INN_DATA_DIR}/db/newsgroups ${INN_USER} ${INN_GROUP} 0664 + +DBFILES= active.times history + +.for file in ${DBFILES} +CONF_FILES_PERMS+= ${EXAMPLEDIR}/${file} ${INN_DATA_DIR}/db/${file} \ + ${INN_USER} ${INN_GROUP} 0664 +.endfor + RCD_SCRIPTS= innd +PKG_DESTDIR_SUPPORT= destdir + .include "../../mk/bsd.prefs.mk" .if ${OPSYS} == "SunOS" @@ -130,43 +143,32 @@ GCC_REQD+= 2.95.3 .include "options.mk" pre-install: - ${INSTALL_DATA_DIR} ${EXAMPLEDIR} - for FILE in `ls -1 ${WRKSRC}/samples/* | \ - ${EGREP} -v '(Makefile|.*\.(in|orig)$$)'`; do \ - ${INSTALL_DATA} $$FILE ${EXAMPLEDIR}; \ + ${INSTALL_DATA_DIR} ${DESTDIR}${EXAMPLEDIR} + for FILE in ${CFILES} active.minimal newsgroups.minimal; do \ + ${INSTALL_DATA} ${WRKSRC}/site/$$FILE \ + ${DESTDIR}${EXAMPLEDIR}; \ + done + for FILE in ${DBFILES} ; do \ + ${TOUCH} ${WRKSRC}/site/$$FILE ; \ + ${INSTALL_DATA} ${WRKSRC}/site/$$FILE \ + ${DESTDIR}${EXAMPLEDIR}; \ done - # makedbz needs these earlier than pkgsrc will install them normally - if [ ! -f ${PKG_SYSCONFDIR}/inn.conf ] ; then \ - ${INSTALL} ${COPY} -o ${INN_USER} -g ${INN_GROUP} -m 0664 \ - ${EXAMPLEDIR}/inn.conf \ - ${PKG_SYSCONFDIR}/inn.conf ; \ - fi - if [ ! -d ${INN_DATA_DIR}/db ] ; then \ - ${INSTALL} -d -o ${INN_USER} ${INN_DATA_DIR}/db ; \ - fi - post-install: + ${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/etc/nntp + ${INSTALL_PROGRAM_DIR} ${DESTDIR}${PREFIX}/sbin for FILE in cnfsstat ctlinnd inndstart makehistory ; do \ - ${INSTALL} -l rs ${PREFIX}/${INN_PATHBIN}/$$FILE \ - ${PREFIX}/sbin/$$FILE ; \ + ${INSTALL} -l rs ${DESTDIR}${PREFIX}/${INN_PATHBIN}/$$FILE \ + ${DESTDIR}${PREFIX}/sbin/$$FILE ; \ done - ${INSTALL} -l rs ${PREFIX}/${INN_PATHBIN}/inews ${PREFIX}/bin/inews - ${INSTALL} -l rs ${PREFIX}/${INN_PATHBIN}/rnews ${PREFIX}/bin/rnews + ${INSTALL_PROGRAM_DIR} ${DESTDIR}${PREFIX}/bin + ${INSTALL} -l rs ${DESTDIR}${PREFIX}/${INN_PATHBIN}/inews \ + ${DESTDIR}${PREFIX}/bin/inews + ${INSTALL} -l rs ${DESTDIR}${PREFIX}/${INN_PATHBIN}/rnews \ + ${DESTDIR}${PREFIX}/bin/rnews for FILE in libinn.a libstorage.a libinnhist.a ; do \ - ${CHMOD} 644 ${PREFIX}/lib/$$FILE ; \ + ${CHMOD} 644 ${DESTDIR}${PREFIX}/lib/$$FILE ; \ done - if [ -d ${INN_DATA_DIR}/etc ] ; then \ - ${ECHO} "" ; \ - ${ECHO} "WARNING WARNING WARNING WARNING WARNING WARNING WARNING";\ - ${ECHO} "" ; \ - ${ECHO} "WARNING: old inn config directory ${INN_DATA_DIR}/etc found";\ - ${ECHO} "WARNING: please move your config to ${PREFIX}/etc/inn"; \ - ${ECHO} "WARNING: before starting your new inn install" ; \ - ${ECHO} "" ; \ - ${ECHO} "WARNING WARNING WARNING WARNING WARNING WARNING WARNING";\ - ${ECHO} "" ; \ - fi .include "../../security/openssl/buildlink3.mk" .include "../../mk/bsd.pkg.mk" diff --git a/news/inn/PLIST b/news/inn/PLIST index b602f52cfb5..f5b2d1f885b 100644 --- a/news/inn/PLIST +++ b/news/inn/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.16 2008/12/21 11:55:25 spz Exp $ +@comment $NetBSD: PLIST,v 1.17 2008/12/21 16:00:04 spz Exp $ bin/inews bin/rnews include/inn/conffile.h @@ -270,8 +270,8 @@ share/doc/inn/hook-perl share/doc/inn/hook-python share/doc/inn/hook-tcl share/doc/inn/sample-control -share/examples/inn/INN.py share/examples/inn/active.minimal +share/examples/inn/active.times share/examples/inn/actsync.cfg share/examples/inn/actsync.ign share/examples/inn/buffindexed.conf @@ -279,10 +279,7 @@ share/examples/inn/control.ctl share/examples/inn/cycbuff.conf share/examples/inn/distrib.pats share/examples/inn/expire.ctl -share/examples/inn/filter.tcl -share/examples/inn/filter_innd.pl -share/examples/inn/filter_innd.py -share/examples/inn/filter_nnrpd.pl +share/examples/inn/history share/examples/inn/incoming.conf share/examples/inn/inn.conf share/examples/inn/innfeed.conf @@ -293,27 +290,14 @@ share/examples/inn/motd.news share/examples/inn/news2mail.cf share/examples/inn/newsfeeds share/examples/inn/newsgroups.minimal -share/examples/inn/nnrpd.py -share/examples/inn/nnrpd.track -share/examples/inn/nnrpd_access.pl -share/examples/inn/nnrpd_access.py -share/examples/inn/nnrpd_access_wrapper.pl -share/examples/inn/nnrpd_access_wrapper.py -share/examples/inn/nnrpd_auth.pl -share/examples/inn/nnrpd_auth.py -share/examples/inn/nnrpd_auth_wrapper.pl -share/examples/inn/nnrpd_auth_wrapper.py -share/examples/inn/nnrpd_dynamic.py -share/examples/inn/nnrpd_dynamic_wrapper.py share/examples/inn/nntpsend.ctl +share/examples/inn/nnrpd.track share/examples/inn/ovdb.conf share/examples/inn/overview.fmt share/examples/inn/passwd.nntp share/examples/inn/radius.conf share/examples/inn/readers.conf share/examples/inn/sasl.conf -share/examples/inn/startup.tcl -share/examples/inn/startup_innd.pl share/examples/inn/storage.conf share/examples/inn/subscriptions share/examples/rc.d/innd @@ -329,3 +313,4 @@ share/examples/rc.d/innd @dirrm include/inn/inn @dirrm include/inn @dirrm etc/inn +@dirrm etc/nntp diff --git a/news/inn/distinfo b/news/inn/distinfo index 0a371ec04fd..2ea51b0e96f 100644 --- a/news/inn/distinfo +++ b/news/inn/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.18 2008/09/03 21:33:29 spz Exp $ +$NetBSD: distinfo,v 1.19 2008/12/21 16:00:04 spz Exp $ SHA1 (inn-2.4.5.tar.gz) = ca0f96e908633590e5e0e2e8b2f00762f7a97e9a RMD160 (inn-2.4.5.tar.gz) = ae01b1e793f99a3081cc03c4340c0b89ecba00e6 @@ -8,6 +8,6 @@ SHA1 (patch-ab) = a681fdecf562088cfb25e8625be1380b32331af0 SHA1 (patch-ac) = 586748ecfbe0bb48dd42b422f262a1741cef9e90 SHA1 (patch-ad) = 1f4d4b15a478d6d35185977d8bc32a4e161665c5 SHA1 (patch-ag) = d70bbbfd0fd2d33d33884000bf3e46b7c33fd15a -SHA1 (patch-ah) = 966977fb7efb705f903772dfbc9fd5161f140296 +SHA1 (patch-ah) = 9927418280dc39bee87bb0bd0c97348276ccfe9c SHA1 (patch-ai) = 9d99bd095dc5cb4b9c99274c0adeaab779ca2c2d SHA1 (patch-aj) = a53726b9a510ba4e6e7a9e0905b91b9820cf86c8 diff --git a/news/inn/files/innd.sh b/news/inn/files/innd.sh index 5c04e7d80b2..8734017ab8e 100644 --- a/news/inn/files/innd.sh +++ b/news/inn/files/innd.sh @@ -1,11 +1,24 @@ #!/bin/sh # -# $NetBSD: innd.sh,v 1.15 2008/09/03 20:19:39 spz Exp $ +# $NetBSD: innd.sh,v 1.16 2008/12/21 16:00:04 spz Exp $ # # PROVIDE: inn # REQUIRE: DAEMON # KEYWORD: shutdown +if [ -d @INN_DATA_DIR@/etc ] ; then + echo "" + echo "WARNING WARNING WARNING WARNING WARNING WARNING WARNING" + echo "" + echo "WARNING: old inn config directory @INN_DATA_DIR@/etc found" + echo "WARNING: please move your config to @PREFIX@/etc/inn" + echo "WARNING: before starting your new inn install" + echo "" + echo "WARNING WARNING WARNING WARNING WARNING WARNING WARNING" + echo "" + sleep 120 +fi + if [ -x @INN_PATHBIN@/rc.news -a -s @INN_DATA_DIR@/db/active ] then if [ ! -f @PREFIX@/etc/nntp/server ] @@ -22,6 +35,12 @@ then fi) fi + if [ -f @INN_DATA_DIR@/db/history -a \ + ! -s @INN_DATA_DIR@/db/history ] + then + @INN_PATHBIN@/makedbz -i -o -s 10000 + fi + if [ $# -eq 0 ] then echo -n ' innd' diff --git a/news/inn/patches/patch-ah b/news/inn/patches/patch-ah index f9052dfb1c0..2275ef198ac 100644 --- a/news/inn/patches/patch-ah +++ b/news/inn/patches/patch-ah @@ -1,8 +1,8 @@ -$NetBSD: patch-ah,v 1.10 2008/09/03 21:33:29 spz Exp $ +$NetBSD: patch-ah,v 1.11 2008/12/21 16:00:05 spz Exp $ --- site/Makefile.orig 2008-06-29 17:56:57.000000000 +0000 +++ site/Makefile -@@ -74,23 +74,12 @@ +@@ -74,28 +74,16 @@ ALL = $(MOST) $(REST) REST_INSTALLED = \ @@ -22,19 +22,15 @@ $NetBSD: patch-ah,v 1.10 2008/09/03 21:33:29 spz Exp $ $D$(PATH_TCL_STARTUP) $D$(PATH_TCL_FILTER) $D$(PATH_PYTHON_NNRPD_MODULE) \ - $D$(PATH_NNRPAUTH) $D$(PATHETC)/news2mail.cf $D$(PATH_READERSCONF) \ - $D$(PATH_RADIUS_CONF) $D$(PATH_NNRPYAUTH) $D$(PATH_OVDB_CONF) \ - $D$(PATH_NNRPYACCESS) $D$(PATH_NNRPYDYNAMIC) \ + $D$(PATH_NNRPYACCESS) $D$(PATH_NNRPYDYNAMIC) \ - $D$(PATH_SASL_CONF) $D$(PATH_SUBSCRIPTIONS) $D$(PATH_NNRPACCESS) + $D$(PATH_NNRPAUTH) $D$(PATH_NNRPYAUTH) $D$(PATH_NNRPACCESS) ALL_INSTALLED = $(MOST_INSTALLED) $(REST_INSTALLED) -@@ -145,7 +133,8 @@ - chown $(NEWSUSER) $@ - chgrp $(NEWSGROUP) $@ - chmod $(FILEMODE) $@ -- $(PATHBIN)/makedbz -i -o -+ # makedbz wants ridiculous amounts of RAM for -s 0 -+ $(PATHBIN)/makedbz -i -o -s 10000 +-SPECIAL = $D$(PATH_ACTIVE) $D$(PATH_ACTIVE_TIMES) \ +- $D$(PATH_NEWSGROUPS) $D$(PATH_HISTORY) ++SPECIAL = - ## Remove files that are unchanged from the release version. - clean: + ## Get new versions of everything from samples directory. + all: $(P) $(ALL) config |