aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormandree <mandree@FreeBSD.org>2013-10-01 05:37:18 +0800
committermandree <mandree@FreeBSD.org>2013-10-01 05:37:18 +0800
commit4fcc077e8636399ed59c0a1091b9a8a6703f7791 (patch)
tree7bd037de9e10226ff63ec6a7ecd0cd0c87945630
parent238231a0fffcf1cf71afd6fc3707e3e7fe9c3bd1 (diff)
downloadfreebsd-ports-graphics-4fcc077e8636399ed59c0a1091b9a8a6703f7791.tar.gz
freebsd-ports-graphics-4fcc077e8636399ed59c0a1091b9a8a6703f7791.tar.zst
freebsd-ports-graphics-4fcc077e8636399ed59c0a1091b9a8a6703f7791.zip
Support staging, and update LIB_DEPENDS format.
-rw-r--r--news/leafnode/Makefile26
-rw-r--r--news/leafnode/pkg-plist32
2 files changed, 36 insertions, 22 deletions
diff --git a/news/leafnode/Makefile b/news/leafnode/Makefile
index df5a889c759..3bdfa7d91aa 100644
--- a/news/leafnode/Makefile
+++ b/news/leafnode/Makefile
@@ -10,24 +10,24 @@ MASTER_SITES= SF \
MAINTAINER= mandree@FreeBSD.org
COMMENT= NNTP package for offline news caching and reading
-LIB_DEPENDS= pcre:${PORTSDIR}/devel/pcre
-
+LIB_DEPENDS= libpcre.so:${PORTSDIR}/devel/pcre
USE_XZ= yes
GNU_CONFIGURE= yes
CONFLICTS= newsx-1* s-news-0*
-NO_STAGE= yes
.include <bsd.port.pre.mk>
+# TODO: remove this auto-selection, and tell users through UPDATING to
+# move their spool to /var/spool/leafnode, and run texpire -r
.if exists(/var/spool/news/leaf.node) && !defined(PACKAGE_BUILDING)
LEAFNODE_SPOOLDIR?=/var/spool/news
.elif exists(${LOCALBASE}/var/spool/leafnode/leaf.node) && !defined(PACKAGE_BUILDING)
LEAFNODE_SPOOLDIR?=${LOCALBASE}/var/spool/leafnode
.endif
LEAFNODE_SPOOLDIR?=/var/spool/leafnode
-PLIST_SUB= SPOOLDIR=${LEAFNODE_SPOOLDIR}
+PLIST_SUB= SPOOLDIR=${LEAFNODE_SPOOLDIR} REALPREFIX=${PREFIX}
CONFIGURE_ARGS= --sysconfdir=${PREFIX}/etc/leafnode \
--with-spooldir=${LEAFNODE_SPOOLDIR} --with-ipv6 \
@@ -64,18 +64,16 @@ pre-configure:
@${ECHO_MSG}
post-install:
- ${INSTALL_SCRIPT} ${WRKSRC}/setup-daemontools.sh ${PREFIX}/sbin
+ ${INSTALL_SCRIPT} ${WRKSRC}/setup-daemontools.sh ${STAGEDIR}${PREFIX}/sbin
.if ${PORT_OPTIONS:MDOCS}
- ${MKDIR} ${DOCSDIR}
- cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCSDIR}
- ${MKDIR} ${DOCSDIR}/german
- cd ${WRKSRC}/doc_german && ${INSTALL_DATA} ${DOCS_DE} ${DOCSDIR}/german
+ ${MKDIR} ${STAGEDIR}${DOCSDIR}
+ cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${STAGEDIR}${DOCSDIR}
+ ${MKDIR} ${STAGEDIR}${DOCSDIR}/german
+ cd ${WRKSRC}/doc_german && ${INSTALL_DATA} ${DOCS_DE} ${STAGEDIR}${DOCSDIR}/german
.endif
- ${MKDIR} ${MAN1DIR_DE} ${MAN8DIR_DE}
+ ${MKDIR} ${STAGEDIR}${MAN1DIR_DE} ${STAGEDIR}${MAN8DIR_DE}
cd ${WRKSRC}/doc_german && \
- ${INSTALL_MAN} ${MAN1} ${MAN1PREFIX}/man/de.ISO8859-1/man1 && \
- ${INSTALL_MAN} ${MAN8} ${MAN8PREFIX}/man/de.ISO8859-1/man8
- PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
- @${CAT} ${PKGMESSAGE}
+ ${INSTALL_MAN} ${MAN1} ${STAGEDIR}${MAN1PREFIX}/man/de.ISO8859-1/man1 && \
+ ${INSTALL_MAN} ${MAN8} ${STAGEDIR}${MAN8PREFIX}/man/de.ISO8859-1/man8
.include <bsd.port.post.mk>
diff --git a/news/leafnode/pkg-plist b/news/leafnode/pkg-plist
index b474a62f0cf..53088c009e3 100644
--- a/news/leafnode/pkg-plist
+++ b/news/leafnode/pkg-plist
@@ -1,21 +1,37 @@
@comment $FreeBSD$
bin/leafnode-version
bin/newsq
-etc/leafnode/config.example
-etc/leafnode/filters.example
-etc/leafnode/nntp.rules.dist
-etc/leafnode/run.tcpd.dist
-etc/leafnode/run.tcpserver.dist
-etc/leafnode/Makefile.dist
-etc/leafnode/UNINSTALL-daemontools
+%%ETCDIR%%/config.example
+%%ETCDIR%%/filters.example
+%%ETCDIR%%/nntp.rules.dist
+%%ETCDIR%%/run.tcpd.dist
+%%ETCDIR%%/run.tcpserver.dist
+%%ETCDIR%%/Makefile.dist
+%%ETCDIR%%/UNINSTALL-daemontools
+man/man1/leafnode-version.1.gz
+man/man1/newsq.1.gz
+man/man8/applyfilter.8.gz
+man/man8/checkgroups.8.gz
+man/man8/fetchnews.8.gz
+man/man8/leafnode.8.gz
+man/man8/texpire.8.gz
+man/de.ISO8859-1/man1/leafnode-version.1.gz
+man/de.ISO8859-1/man1/newsq.1.gz
+man/de.ISO8859-1/man8/applyfilter.8.gz
+man/de.ISO8859-1/man8/checkgroups.8.gz
+man/de.ISO8859-1/man8/fetchnews.8.gz
+man/de.ISO8859-1/man8/leafnode.8.gz
+man/de.ISO8859-1/man8/texpire.8.gz
sbin/leafnode
sbin/fetchnews
sbin/texpire
sbin/checkgroups
sbin/applyfilter
sbin/setup-daemontools.sh
+@dirrmtry %%ETCDIR%%
@comment only remove these when empty:
@comment we don't want to kill the news spool across updates
+@cwd /
@unexec rm -f %%SPOOLDIR%%/leaf.node/lock.file
@dirrmtry %%SPOOLDIR%%/failed.postings
@dirrmtry %%SPOOLDIR%%/leaf.node
@@ -25,6 +41,6 @@ sbin/setup-daemontools.sh
@dirrmtry %%SPOOLDIR%%/out.going
@dirrmtry %%SPOOLDIR%%/temp.files
@dirrmtry %%SPOOLDIR%%
+@cwd %%REALPREFIX%%
@unexec rmdir %D/var/spool %D/var %D/lib/leafnode 2>/dev/null || :
-@dirrm etc/leafnode
@unexec if test -d "%%SPOOLDIR%%" || test -d "%D/etc/leafnode" ; then echo ; echo "==============================================================================" ; echo "If you want to remove leafnode for good, delete spool and configuration:" ; echo "type: rm -rf %D/etc/leafnode %%SPOOLDIR%%" ; echo "==============================================================================" ; fi