aboutsummaryrefslogtreecommitdiff
path: root/news/inn
diff options
context:
space:
mode:
authorClement Laforet <clement@FreeBSD.org>2004-02-26 16:20:51 +0000
committerClement Laforet <clement@FreeBSD.org>2004-02-26 16:20:51 +0000
commit8d788024ff915a69810849e6d82a61bcbc619ca6 (patch)
treef29df3103f593a2b3fb6c02a003b6fa7f4582239 /news/inn
parentf6f54a1fea011289cc170b7e8bd1298120f333b7 (diff)
downloadports-8d788024ff915a69810849e6d82a61bcbc619ca6.tar.gz
ports-8d788024ff915a69810849e6d82a61bcbc619ca6.zip
- Add WITH_STANDARD_ETC knob
If you define WITH_STANDARD_ETC inn config files are put in ${PREFIX}/etc/inn Requested by: Jochen Gensch <incmc@gmx.de> (PR 61974)
Notes
Notes: svn path=/head/; revision=102205
Diffstat (limited to 'news/inn')
-rw-r--r--news/inn/Makefile14
-rw-r--r--news/inn/pkg-install4
-rw-r--r--news/inn/pkg-plist106
3 files changed, 66 insertions, 58 deletions
diff --git a/news/inn/Makefile b/news/inn/Makefile
index 1c472776a927..9c52e9c407ea 100644
--- a/news/inn/Makefile
+++ b/news/inn/Makefile
@@ -40,7 +40,8 @@ CONFIGURE_ARGS+= --mandir=${PREFIX}/man \
--with-perl \
--with-tmp-dir=${INN_NEWSSPOOL}/tmp \
--with-openssl=${OPENSSLBASE} \
- --enable-ipv6
+ --enable-ipv6 \
+ --with-etc-dir=${ETC_DIR}
.if defined(WITH_BERKELEYDB)
CONFIGURE_ARGS+= --with-berkeleydb
@@ -94,7 +95,6 @@ PLIST_SUB= SUB_WITH_TAGGED_HASH="@comment "
PLIST_SUB+= SUB_WITHOUT_TAGGED_HASH=""
.endif
-
EXTRA= CONTRIBUTORS HACKING INSTALL LICENSE MANIFEST NEWS README TODO
HEADERS= clibrary.h config.h dbz.h libinn.h storage.h
@@ -122,6 +122,14 @@ MAN8= actsync.8 actsyncd.8 archive.8 auth_smb.8 batcher.8 buffchan.8 \
.include <bsd.port.pre.mk>
+.if defined(WITH_STANDARD_ETC)
+ETC_DIR= ${PREFIX}/etc/inn
+PLIST_SUB+= ETCDIR=etc/inn
+.else
+ETC_DIR= ${PREFIX}/news/etc
+PLIST_SUB+= ETCDIR="news/etc"
+.endif
+
post-patch:
.if defined(WITH_TCL)
@${REINPLACE_CMD} -e 's!<tcl.h>!<tcl8.3/tcl.h>!' ${WRKSRC}/innd/innd.h
@@ -146,7 +154,7 @@ post-install:
s+!!PREFIX!!+${PREFIX}+g && ${CHMOD} +x ${PREFIX}/etc/rc.d/innd.sh
@${CHOWN} root:news ${PREFIX}/news/bin/auth/passwd/ckpasswd
@${CHMOD} 4755 ${PREFIX}/news/bin/auth/passwd/ckpasswd
- @PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} CHECK-CONF
+ @PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} CHECK-CONF ${ETC_DIR}
@(if [ ! -f ${PREFIX}/news/db/history ] ; then \
${ECHO} 'Creating empty history database...' ; \
cd ${PREFIX}/news/db ; \
diff --git a/news/inn/pkg-install b/news/inn/pkg-install
index fa27dc71c03b..d351162bd33d 100644
--- a/news/inn/pkg-install
+++ b/news/inn/pkg-install
@@ -8,9 +8,9 @@ case $2 in
PRE-INSTALL)
;;
CHECK-CONF)
- NEWSBASE=${PKG_PREFIX}/news
+ ETC_DIR=${3}
echo "Checking for configuration files"
- for f in $(find ${NEWSBASE}/etc/ -name "*.dist" -type f)
+ for f in $(find ${ETC_DIR} -name "*.dist" -type f)
do
REALFILE=${f%%.dist}
echo -n "Checking if ${REALFILE} exists: "
diff --git a/news/inn/pkg-plist b/news/inn/pkg-plist
index 143ce112bda5..82b3b95bc39f 100644
--- a/news/inn/pkg-plist
+++ b/news/inn/pkg-plist
@@ -126,83 +126,83 @@ news/doc/hook-perl
news/doc/hook-python
news/doc/hook-tcl
news/doc/sample-control
-@unexec if cmp -s %D/news/etc/actsync.cfg %D/news/etc/actsync.cfg.dist; then rm -f %D/news/etc/actsync.cfg ; fi
-news/etc/actsync.cfg.dist
+@unexec if cmp -s %D/%%ETCDIR%%/actsync.cfg %D/%%ETCDIR%%/actsync.cfg.dist; then rm -f %D/%%ETCDIR%%/actsync.cfg ; fi
+%%ETCDIR%%/actsync.cfg.dist
@exec [ -f %B/actsync.cfg ] || cp -f %B/%f %B/actsync.cfg
-@unexec if cmp -s %D/news/etc/actsync.ign %D/news/etc/actsync.ign.dist; then rm -f %D/news/etc/actsync.ign ; fi
-news/etc/actsync.ign.dist
+@unexec if cmp -s %D/%%ETCDIR%%/actsync.ign %D/%%ETCDIR%%/actsync.ign.dist; then rm -f %D/%%ETCDIR%%/actsync.ign ; fi
+%%ETCDIR%%/actsync.ign.dist
@exec [ -f %B/actsync.ign ] || cp -f %B/%f %B/actsync.ign
-@unexec if cmp -s %D/news/etc/buffindexed.conf %D/news/etc/buffindexed.conf.dist; then rm -f %D/news/etc/buffindexed.conf ; fi
-news/etc/buffindexed.conf.dist
+@unexec if cmp -s %D/%%ETCDIR%%/buffindexed.conf %D/%%ETCDIR%%/buffindexed.conf.dist; then rm -f %D/%%ETCDIR%%/buffindexed.conf ; fi
+%%ETCDIR%%/buffindexed.conf.dist
@exec [ -f %B/buffindexed.conf ] || cp -f %B%/%f %B/buffindexed.conf
-@unexec if cmp -s %D/news/etc/control.ctl %D/news/etc/control.ctl.dist; then rm -f %D/news/etc/control.ctl ; fi
-news/etc/control.ctl.dist
+@unexec if cmp -s %D/%%ETCDIR%%/control.ctl %D/%%ETCDIR%%/control.ctl.dist; then rm -f %D/%%ETCDIR%%/control.ctl ; fi
+%%ETCDIR%%/control.ctl.dist
@exec [ -f %B/control.ctl ] || cp -f %B/%f %B/control.ctl
-@unexec if cmp -s %D/news/etc/cycbuff.conf %D/news/etc/cycbuff.conf.dist; then rm -f %D/news/etc/cycbuff.conf ; fi
-news/etc/cycbuff.conf.dist
+@unexec if cmp -s %D/%%ETCDIR%%/cycbuff.conf %D/%%ETCDIR%%/cycbuff.conf.dist; then rm -f %D/%%ETCDIR%%/cycbuff.conf ; fi
+%%ETCDIR%%/cycbuff.conf.dist
@exec [ -f %B/cycbuff.conf ] || cp -f %B/%f %B/cycbuff.conf
-@unexec if cmp -s %D/news/etc/distrib.pats %D/news/etc/distrib.pats.dist; then rm -f %D/news/etc/distrib.pats ; fi
-news/etc/distrib.pats.dist
+@unexec if cmp -s %D/%%ETCDIR%%/distrib.pats %D/%%ETCDIR%%/distrib.pats.dist; then rm -f %D/%%ETCDIR%%/distrib.pats ; fi
+%%ETCDIR%%/distrib.pats.dist
@exec [ -f %B/distrib.pats ] || cp -f %B/%f %B/distrib.pats
-@unexec if cmp -s %D/news/etc/expire.ctl %D/news/etc/expire.ctl.dist; then rm -f %D/news/etc/expire.ctl ; fi
-news/etc/expire.ctl.dist
+@unexec if cmp -s %D/%%ETCDIR%%/expire.ctl %D/%%ETCDIR%%/expire.ctl.dist; then rm -f %D/%%ETCDIR%%/expire.ctl ; fi
+%%ETCDIR%%/expire.ctl.dist
@exec [ -f %B/expire.ctl ] || cp -f %B/%f %B/expire.ctl
-@unexec if cmp -s %D/news/etc/incoming.conf %D/news/etc/incoming.conf.dist; then rm -f %D/news/etc/incoming.conf ; fi
-news/etc/incoming.conf.dist
+@unexec if cmp -s %D/%%ETCDIR%%/incoming.conf %D/%%ETCDIR%%/incoming.conf.dist; then rm -f %D/%%ETCDIR%%/incoming.conf ; fi
+%%ETCDIR%%/incoming.conf.dist
@exec [ -f %B/incoming ] || cp -f %B/%f %B/incoming.conf
-@unexec if cmp -s %D/news/etc/inn.conf %D/news/etc/inn.conf.dist; then rm -f %D/news/etc/inn.conf ; fi
-news/etc/inn.conf.dist
+@unexec if cmp -s %D/%%ETCDIR%%/inn.conf %D/%%ETCDIR%%/inn.conf.dist; then rm -f %D/%%ETCDIR%%/inn.conf ; fi
+%%ETCDIR%%/inn.conf.dist
@exec [ -f %B/inn.conf ] || cp -f %B/%f %B/inn.conf
-@unexec if cmp -s %D/news/etc/innfeed.conf %D/news/etc/innfeed.conf.dist; then rm -f %D/news/etc/innfeed.conf ; fi
-news/etc/innfeed.conf.dist
+@unexec if cmp -s %D/%%ETCDIR%%/innfeed.conf %D/%%ETCDIR%%/innfeed.conf.dist; then rm -f %D/%%ETCDIR%%/innfeed.conf ; fi
+%%ETCDIR%%/innfeed.conf.dist
@exec [ -f %B/innfeed.conf.dist ] || cp -f %B/%f %B/innfeed.conf.dist
-@unexec if cmp -s %D/news/etc/innreport.conf %D/news/etc/innreport.conf.dist; then rm -f %D/news/etc/innreport.conf ; fi
-news/etc/innreport.conf.dist
+@unexec if cmp -s %D/%%ETCDIR%%/innreport.conf %D/%%ETCDIR%%/innreport.conf.dist; then rm -f %D/%%ETCDIR%%/innreport.conf ; fi
+%%ETCDIR%%/innreport.conf.dist
@exec [ -f %B/innreport.conf ] || cp -f %B/%f %B/innreport.conf
-@unexec if cmp -s %D/news/etc/innwatch.ctl %D/news/etc/innwatch.ctl.dist; then rm -f %D/news/etc/innwatch.ctl ; fi
-news/etc/innwatch.ctl.dist
+@unexec if cmp -s %D/%%ETCDIR%%/innwatch.ctl %D/%%ETCDIR%%/innwatch.ctl.dist; then rm -f %D/%%ETCDIR%%/innwatch.ctl ; fi
+%%ETCDIR%%/innwatch.ctl.dist
@exec [ -f %B/innwatch.ctl ] || cp -f %B/%f %B/innwatch.ctl
-@unexec if cmp -s %D/news/etc/moderators %D/news/etc/moderators.dist; then rm -f %D/news/etc/moderators ; fi
-news/etc/moderators.dist
+@unexec if cmp -s %D/%%ETCDIR%%/moderators %D/%%ETCDIR%%/moderators.dist; then rm -f %D/%%ETCDIR%%/moderators ; fi
+%%ETCDIR%%/moderators.dist
@exec [ -f %B/moderators ] || cp -f %B/%f %B/moderators
-@unexec if cmp -s %D/news/etc/motd.news %D/news/etc/motd.news.dist; then rm -f %D/news/etc/motd.news ; fi
-news/etc/motd.news.dist
+@unexec if cmp -s %D/%%ETCDIR%%/motd.news %D/%%ETCDIR%%/motd.news.dist; then rm -f %D/%%ETCDIR%%/motd.news ; fi
+%%ETCDIR%%/motd.news.dist
@exec [ -f %B/motd.news ] || cp -f %B/%f %B/motd.news
-@unexec if cmp -s %D/news/etc/news2mail.cf %D/news/etc/news2mail.cf.dist; then rm -f %D/news/etc/news2mail.cf ; fi
-news/etc/news2mail.cf.dist
+@unexec if cmp -s %D/%%ETCDIR%%/news2mail.cf %D/%%ETCDIR%%/news2mail.cf.dist; then rm -f %D/%%ETCDIR%%/news2mail.cf ; fi
+%%ETCDIR%%/news2mail.cf.dist
@exec [ -f %B/news2mail.cf ] || cp -f %B/%f %B/news2mail.cf
-@unexec if cmp -s %D/news/etc/newsfeeds %D/news/etc/newsfeeds.dist; then rm -f %D/news/etc/newsfeeds ; fi
-news/etc/newsfeeds.dist
+@unexec if cmp -s %D/%%ETCDIR%%/newsfeeds %D/%%ETCDIR%%/newsfeeds.dist; then rm -f %D/%%ETCDIR%%/newsfeeds ; fi
+%%ETCDIR%%/newsfeeds.dist
@exec [ -f %B/newsfeeds ] || cp -f %B/%f %B/newsfeeds
-@unexec if cmp -s %D/news/etc/nnrpd.track %D/news/etc/nnrpd.track.dist; then rm -f %D/news/etc/nnrpd.track ; fi
-news/etc/nnrpd.track.dist
+@unexec if cmp -s %D/%%ETCDIR%%/nnrpd.track %D/%%ETCDIR%%/nnrpd.track.dist; then rm -f %D/%%ETCDIR%%/nnrpd.track ; fi
+%%ETCDIR%%/nnrpd.track.dist
@exec [ -f %B/nnrpd.track ] || cp -f %B/%f %B/nnrpd.track
-@unexec if cmp -s %D/news/etc/nntpsend.ctl %D/news/etc/nntpsend.ctl.dist; then rm -f %D/news/etc/nntpsend.ctl ; fi
-news/etc/nntpsend.ctl.dist
+@unexec if cmp -s %D/%%ETCDIR%%/nntpsend.ctl %D/%%ETCDIR%%/nntpsend.ctl.dist; then rm -f %D/%%ETCDIR%%/nntpsend.ctl ; fi
+%%ETCDIR%%/nntpsend.ctl.dist
@exec [ -f %B/nntpsend.ctl ] || cp -f %B/%f %B/nntpsend.ctl
-@unexec if cmp -s %D/news/etc/ovdb.conf %D/news/etc/ovdb.conf.dist; then rm -f %D/news/etc/ovdb.conf ; fi
-news/etc/ovdb.conf.dist
+@unexec if cmp -s %D/%%ETCDIR%%/ovdb.conf %D/%%ETCDIR%%/ovdb.conf.dist; then rm -f %D/%%ETCDIR%%/ovdb.conf ; fi
+%%ETCDIR%%/ovdb.conf.dist
@exec [ -f %B/ovdb.conf ] || cp -f %B/%f %B/ovdb.conf
-@unexec if cmp -s %D/news/etc/overview.fmt %D/news/etc/overview.fmt.dist; then rm -f %D/news/etc/overview.fmt ; fi
-news/etc/overview.fmt.dist
+@unexec if cmp -s %D/%%ETCDIR%%/overview.fmt %D/%%ETCDIR%%/overview.fmt.dist; then rm -f %D/%%ETCDIR%%/overview.fmt ; fi
+%%ETCDIR%%/overview.fmt.dist
@exec [ -f %B/overview.fmt ] || cp -f %B/%f %B/overview.fmt
-@unexec if cmp -s %D/news/etc/passwd.nntp %D/news/etc/passwd.nntp.dist; then rm -f %D/news/etc/passwd.nntp ; fi
-news/etc/passwd.nntp.dist
+@unexec if cmp -s %D/%%ETCDIR%%/passwd.nntp %D/%%ETCDIR%%/passwd.nntp.dist; then rm -f %D/%%ETCDIR%%/passwd.nntp ; fi
+%%ETCDIR%%/passwd.nntp.dist
@exec [ -f %B/passwd.nntp ] || cp -f %B/%f %B/passwd.nntp
-@unexec if cmp -s %D/news/etc/radius.conf %D/news/etc/radius.conf.dist; then rm -f %D/news/etc/radius.conf ; fi
-news/etc/radius.conf.dist
+@unexec if cmp -s %D/%%ETCDIR%%/radius.conf %D/%%ETCDIR%%/radius.conf.dist; then rm -f %D/%%ETCDIR%%/radius.conf ; fi
+%%ETCDIR%%/radius.conf.dist
@exec [ -f %B/radius.conf ] || cp -f %B/%f %B/radius.conf
-@unexec if cmp -s %D/news/etc/readers.conf %D/news/etc/readers.conf.dist; then rm -f %D/news/etc/readers.conf; fi
-news/etc/readers.conf.dist
+@unexec if cmp -s %D/%%ETCDIR%%/readers.conf %D/%%ETCDIR%%/readers.conf.dist; then rm -f %D/%%ETCDIR%%/readers.conf; fi
+%%ETCDIR%%/readers.conf.dist
@exec [ -f %B/readers.conf ] || cp -f %B/%f %B/readers.conf
-@unexec if cmp -s %D/news/etc/sasl.conf %D/news/etc/sasl.conf.dist; then rm -f %D/news/etc/sasl.conf ; fi
-news/etc/sasl.conf.dist
+@unexec if cmp -s %D/%%ETCDIR%%/sasl.conf %D/%%ETCDIR%%/sasl.conf.dist; then rm -f %D/%%ETCDIR%%/sasl.conf ; fi
+%%ETCDIR%%/sasl.conf.dist
@exec [ -f %B/sasl.conf ] || cp -f %B/%f %B/sasl.conf
-@unexec if cmp -s %D/news/etc/storage.conf %D/news/etc/storage.conf.dist; then rm -f %D/news/etc/storage.conf ; fi
-news/etc/storage.conf.dist
+@unexec if cmp -s %D/%%ETCDIR%%/storage.conf %D/%%ETCDIR%%/storage.conf.dist; then rm -f %D/%%ETCDIR%%/storage.conf ; fi
+%%ETCDIR%%/storage.conf.dist
@exec [ -f %B/storage.conf ] || cp -f %B/%f %B/storage.conf
-@unexec if cmp -s %D/news/etc/subscriptions %D/news/etc/subscriptions.dist; then rm -f %D/news/etc/subscriptions ; fi
-news/etc/subscriptions.dist
+@unexec if cmp -s %D/%%ETCDIR%%/subscriptions %D/%%ETCDIR%%/subscriptions.dist; then rm -f %D/%%ETCDIR%%/subscriptions ; fi
+%%ETCDIR%%/subscriptions.dist
@exec [ -f %B/subscriptions ] || cp -f %B/%f %B/subscriptions
news/include/clibrary.h
news/include/conffile.h
@@ -262,7 +262,7 @@ news/lib/libstorage.a
@dirrm news/lib
@dirrm news/include/inn
@dirrm news/include
-@unexec rmdir %D/news/etc 2>/dev/null || true
+@unexec rmdir %D/%%ETCDIR%% 2>/dev/null || true
@dirrm news/doc
@unexec rmdir %D/news/db 2>/dev/null || true
@dirrm news/bin/rnews.libexec