Sun Jun 15 13:08:52 2008 UTC ()
Some improvements and fixes:
 * Add usual rc script.
 * Include some perl scripts, add perl:run and replace interpreter line.
   Fixes PR 38893.
 * Use VARBASE instead of hard coded /var.
 * Fix user and group mismatch between configure detection and pkgsrc.
   configure try to detect "ntpcache", "news", "daemon", and "adm".
   pkgsrc had used hard coded "news".
   Now using NNTPCACHE_USER and NNTPCACHE_GROUP.
 * Change to use CONF_FILES framework instead of installing to etc directly.
 * Use *_PERMS instead of some PLIST trick.

Bump PKGREVISION.


(obache)
diff -r1.33 -r1.34 pkgsrc/news/nntpcache/Makefile
diff -r1.9 -r1.10 pkgsrc/news/nntpcache/PLIST
diff -r1.3 -r1.4 pkgsrc/news/nntpcache/options.mk
diff -r1.2 -r0 pkgsrc/news/nntpcache/files/nntpcached.rc
diff -r0 -r1.1 pkgsrc/news/nntpcache/files/nntpcached.sh

cvs diff -r1.33 -r1.34 pkgsrc/news/nntpcache/Makefile (expand / switch to unified diff)

--- pkgsrc/news/nntpcache/Makefile 2008/06/12 01:01:47 1.33
+++ pkgsrc/news/nntpcache/Makefile 2008/06/15 13:08:52 1.34
@@ -1,35 +1,80 @@ @@ -1,35 +1,80 @@
1# $NetBSD: Makefile,v 1.33 2008/06/12 01:01:47 obache Exp $ 1# $NetBSD: Makefile,v 1.34 2008/06/15 13:08:52 obache Exp $
2 2
3DISTNAME= nntpcache-3.0.2 3DISTNAME= nntpcache-3.0.2
 4PKGREVISION= 1
4CATEGORIES= news 5CATEGORIES= news
5MASTER_SITES= http://www.xs4all.nl/~suelette/ 6MASTER_SITES= http://www.xs4all.nl/~suelette/
6 7
7MAINTAINER= pkgsrc-users@NetBSD.org 8MAINTAINER= pkgsrc-users@NetBSD.org
8HOMEPAGE= http://iq.org/~proff/nntpcache.org/ 9HOMEPAGE= http://iq.org/~proff/nntpcache.org/
9COMMENT= NNTP multi-server caching daemon 10COMMENT= NNTP multi-server caching daemon
10 11
11LICENSE= fee-based-commercial-use 12LICENSE= nntpcache-license
 13
 14.include "../../mk/bsd.prefs.mk"
 15
 16NNTPCACHE_USER?= news
 17NNTPCACHE_GROUP?= news
 18PKG_GROUPS= ${NNTPCACHE_GROUP}
 19PKG_USERS= ${NNTPCACHE_USER}:${NNTPCACHE_GROUP}
 20PKG_GROUPS_VARS+= NNTPCACHE_GROUP
 21PKG_USERS_VARS+= NNTPCACHE_USER
 22
 23NNTPCACHE_DIR= ${VARBASE}/spool/nntpcache
 24
 25REQD_DIRS_PERMS+= ${NNTPCACHE_DIR} ${NNTPCACHE_USER} ${NNTPCACHE_GROUP} 700
12 26
13.include "options.mk" 27.include "options.mk"
14 28
15GNU_CONFIGURE= yes 29GNU_CONFIGURE= yes
16CONFIGURE_ARGS+= --localstatedir=${VARBASE}/spool 30CONFIGURE_ENV+= cacheDir=${NNTPCACHE_DIR}
 31CONFIGURE_ENV+= configDir=${PKG_SYSCONFDIR}
17CONFIGURE_ENV+= INSTALL_SCRIPT=${INSTALL_SCRIPT:Q} 32CONFIGURE_ENV+= INSTALL_SCRIPT=${INSTALL_SCRIPT:Q}
18USE_TOOLS+= gmake 33CONFIGURE_ENV+= nc_cv_UID=${NNTPCACHE_USER}
 34CONFIGURE_ENV+= nc_cv_GID=${NNTPCACHE_GROUP}
 35USE_TOOLS+= gmake perl:run
