diff options
author | dinoex <dinoex@FreeBSD.org> | 2004-03-07 06:50:55 +0000 |
---|---|---|
committer | dinoex <dinoex@FreeBSD.org> | 2004-03-07 06:50:55 +0000 |
commit | be4f615668c4c3b0e3c57b860eff99f9986d53a1 (patch) | |
tree | 780a5bbddb28b0e76bad5639685812c9f25fe9b1 /news/cnews | |
parent | 9628636f4da34da9c4b470cc3fe60b1a634bbe84 (diff) | |
download | FreeBSD-ports-be4f615668c4c3b0e3c57b860eff99f9986d53a1.zip FreeBSD-ports-be4f615668c4c3b0e3c57b860eff99f9986d53a1.tar.gz |
- preserve configuration even when extracting the package
- set shell and home for news when running intactive
Diffstat (limited to 'news/cnews')
-rw-r--r-- | news/cnews/Makefile | 14 | ||||
-rw-r--r-- | news/cnews/pkg-plist | 48 |
2 files changed, 40 insertions, 22 deletions
diff --git a/news/cnews/Makefile b/news/cnews/Makefile index 0ef90d7..a9fb78c 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 0373806..83832f8 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 |