summaryrefslogtreecommitdiff
path: root/news/inn
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2002-09-29 10:39:35 +0000
committerjlam <jlam@pkgsrc.org>2002-09-29 10:39:35 +0000
commitbaaf87b430efcf4e3a31370eddf83fc3d4b8c5b4 (patch)
tree4036f1009d4bcbbd3553b00a8c20858240abab62 /news/inn
parent0fcb7144a972c46943665e904ef7aa9e72ef71f6 (diff)
downloadpkgsrc-baaf87b430efcf4e3a31370eddf83fc3d4b8c5b4.tar.gz
* buildlink1 -> buildlink2
* Use gcc/buildlink2.mk instead of Makefile.gcc. * Use the functionality on bsd.pkg.install.mk to generate INSTALL/DEINSTALL scripts that match the functionality of the custom ones we're removing, and handle the rc.d script automatically. * Name the full paths of the binaries that are installed setuid.
Diffstat (limited to 'news/inn')
-rw-r--r--news/inn/DEINSTALL20
-rw-r--r--news/inn/INSTALL37
-rw-r--r--news/inn/MESSAGE8
-rw-r--r--news/inn/Makefile65
-rw-r--r--news/inn/PLIST4
-rw-r--r--news/inn/files/innd.sh4
6 files changed, 49 insertions, 89 deletions
diff --git a/news/inn/DEINSTALL b/news/inn/DEINSTALL
deleted file mode 100644
index 5c8283d9532..00000000000
--- a/news/inn/DEINSTALL
+++ /dev/null
@@ -1,20 +0,0 @@
-#! /bin/sh
-#
-# $NetBSD: DEINSTALL,v 1.1 2001/10/31 21:03:41 zuntum Exp $
-
-case "$2" in
- DEINSTALL) cat <<EOF
-
-==========================================================================
-
-Note that the inn data directory (@@INN_DATA_DIR@@) is NOT deleted during
-the package deinstallation. Please remove this directory and all its
-contents manually if it is no longer needed.
-
-==========================================================================
-
-EOF
- ;;
-esac
-
-exit 0
diff --git a/news/inn/INSTALL b/news/inn/INSTALL
deleted file mode 100644
index cbfac345304..00000000000
--- a/news/inn/INSTALL
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: INSTALL,v 1.1 2001/10/31 21:03:42 zuntum Exp $
-
-if [ "$2" != "POST-INSTALL" ]; then
- exit 0
-fi
-
-if [ ! -d @@INN_DATA_DIR@@ ]; then
- mkdir -p @@INN_DATA_DIR@@
- chown news:news @@INN_DATA_DIR@@
- chmod 775 @@INN_DATA_DIR@@
-fi
-
-DIRS="db etc log log/OLD run spool tmp"
-for DIR in $DIRS; do
- if [ ! -d @@INN_DATA_DIR@@/$DIR ]; then
- install -d -o news -g news -m 775 @@INN_DATA_DIR@@/$DIR
- fi
-done
-
-SPOOLS="articles overview archive incoming incoming/bad outgoing uniover innfeed"
-for DIR in $SPOOLS; do
- if [ ! -d @@INN_DATA_DIR@@/spool/$DIR ]; then
- install -d -o news -g news -m 775 @@INN_DATA_DIR@@/spool/$DIR
- fi
-done
-
-ETC="actsync.cfg actsync.ign buffindexed.conf control.ctl cycbuff.conf distrib.pats expire.ctl incoming.conf inn.conf innfeed.conf innreport.conf innwatch.ctl moderators motd.news news2mail.cf newsfeeds nnrpd.track nntpsend.ctl ovdb.conf overview.fmt passwd.nntp radius.conf readers.conf sasl.conf storage.conf"
-
-for FILE in $ETC; do
- if [ ! -f @@INN_DATA_DIR@@/etc/$FILE ]; then
- install -c -o news -g news -m 664 ${PKG_PREFIX}/share/examples/inn/$FILE @@INN_DATA_DIR@@/etc
- fi
-done
-
-exit 0
diff --git a/news/inn/MESSAGE b/news/inn/MESSAGE
index 1ccf25ff807..aa795aa4ae6 100644
--- a/news/inn/MESSAGE
+++ b/news/inn/MESSAGE
@@ -1,7 +1,9 @@
===========================================================================
-$NetBSD: MESSAGE,v 1.2 2002/09/24 12:30:28 wiz Exp $
+$NetBSD: MESSAGE,v 1.3 2002/09/29 10:39:36 jlam Exp $
-The following programs have been installed suid root on your
-machine: inndstart, startinnfeed
+The following programs have been installed suid root on your machine:
+
+ ${PREFIX}/inn/bin/inndstart
+ ${PREFIX}/inn/bin/startinnfeed
===========================================================================
diff --git a/news/inn/Makefile b/news/inn/Makefile
index 034dbdc5b97..661d0a156ba 100644
--- a/news/inn/Makefile
+++ b/news/inn/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.36 2002/08/27 15:27:46 grant Exp $
+# $NetBSD: Makefile,v 1.37 2002/09/29 10:39:36 jlam Exp $
DISTNAME= inn-2.3.3
CATEGORIES= news
@@ -17,8 +17,10 @@ PATCHFILES= inn-2.3.3-v6-20020618.diff.gz
PATCH_DIST_STRIP= -p1
INN_DATA_DIR?= /var/news
+BUILD_DEFS+= INN_DATA_DIR
+FILES_SUBST+= INN_DATA_DIR=${INN_DATA_DIR}
-USE_PERL5= YES
+USE_BUILDLINK2= YES
GNU_CONFIGURE= YES
GNU_CONFIGURE_PREFIX= ${PREFIX}/inn
CONFIGURE_ARGS+= --enable-setgid-inews \
@@ -35,6 +37,35 @@ CONFIGURE_ENV+= _PATH_PERL=${PERL5}
PKG_USERS= news:news::Internet\\ News:${INN_DATA_DIR}:${SH}
PKG_GROUPS= news
+PKG_SYSCONFDIR.inn= ${INN_DATA_DIR}/etc
+EXAMPLEDIR= ${PREFIX}/share/examples/inn
+INN_DATADIRS= db etc log log/OLD run spool tmp
+INN_SPOOLDIRS= articles overview incoming incoming/bad \
+ outgoing uniover innfeed
+
+OWN_DIRS= ${PREFIX}/etc/nntp
+OWN_DIRS_PERMS= ${INN_DATA_DIR} news news 0775
+.for DIR in ${INN_DATADIRS}
+MAKE_DIRS_PERMS+= ${INN_DATA_DIR}/${DIR} news news 0775
+.endfor
+.for DIR in ${INN_SPOOLDIRS}
+MAKE_DIRS_PERMS+= ${INN_DATA_DIR}/spool/${DIR} news news 0775
+.endfor
+
+CFILES= actsync.cfg actsync.ign buffindexed.conf \
+ control.ctl cycbuff.conf distrib.pats \
+ expire.ctl incoming.conf inn.conf innfeed.conf \
+ innreport.conf innwatch.ctl moderators \
+ motd.news news2mail.cf newsfeeds nnrpd.track \
+ nntpsend.ctl ovdb.conf overview.fmt passwd.nntp \
+ radius.conf readers.conf sasl.conf storage.conf
+.for FILE in ${CFILES}
+CONF_FILES_PERMS+= ${EXAMPLEDIR}/${FILE} ${PKG_SYSCONFDIR}/${FILE} \
+ news news 0664
+.endfor
+
+RCD_SCRIPTS= innd
+
.include "../../mk/bsd.prefs.mk"
# IPv6 support
@@ -51,22 +82,10 @@ CONFIGURE_ARGS+= --with-sendmail=/usr/sbin/sendmail
.endif
.if (${MACHINE_ARCH} == arm32)
-.include "../../lang/gcc/Makefile.gcc"
+. include "../../lang/gcc/buildlink2.mk"
.endif
-DEINSTALL_FILE= ${WRKDIR}/DEINSTALL
-INSTALL_FILE= ${WRKDIR}/INSTALL
-
-BUILD_DEFS+= INN_DATA_DIR
-
post-build:
- ${SED} -e 's#@INN_DATA_DIR@#${INN_DATA_DIR}#g' \
- -e 's#@PREFIX@#${PREFIX}#g' \
- ${FILESDIR}/innd.sh >${WRKDIR}/innd.sh
-.for FILE in DEINSTALL INSTALL
- ${SED} -e 's#@INN_DATA_DIR@#${INN_DATA_DIR}#g' \
- ${PKGDIR}/${FILE} >${WRKDIR}/${FILE}
-.endfor
for DIR in backends expire frontends innd innfeed lib nnrpd \
storage; do \
${SED} -e 's#-b .OLD##' -e 's#-G#-g#' -e 's#-O#-o#' \
@@ -77,21 +96,19 @@ post-build:
done
pre-install:
- for DIR in ${INN_DATA_DIR} ${PREFIX}/etc/nntp ${PREFIX}/inn; do \
- ${INSTALL_DATA_DIR} $$DIR; \
+ for DIR in ${INN_DATA_DIR} ${PREFIX}/etc/nntp ${PREFIX}/inn; do \
+ ${INSTALL_DATA_DIR} $$DIR; \
done
post-install:
${RM} -f ${PREFIX}/bin/inews
${LN} -s ../inn/bin/inews ${PREFIX}/bin/inews
- ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/inn
- for FILE in `ls -1 ${WRKSRC}/samples/* | \
- ${EGREP} -v '(Makefile|.*\.(in|orig)$$)'`; do \
- ${INSTALL_DATA} $$FILE ${PREFIX}/share/examples/inn; \
+ ${INSTALL_DATA_DIR} ${EXAMPLEDIR}
+ for FILE in `ls -1 ${WRKSRC}/samples/* | \
+ ${EGREP} -v '(Makefile|.*\.(in|orig)$$)'`; do \
+ ${INSTALL_DATA} $$FILE ${EXAMPLEDIR}; \
done
- cd ${WRKSRC}/site && \
- ${INSTALL_SCRIPT} ${WRKDIR}/innd.sh ${PREFIX}/etc/rc.d/innd
- PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL
+.include "../../lang/perl5/buildlink2.mk"
.include "../../mk/bsd.pkg.install.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/news/inn/PLIST b/news/inn/PLIST
index 1e6794d53ff..c4be50a2dde 100644
--- a/news/inn/PLIST
+++ b/news/inn/PLIST
@@ -1,7 +1,5 @@
-@comment $NetBSD: PLIST,v 1.3 2002/06/26 10:29:53 seb Exp $
+@comment $NetBSD: PLIST,v 1.4 2002/09/29 10:39:36 jlam Exp $
bin/inews
-@exec ${MKDIR} %D/etc/nntp
-@unexec ${RM} -rf %D/etc/nntp
etc/rc.d/innd
inn/bin/actmerge
inn/bin/actsync
diff --git a/news/inn/files/innd.sh b/news/inn/files/innd.sh
index 7bf8f9eb15c..90494923e26 100644
--- a/news/inn/files/innd.sh
+++ b/news/inn/files/innd.sh
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: innd.sh,v 1.12 2002/08/27 15:27:03 grant Exp $
+# $NetBSD: innd.sh,v 1.13 2002/09/29 10:39:36 jlam Exp $
#
# PROVIDE: inn
# REQUIRE: DAEMON
@@ -15,7 +15,7 @@ then
if [ ! -f @PREFIX@/etc/nntp/domainname ]
then
- (set - X `grep ^fromhost: @INN_DATA_DIR@/etc/inn.conf`
+ (set - X `grep ^fromhost: @PKG_SYSCONFDIR@/inn.conf`
if [ $# -eq 3 ]
then
echo $3 >@PREFIX@/etc/nntp/domainname