19BUILD_DEFS+= VARBASE 36BUILD_DEFS+= VARBASE
20 37
21INSTALL_TARGET= SUBDIRS="cf src filters http doc pgp contrib/newshound contrib/perlnewshound innreport scripts unixauth" \ 38PKG_SYSCONFSUBDIR= nntpcache
22 install 39
23INSTALLATION_DIRS= libexec share/doc/nntpcache 40INSTALL_MAKE_FLAGS+= SUBDIRS="cf src filters http doc pgp contrib/newshound contrib/perlnewshound innreport scripts unixauth"
24 41INSTALL_MAKE_FLAGS+= sysconfdir=${PREFIX}/share/examples/nntpcache
25post-configure: 42INSTALLATION_DIRS= libexec share/doc/nntpcache share/examples/nntpcache
26 @${SED} -e "s:%%PREFIX%%:${PREFIX}:g" \ 43
27 ${FILESDIR}/nntpcached.rc > ${WRKSRC}/nntpcached.sh 44RCD_SCRIPTS= nntpcached
 45
 46REQD_FILES_PERMS+= share/examples/nntpcache/VERSION \
 47 ${NNTPCACHE_DIR}/VERSION \
 48 ${NNTPCACHE_USER} ${NNTPCACHE_GROUP} 600
 49PKG_SYSCONFDIR_PERMS+= ${NNTPCACHE_USER} ${NNTPCACHE_GROUP} 700
 50CONF_FILES_PERMS+= share/examples/nntpcache/nntpcache.access \
 51 ${PKG_SYSCONFDIR}/nntpcache.access \
 52 ${NNTPCACHE_USER} ${NNTPCACHE_GROUP} 600
 53CONF_FILES_PERMS+= share/examples/nntpcache/nntpcache.config \
 54 ${PKG_SYSCONFDIR}/nntpcache.config \
 55 ${NNTPCACHE_USER} ${NNTPCACHE_GROUP} 600
 56CONF_FILES_PERMS+= share/examples/nntpcache/nntpcache.servers \
 57 ${PKG_SYSCONFDIR}/nntpcache.servers \
 58 ${NNTPCACHE_USER} ${NNTPCACHE_GROUP} 600
 59CONF_FILES_PERMS+= share/examples/nntpcache/pubring.asc \
 60 ${PKG_SYSCONFDIR}/pubring.asc \
 61 ${NNTPCACHE_USER} ${NNTPCACHE_GROUP} 600
 62CONF_FILES_PERMS+= share/examples/nntpcache/pubring.asc \
 63 ${PKG_SYSCONFDIR}/pubring.asc \
 64 ${NNTPCACHE_USER} ${NNTPCACHE_GROUP} 600
 65CONF_FILES_PERMS+= share/examples/nntpcache/pubring.pgp \
 66 ${PKG_SYSCONFDIR}/pubring.pgp \
 67 ${NNTPCACHE_USER} ${NNTPCACHE_GROUP} 600
 68CONF_FILES_PERMS+= share/examples/nntpcache/spam.filter \
 69 ${PKG_SYSCONFDIR}/spam.filter \
 70 ${NNTPCACHE_USER} ${NNTPCACHE_GROUP} 600
 71SPECIAL_PERMS+= libexec/unixauth ${ROOT_USER} ${NNTPCACHE_GROUP} 4554
 72
 73REPLACE_PERL+= innreport/innreport.pl innreport/innreport.pm
 74REPLACE_PERL+= contrib/perlnewshound/newshound.pl
28 75
29post-install: 76post-install:
30 ${INSTALL_DATA_DIR} ${PREFIX}/etc/rc.d 
31 ${INSTALL_SCRIPT} ${WRKSRC}/nntpcached.sh ${PREFIX}/etc/rc.d/nntpcached 
32 cd ${WRKSRC} && ${INSTALL_DATA} README INSTALL FAQ FAQ.html LICENSING \ 77 cd ${WRKSRC} && ${INSTALL_DATA} README INSTALL FAQ FAQ.html LICENSING \
33 README.INN README.pam ChangeLog ${PREFIX}/share/doc/nntpcache/ 78 README.INN README.pam ChangeLog ${DESTDIR}${PREFIX}/share/doc/nntpcache/
34 79
35.include "../../mk/bsd.pkg.mk" 80.include "../../mk/bsd.pkg.mk"

