summaryrefslogtreecommitdiff
path: root/news/inn/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'news/inn/Makefile')
-rw-r--r--news/inn/Makefile65
1 files changed, 41 insertions, 24 deletions
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"