diff options
author | naddy <naddy@FreeBSD.org> | 2003-02-28 02:40:30 +0800 |
---|---|---|
committer | naddy <naddy@FreeBSD.org> | 2003-02-28 02:40:30 +0800 |
commit | b540d3a1c41a0292c162e6108fa950e19e41e84b (patch) | |
tree | 85528fb83f6db96fe510865a81986d05dac79187 /news/leafnode | |
parent | 33303863ed411fb13844c9bf0e4f302714bc8c97 (diff) | |
download | freebsd-ports-gnome-b540d3a1c41a0292c162e6108fa950e19e41e84b.tar.gz freebsd-ports-gnome-b540d3a1c41a0292c162e6108fa950e19e41e84b.tar.zst freebsd-ports-gnome-b540d3a1c41a0292c162e6108fa950e19e41e84b.zip |
* Update to upstream version 1.9.36, fixing download issues when filters
are configured.
* LOCALBASE -> PREFIX
* Fix extra files after uninstall
* Add "deinstall for good" instructions.
* Use the more efficient quickmkdir program from pkg-install.
* Move spooldir into ${PREFIX} and lockfile into ${SPOOLDIR}
(compatibility hack for ports that aren't turned into packages to allow for
continued use of /var/spool/news for ${SPOOLDIR} is in place)
* Execute pkg-install contents only once (in POST-INSTALL phase).
PR: 48750
Submitted by: Matthias Andree <matthias.andree@web.de>
Diffstat (limited to 'news/leafnode')
-rw-r--r-- | news/leafnode/Makefile | 27 | ||||
-rw-r--r-- | news/leafnode/distinfo | 2 | ||||
-rw-r--r-- | news/leafnode/pkg-install | 59 | ||||
-rw-r--r-- | news/leafnode/pkg-plist | 17 |
4 files changed, 65 insertions, 40 deletions
diff --git a/news/leafnode/Makefile b/news/leafnode/Makefile index 48632b1f7a9b..db6addf9a092 100644 --- a/news/leafnode/Makefile +++ b/news/leafnode/Makefile @@ -6,7 +6,7 @@ # PORTNAME= leafnode -PORTVERSION= 1.9.35 +PORTVERSION= 1.9.36 PORTREVISION= 0 CATEGORIES= news ipv6 MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:S/$/:sourceforge/} \ @@ -24,32 +24,41 @@ COMMENT= NNTP package for offline news caching and reading LIB_DEPENDS= pcre.0:${PORTSDIR}/devel/pcre +.if exists(/var/spool/news) && !defined(PACKAGE_BUILDING) +LEAFNODE_SPOOLDIR?=/var/spool/news +.endif +LEAFNODE_SPOOLDIR?=${PREFIX}/var/spool/leafnode +PLIST_SUB= SPOOLDIR=${LEAFNODE_SPOOLDIR} + USE_BZIP2= yes GNU_CONFIGURE= yes -CONFIGURE_ARGS= --quiet --sysconfdir=${LOCALBASE}/etc/leafnode \ - --with-lockfile=/var/spool/lock/news/leafnode.lck \ - --with-spooldir=/var/spool/news --with-ipv6 +CONFIGURE_ARGS= --quiet --prefix=${PREFIX} --sysconfdir=${PREFIX}/etc/leafnode \ + --with-lockfile=${LEAFNODE_SPOOLDIR}/leaf.node/lock.file \ + --with-spooldir=${LEAFNODE_SPOOLDIR} --with-ipv6 CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} MAKE_ARGS= MAN1= leafnode-version.1 newsq.1 MAN8= applyfilter.8 checkgroups.8 fetchnews.8 leafnode.8 texpire.8 post-install: - ${INSTALL_SCRIPT} ${WRKSRC}/setup-daemontools.sh ${LOCALBASE}/sbin/ + ${INSTALL_PROGRAM} ${WRKSRC}/quickmkdir ${PREFIX}/sbin/ + ${INSTALL_SCRIPT} ${WRKSRC}/setup-daemontools.sh ${PREFIX}/sbin/ .if !defined(NOPORTDOCS) - ${MKDIR} ${LOCALBASE}/share/doc/${PORTNAME} + ${MKDIR} ${PREFIX}/share/doc/${PORTNAME} for i in ChangeLog COPYING CREDITS FAQ.txt FAQ.pdf FAQ.html \ INSTALL NEWS README \ README-FQDN README-FQDN.html README-daemontools \ README.FIRST TODO leafnode.cron.daily ; do \ ${INSTALL_MAN} ${WRKSRC}/$$i \ - ${LOCALBASE}/share/doc/${PORTNAME} ; done - ${MKDIR} ${LOCALBASE}/share/doc/${PORTNAME}/doc_german + ${PREFIX}/share/doc/${PORTNAME} ; done + ${MKDIR} ${PREFIX}/share/doc/${PORTNAME}/doc_german for i in INSTALL_de LIESMICH-daemontools README \ README_de newsq.1 ${MAN8} ; do \ ${INSTALL_MAN} ${WRKSRC}/doc_german/$$i \ - ${LOCALBASE}/share/doc/${PORTNAME}/doc_german ; done + ${PREFIX}/share/doc/${PORTNAME}/doc_german ; done .endif ${CAT} pkg-message + PKG_PREFIX=${PREFIX} SPOOLDIR=${LEAFNODE_SPOOLDIR} \ + ${SH} pkg-install ${PORTNAME} POST-INSTALL .include <bsd.port.mk> diff --git a/news/leafnode/distinfo b/news/leafnode/distinfo index 253e2666cc21..ce7ed7b3276e 100644 --- a/news/leafnode/distinfo +++ b/news/leafnode/distinfo @@ -1 +1 @@ -MD5 (leafnode-1.9.35.rel.tar.bz2) = 0b6da897824a9c95bcc3a7fd65b4b3cb +MD5 (leafnode-1.9.36.rel.tar.bz2) = b4c8a8421292c4dc8ddc714095e79c55 diff --git a/news/leafnode/pkg-install b/news/leafnode/pkg-install index 6697d2bf50ae..57f208ed696a 100644 --- a/news/leafnode/pkg-install +++ b/news/leafnode/pkg-install @@ -1,31 +1,32 @@ #! /bin/sh -SPOOLDIR=${VAR:=/var}/spool/news -LOCKFILE=$VAR/spool/lock/news/fetch.lck -LIBDIR=${PREFIX:=/usr/local}/lib/leafnode - -mkdir -p `dirname $LOCKFILE` -mkdir -p $SPOOLDIR $LIBDIR -mkdir -p $SPOOLDIR/leaf.node -mkdir -p $SPOOLDIR/message.id -mkdir -p $SPOOLDIR/interesting.groups -mkdir -p $SPOOLDIR/out.going -chown news:news `dirname $LOCKFILE` -chown news:news $SPOOLDIR $LIBDIR -chown news:news $SPOOLDIR/leaf.node -chown news:news $SPOOLDIR/message.id -chown news:news $SPOOLDIR/interesting.groups -chown news:news $SPOOLDIR/out.going -cd $SPOOLDIR/message.id -for a in 0 1 2 3 4 5 6 7 8 9 ; do - for b in 0 1 2 3 4 5 6 7 8 9 ; do - mkdir -p ${a}${b}0 ${a}${b}1 ${a}${b}2 \ - ${a}${b}3 ${a}${b}4 ${a}${b}5 \ - ${a}${b}6 ${a}${b}7 ${a}${b}8 \ - ${a}${b}9 - chown news:news ${a}${b}0 ${a}${b}1 ${a}${b}2 \ - ${a}${b}3 ${a}${b}4 ${a}${b}5 \ - ${a}${b}6 ${a}${b}7 ${a}${b}8 \ - ${a}${b}9 ; \ - done -done +case $2 in +PRE-INSTALL) + ;; +POST-INSTALL) + SPOOLDIR=${SPOOLDIR:=${PKG_PREFIX}/var/spool/leafnode} + LOCKFILE=${SPOOLDIR}/leaf.node/lock.file + + mkdir -p `dirname $LOCKFILE` + mkdir -p $SPOOLDIR + mkdir -p $SPOOLDIR/failed.postings + mkdir -p $SPOOLDIR/leaf.node + mkdir -p $SPOOLDIR/message.id + mkdir -p $SPOOLDIR/interesting.groups + mkdir -p $SPOOLDIR/out.going + mkdir -p $SPOOLDIR/temp.files + chown news:news `dirname $LOCKFILE` + chown news:news $SPOOLDIR + chown news:news $SPOOLDIR/failed.postings + chown news:news $SPOOLDIR/leaf.node + chown news:news $SPOOLDIR/message.id + chown news:news $SPOOLDIR/interesting.groups + chown news:news $SPOOLDIR/out.going + chown news:news $SPOOLDIR/temp.files + ${PKG_PREFIX}/sbin/quickmkdir + ;; +*) + echo >&2 "Unknown argument in $0 $@" + exit 1 + ;; +esac diff --git a/news/leafnode/pkg-plist b/news/leafnode/pkg-plist index a0d292c3aed6..f922b97467c6 100644 --- a/news/leafnode/pkg-plist +++ b/news/leafnode/pkg-plist @@ -14,6 +14,7 @@ sbin/texpire sbin/checkgroups sbin/applyfilter sbin/setup-daemontools.sh +sbin/quickmkdir share/doc/leafnode/ChangeLog share/doc/leafnode/COPYING share/doc/leafnode/CREDITS @@ -41,5 +42,19 @@ share/doc/leafnode/doc_german/leafnode.8 share/doc/leafnode/doc_german/texpire.8 @dirrm share/doc/leafnode/doc_german @dirrm share/doc/leafnode -@unexec rmdir %D/lib/leafnode 2>/dev/null || true +@comment only remove these when empty: +@unexec rm -f %%SPOOLDIR%%/leaf.node/lock.file +@unexec rmdir %%SPOOLDIR%%/failed.postings 2>/dev/null || : +@unexec rmdir %%SPOOLDIR%%/failed.postings 2>/dev/null || : +@unexec rmdir %%SPOOLDIR%%/leaf.node 2>/dev/null || : +@unexec rmdir %%SPOOLDIR%%/message.id/* 2>/dev/null || : +@unexec rmdir %%SPOOLDIR%%/message.id 2>/dev/null || : +@unexec rmdir %%SPOOLDIR%%/interesting.groups 2>/dev/null || : +@unexec rmdir %%SPOOLDIR%%/out.going 2>/dev/null || : +@unexec rmdir %%SPOOLDIR%%/temp.files 2>/dev/null || : +@unexec rmdir %%SPOOLDIR%% 2>/dev/null || : +@unexec rmdir %%PREFIX%%/var/spool 2>/dev/null || : +@unexec rmdir %%PREFIX%%/var 2>/dev/null || : +@unexec rmdir %D/lib/leafnode 2>/dev/null || : @dirrm etc/leafnode +@unexec if test -d "%%SPOOLDIR%%" || test -d "%%PREFIX%%/etc/leafnode" ; then echo ; echo "==============================================================================" ; echo "If you want to remove leafnode for good," ; echo "type: rm -rf %%PREFIX%%/etc/leafnode %%SPOOLDIR%%" ; echo "==============================================================================" ; fi |