cvs diff -r1.9 -r1.10 pkgsrc/news/nntpcache/PLIST (expand / switch to unified diff)

--- pkgsrc/news/nntpcache/PLIST 2002/12/09 16:01:36 1.9
+++ pkgsrc/news/nntpcache/PLIST 2008/06/15 13:08:52 1.10
@@ -1,50 +1,45 @@ @@ -1,50 +1,45 @@
1@comment $NetBSD: PLIST,v 1.9 2002/12/09 16:01:36 tron Exp $ 1@comment $NetBSD: PLIST,v 1.10 2008/06/15 13:08:52 obache Exp $
2etc/nntpcache/VERSION 
3etc/nntpcache/innreport.conf-dist 
4etc/nntpcache/innreport.pl 
5etc/nntpcache/innreport.pm 
6etc/nntpcache/newshound.conf-dist 
7etc/nntpcache/nntpcache.access-dist 
8etc/nntpcache/nntpcache.access 
9etc/nntpcache/nntpcache.config-dist 
10etc/nntpcache/nntpcache.config 
11etc/nntpcache/nntpcache.servers-dist 
12etc/nntpcache/nntpcache.servers 
13etc/nntpcache/pubring.asc-dist 
14etc/nntpcache/pubring.asc 
15etc/nntpcache/pubring.pgp-dist 
16etc/nntpcache/pubring.pgp 
17etc/nntpcache/spam.filter 
18etc/nntpcache/http/index.html 
19etc/nntpcache/http/moose.gif 
20etc/nntpcache/http/nntpcache.jpg 
21@exec ${MKDIR} %D/etc/nntpcache/http/innreport/pics 
22@exec ${CHOWN} -R news:news %D/etc/nntpcache 
23@exec ${CHMOD} 700 %D/etc/nntpcache 
24@unexec ${RMDIR} -p %D/etc/nntpcache/http/innreport/pics 2>/dev/null || ${TRUE} 
25etc/rc.d/nntpcached 
26sbin/innreport.sh 
27sbin/newshound 
28sbin/newshound.pl 
29sbin/nntpcached 
30libexec/unixauth 
31libexec/nntpcached.debug 
32libexec/nntpcache-gdb.sh 2libexec/nntpcache-gdb.sh
33libexec/nntpcache.gdb 3libexec/nntpcache.gdb
 4libexec/nntpcached.debug
 5libexec/unixauth
34man/man8/newshound.8 6man/man8/newshound.8
35man/man8/nntpcached.8 7man/man8/nntpcached.8
36@unexec ${RMDIR} %D/etc/nntpcache 2>/dev/null || ${TRUE} 8sbin/innreport.sh
37@exec ${MKDIR} /var/spool/nntpcache 9sbin/newshound
38@exec cp %D/etc/nntpcache/VERSION /var/spool/nntpcache/VERSION 10sbin/newshound.pl
39@exec ${CHOWN} -R news:news /var/spool/nntpcache 11sbin/nntpcached
40@exec ${CHMOD} 700 /var/spool/nntpcache 
41@unexec ${RM} -rf /var/spool/nntpcache 
42share/doc/nntpcache/ChangeLog 12share/doc/nntpcache/ChangeLog
43share/doc/nntpcache/FAQ 13share/doc/nntpcache/FAQ
44share/doc/nntpcache/FAQ.html 14share/doc/nntpcache/FAQ.html
45share/doc/nntpcache/INSTALL 15share/doc/nntpcache/INSTALL
46share/doc/nntpcache/LICENSING 16share/doc/nntpcache/LICENSING
47share/doc/nntpcache/README 17share/doc/nntpcache/README
48share/doc/nntpcache/README.INN 18share/doc/nntpcache/README.INN
49share/doc/nntpcache/README.pam 19share/doc/nntpcache/README.pam
 20share/examples/nntpcache/VERSION
 21share/examples/nntpcache/http/index.html
 22share/examples/nntpcache/http/moose.gif
 23share/examples/nntpcache/http/nntpcache.jpg
 24share/examples/nntpcache/innreport.conf-dist
 25share/examples/nntpcache/innreport.pl
 26share/examples/nntpcache/innreport.pm
 27share/examples/nntpcache/newshound.conf-dist
 28share/examples/nntpcache/nntpcache.access
 29share/examples/nntpcache/nntpcache.access-dist
 30share/examples/nntpcache/nntpcache.config
 31share/examples/nntpcache/nntpcache.config-dist
 32share/examples/nntpcache/nntpcache.servers
 33share/examples/nntpcache/nntpcache.servers-dist
 34share/examples/nntpcache/pubring.asc
 35share/examples/nntpcache/pubring.asc-dist
 36share/examples/nntpcache/pubring.pgp
 37share/examples/nntpcache/pubring.pgp-dist
 38share/examples/nntpcache/spam.filter
 39@exec ${MKDIR} %D/share/examples/nntpcache/http/innreport/pics
 40share/examples/rc.d/nntpcached
 41@dirrm share/examples/nntpcache/http/innreport/pics
 42@dirrm share/examples/nntpcache/http/innreport
 43@dirrm share/examples/nntpcache/http
 44@dirrm share/examples/nntpcache
