diff options
author | Thierry Thomas <thierry@FreeBSD.org> | 2006-06-09 20:30:48 +0000 |
---|---|---|
committer | Thierry Thomas <thierry@FreeBSD.org> | 2006-06-09 20:30:48 +0000 |
commit | b9de059d9da414075e23c5e86233ce4f66dd0c4f (patch) | |
tree | 4f50f8582d8aace3fbc1b819e4c220719a211ea1 /news | |
parent | - Update from v0.15 to v0.20 (diff) |
Fix plist: it's now possible to install inn from package.
PR: ports/98469
Submitted by: Shaun Amott <shaun (at) inerd.com> (maintainer)
Notes
Notes:
svn path=/head/; revision=164937
Diffstat (limited to 'news')
-rw-r--r-- | news/inn/Makefile | 4 | ||||
-rw-r--r-- | news/inn/pkg-install | 25 | ||||
-rw-r--r-- | news/inn/pkg-plist | 33 |
3 files changed, 42 insertions, 20 deletions
diff --git a/news/inn/Makefile b/news/inn/Makefile index 4579dd6cd97f..8182c3814283 100644 --- a/news/inn/Makefile +++ b/news/inn/Makefile @@ -7,7 +7,7 @@ PORTNAME= inn PORTVERSION= 2.4.3 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= news ipv6 MASTER_SITES= ${MASTER_SITE_ISC} MASTER_SITE_SUBDIR= ${PORTNAME} @@ -184,6 +184,6 @@ post-install: ${MV} history.n.$${s} history.$${s} ; \ done ; \ fi) - @${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL + @${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL PORTMODE .include <bsd.port.post.mk> diff --git a/news/inn/pkg-install b/news/inn/pkg-install index d0de05fe1623..08896386832e 100644 --- a/news/inn/pkg-install +++ b/news/inn/pkg-install @@ -42,10 +42,27 @@ case $2 in ${NEWSBASE}/spool/overview \ ${NEWSBASE}/spool/tmp - if [ -d ${NEWSBASE}/db.dist -a ! -f ${NEWSBASE}/db.dist/* ]; then - for f in ${NEWSBASE}/db/*; do - cp -pR ${f} ${NEWSBASE}/db.dist - done + if [ ${3:-""} = "PORTMODE" ]; then + fc=`ls ${NEWSBASE}/db.dist/* 2>/dev/null | wc -l` + + if [ -d ${NEWSBASE}/db.dist -a $fc -eq 0 ]; then + for f in ${NEWSBASE}/db/*; do + cp -pR ${f} ${NEWSBASE}/db.dist + done + else + mkdir -p ${NEWSBASE}/db.dist + for f in ${NEWSBASE}/db/*; do + touch ${NEWSBASE}/db.dist/${f##*/} + done + fi + else + fc=`ls ${NEWSBASE}/db/* 2>/dev/null | wc -l` + + if [ -d ${NEWSBASE}/db -a $fc -eq 0 ]; then + for f in ${NEWSBASE}/db.dist/*; do + cp -pR ${f} ${NEWSBASE}/db + done + fi fi ;; diff --git a/news/inn/pkg-plist b/news/inn/pkg-plist index e33028e1958a..5ea49eba6fee 100644 --- a/news/inn/pkg-plist +++ b/news/inn/pkg-plist @@ -1,3 +1,4 @@ +@exec mkdir -p %D/news/db news/bin/actmerge news/bin/actsync news/bin/actsyncd @@ -105,11 +106,15 @@ news/bin/writelog @unexec f=history; if cmp -s %D/news/db/$f %D/news/db.dist/$f; then rm -f %D/news/db/$f; fi @unexec f=history.dir; if cmp -s %D/news/db/$f %D/news/db.dist/$f; then rm -f %D/news/db/$f; fi @unexec f=newsgroups; if cmp -s %D/news/db/$f %D/news/db.dist/$f; then rm -f %D/news/db/$f; fi -@unexec rm -f %D/news/db.dist/active 2> /dev/null || true -@unexec rm -f %D/news/db.dist/active.times 2> /dev/null || true -@unexec rm -f %D/news/db.dist/history 2> /dev/null || true -@unexec rm -f %D/news/db.dist/history.dir 2> /dev/null || true -@unexec rm -f %D/news/db.dist/newsgroups 2> /dev/null || true +news/db.dist/active +news/db.dist/active.times +news/db.dist/history +news/db.dist/history.dir +news/db.dist/newsgroups +@unexec rm -f %D/news/db.dist/active.old || true +@unexec rm -f %D/news/db.dist/history.n.dir || true +@unexec rm -f %D/news/db.dist/history.n.hash || true +@unexec rm -f %D/news/db.dist/history.n.index || true %%SUB_WITHOUT_TAGGED_HASH%%@unexec f=history.hash; if cmp -s %D/news/db/$f %D/news/db.dist/$f; then rm -f %D/news/db/$f; fi %%SUB_WITHOUT_TAGGED_HASH%%@unexec f=history.index; if cmp -s %D/news/db/$f %D/news/db.dist/$f; then rm -f %D/news/db/$f; fi %%SUB_WITHOUT_TAGGED_HASH%%@unexec rm -f %D/news/db.dist/history.hash 2> /dev/null || true @@ -257,15 +262,15 @@ news/lib/libstorage.a %%PORTDOCS%%%%DOCSDIR%%/TODO %%PORTDOCS%%@dirrm %%DOCSDIR%% @dirrmtry news/tmp -@dirrm news/spool/overview -@dirrm news/spool/outgoing -@dirrm news/spool/innfeed -@dirrm news/spool/incoming/bad -@dirrm news/spool/incoming -@dirrm news/spool/articles -@dirrm news/spool/archive -@dirrm news/spool/tmp -@dirrm news/spool +@dirrmtry news/spool/overview +@dirrmtry news/spool/outgoing +@dirrmtry news/spool/innfeed +@dirrmtry news/spool/incoming/bad +@dirrmtry news/spool/incoming +@dirrmtry news/spool/articles +@dirrmtry news/spool/archive +@dirrmtry news/spool/tmp +@dirrmtry news/spool @dirrm news/run @dirrm news/lib @dirrm news/include/inn |