aboutsummaryrefslogtreecommitdiffstats
path: root/news
diff options
context:
space:
mode:
authordinoex <dinoex@FreeBSD.org>2004-03-07 14:50:55 +0800
committerdinoex <dinoex@FreeBSD.org>2004-03-07 14:50:55 +0800
commitbe4f615668c4c3b0e3c57b860eff99f9986d53a1 (patch)
tree780a5bbddb28b0e76bad5639685812c9f25fe9b1 /news
parent9628636f4da34da9c4b470cc3fe60b1a634bbe84 (diff)
downloadfreebsd-ports-gnome-be4f615668c4c3b0e3c57b860eff99f9986d53a1.tar.gz
freebsd-ports-gnome-be4f615668c4c3b0e3c57b860eff99f9986d53a1.tar.zst
freebsd-ports-gnome-be4f615668c4c3b0e3c57b860eff99f9986d53a1.zip
- preserve configuration even when extracting the package
- set shell and home for news when running intactive
Diffstat (limited to 'news')
-rw-r--r--news/cnews/Makefile14
-rw-r--r--news/cnews/pkg-plist48
2 files changed, 40 insertions, 22 deletions
diff --git a/news/cnews/Makefile b/news/cnews/Makefile
index 0ef90d7b6c26..a9fb78c88e32 100644
--- a/news/cnews/Makefile
+++ b/news/cnews/Makefile
@@ -7,7 +7,7 @@
PORTNAME= cnews
PORTVERSION= cr.g
-PORTREVISION= 6
+PORTREVISION= 7
CATEGORIES= news
MASTER_SITES= ftp://ftp.cs.toronto.edu/pub/c-news/ \
ftp://ftp.funet.fi/pub/unix/news/cnews/ \
@@ -46,12 +46,17 @@ MAN8= cnewsdo.8cn expire.8cn explode.8cn mergeactive.8 \
mkhistory.8cn newsaux.8cn newsbatch.8cn newsmail.8cn \
newsmaint.8cn newsoverview.8 relaynews.8cn report.8cn \
rnews.8cn
+NEWSCTL_FILES= active active.times batchparms controlperm explist \
+ history history.dir history.pag inews mailname mailpaths \
+ organization postdefltgroup readnews.ctl readnews.help \
+ report.ctl sys versionname whoami
PLIST_SUB+= VARBASE=${VARBASE}
PLIST_SUB+= NEWSBIN=${NEWSBIN:S=^${PREFIX}/==}
PLIST_SUB+= NEWSCTL=${NEWSCTL:S=^${VARBASE}/==}
PLIST_SUB+= NEWSCTLBASE=${NEWSCTL:S=/news==:S=^${VARBASE}/==}
PLIST_SUB+= NEWSARTS=${NEWSARTS:S=^${VARBASE}/==}
PLIST_SUB+= NEWSOV=${NEWSOV:S=^${VARBASE}/==}
+PLIST_SUB+= NEWSCTL_FILES="${NEWSCTL_FILES}"
MODIFY= conf/quiz.def \
conf/substitutions \
@@ -118,6 +123,8 @@ do-install:
.for i in ${MAN8}
${INSTALL_MAN} ${WRKSRC}/man/${i} ${PREFIX}/man/man8
.endfor
+ ${MKDIR} ${EXAMPLESDIR}/newsctl
+ @${TAR} -C ${NEWSCTL} -cf - . | ${TAR} -C ${EXAMPLESDIR}/newsctl -xf -
@${ECHO_MSG} ""
@${ECHO_MSG} "!!!!!!!!"
@${ECHO_MSG} "you MUST change the configuration of this news setup:"
@@ -128,6 +135,11 @@ do-install:
@${ECHO_MSG} " so any problem can be reported."
@${ECHO_MSG} "!!!!!!!!"
@${ECHO_MSG} ""
+.if !defined(BATCH)
+ @if test "$$(pw usershow news)" != "news:*:8:8::0:0:News Subsystem:${NEWSCTL}:${SHELL}"; then \
+ pw usermod news -d "${NEWSCTL}" -s ${SHELL}; fi
+ @pw usershow news
+.endif
test:
(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
diff --git a/news/cnews/pkg-plist b/news/cnews/pkg-plist
index 03738064dd09..83832f80e18b 100644
--- a/news/cnews/pkg-plist
+++ b/news/cnews/pkg-plist
@@ -128,32 +128,38 @@ lib/libcnews.a
@dirrm %%NEWSBIN%%/nov
@dirrm %%NEWSBIN%%/relay
@dirrm %%NEWSBIN%%
-@cwd %%VARBASE%%
@owner news
@group news
-%%NEWSCTL%%/active
-%%NEWSCTL%%/active.times
-%%NEWSCTL%%/batchparms
-%%NEWSCTL%%/controlperm
-%%NEWSCTL%%/explist
-%%NEWSCTL%%/history
-%%NEWSCTL%%/history.dir
-%%NEWSCTL%%/history.pag
-%%NEWSCTL%%/inews
-%%NEWSCTL%%/mailname
-%%NEWSCTL%%/mailpaths
-%%NEWSCTL%%/organization
-%%NEWSCTL%%/postdefltgroup
-%%NEWSCTL%%/readnews.ctl
-%%NEWSCTL%%/readnews.help
-%%NEWSCTL%%/report.ctl
-%%NEWSCTL%%/sys
-%%NEWSCTL%%/versionname
-%%NEWSCTL%%/whoami
+@unexec for i in %%NEWSCTL_FILES%%; do if cmp -s %%VARBASE%%/%%NEWSCTL%%/$i %D/%%EXAMPLESDIR%%/newsctl/$i; then rm -f %%VARBASE%%/%%NEWSCTL%%/$i; else echo "Preserving %%VARBASE%%/%%NEWSCTL%%/$i"; fi; done
+%%EXAMPLESDIR%%/newsctl/active
+%%EXAMPLESDIR%%/newsctl/active.times
+%%EXAMPLESDIR%%/newsctl/batchparms
+%%EXAMPLESDIR%%/newsctl/controlperm
+%%EXAMPLESDIR%%/newsctl/explist
+%%EXAMPLESDIR%%/newsctl/history
+%%EXAMPLESDIR%%/newsctl/history.dir
+%%EXAMPLESDIR%%/newsctl/history.pag
+%%EXAMPLESDIR%%/newsctl/inews
+%%EXAMPLESDIR%%/newsctl/mailname
+%%EXAMPLESDIR%%/newsctl/mailpaths
+%%EXAMPLESDIR%%/newsctl/organization
+%%EXAMPLESDIR%%/newsctl/postdefltgroup
+%%EXAMPLESDIR%%/newsctl/readnews.ctl
+%%EXAMPLESDIR%%/newsctl/readnews.help
+%%EXAMPLESDIR%%/newsctl/report.ctl
+%%EXAMPLESDIR%%/newsctl/sys
+%%EXAMPLESDIR%%/newsctl/versionname
+%%EXAMPLESDIR%%/newsctl/whoami
+@exec mkdir -p %D/%%EXAMPLESDIR%%/newsctl/bin
+@exec mkdir -p %%VARBASE%%/%%NEWSCTL%%/bin
+@exec for i in %%NEWSCTL_FILES%%; do if test ! -f %%VARBASE%%/%%NEWSCTL%%/$i; then cp %D/%%EXAMPLESDIR%%/newsctl/$i %%VARBASE%%/%%NEWSCTL%%/$i; else echo "preservering %%VARBASE%%/%%NEWSCTL%%/$i"; fi; done
+@dirrm %%EXAMPLESDIR%%/newsctl/bin
+@dirrm %%EXAMPLESDIR%%/newsctl
+@dirrm %%EXAMPLESDIR%%
+@cwd %%VARBASE%%
@dirrm %%NEWSCTL%%/bin
@dirrm %%NEWSCTL%%
@dirrm %%NEWSCTLBASE%%
-@exec mkdir -p %D/%%NEWSCTL%%/bin
@dirrm %%NEWSARTS%%/control
@dirrm %%NEWSARTS%%/junk
@dirrm %%NEWSARTS%%/news/announce/newusers