50@dirrm share/doc/nntpcache 45@dirrm share/doc/nntpcache

cvs diff -r1.3 -r1.4 pkgsrc/news/nntpcache/options.mk (expand / switch to unified diff)

--- pkgsrc/news/nntpcache/options.mk 2006/05/31 18:22:25 1.3
+++ pkgsrc/news/nntpcache/options.mk 2008/06/15 13:08:52 1.4
@@ -1,20 +1,21 @@ @@ -1,20 +1,21 @@
1# $NetBSD: options.mk,v 1.3 2006/05/31 18:22:25 ghen Exp $ 1# $NetBSD: options.mk,v 1.4 2008/06/15 13:08:52 obache Exp $
2 2
3PKG_OPTIONS_VAR= PKG_OPTIONS.nntpcache 3PKG_OPTIONS_VAR= PKG_OPTIONS.nntpcache
4PKG_SUPPORTED_OPTIONS= nntpcache-pgp 4PKG_SUPPORTED_OPTIONS= nntpcache-pgp
5# compile error: 5# compile error:
6# authinfo_ldap.c: In function `ldap_got_pass': 6# authinfo_ldap.c: In function `ldap_got_pass':
7# authinfo_ldap.c:81: error: dereferencing pointer to incomplete type 7# authinfo_ldap.c:81: error: dereferencing pointer to incomplete type
8# authinfo_ldap.c:47: warning: unused variable `dom' 8# authinfo_ldap.c:47: warning: unused variable `dom'
9# PKG_SUPPORTED_OPTIONS+= openldap 9# PKG_SUPPORTED_OPTIONS+= openldap
10 10
11.include "../../mk/bsd.options.mk" 11.include "../../mk/bsd.options.mk"
12 12
13.if !empty(PKG_OPTIONS:Mnntpcache-pgp) 13.if !empty(PKG_OPTIONS:Mnntpcache-pgp)
14DEPENDS+= pgp-2.*:../../security/pgp2 14DEPENDS+= pgp-2.*:../../security/pgp2
 15CONFIGURE_ENV+= ac_cv_path_PGP=${PREFIX}/bin/pgp
15.endif 16.endif
16 17
17.if !empty(PKG_OPTIONS:Mopenldap) 18.if !empty(PKG_OPTIONS:Mopenldap)
18CONFIGURE_ARGS+= --with-authinfo-ldap 19CONFIGURE_ARGS+= --with-authinfo-ldap
19.include "../../databases/openldap-client/buildlink3.mk" 20.include "../../databases/openldap-client/buildlink3.mk"
20.endif 21.endif

File Deleted: pkgsrc/news/nntpcache/files/Attic/nntpcached.rc

File Added: pkgsrc/news/nntpcache/files/nntpcached.sh
#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD: nntpcached.sh,v 1.1 2008/06/15 13:08:52 obache Exp $
#
# PROVIDE: nntpcached
# REQUIRE: NETWORKING SERVERS
# KEYWORD: shutdown

. /etc/rc.subr

name="nntpcached"
rcvar=${name}
command="@PREFIX@/sbin/${name}"

load_rc_config ${name}
run_rc_command "$1"