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.diff -r1.33 -r1.34 pkgsrc/news/nntpcache/Makefile
(obache)
@@ -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 | |||
3 | DISTNAME= nntpcache-3.0.2 | 3 | DISTNAME= nntpcache-3.0.2 | |
4 | PKGREVISION= 1 | |||
4 | CATEGORIES= news | 5 | CATEGORIES= news | |
5 | MASTER_SITES= http://www.xs4all.nl/~suelette/ | 6 | MASTER_SITES= http://www.xs4all.nl/~suelette/ | |
6 | 7 | |||
7 | MAINTAINER= pkgsrc-users@NetBSD.org | 8 | MAINTAINER= pkgsrc-users@NetBSD.org | |
8 | HOMEPAGE= http://iq.org/~proff/nntpcache.org/ | 9 | HOMEPAGE= http://iq.org/~proff/nntpcache.org/ | |
9 | COMMENT= NNTP multi-server caching daemon | 10 | COMMENT= NNTP multi-server caching daemon | |
10 | 11 | |||
11 | LICENSE= fee-based-commercial-use | 12 | LICENSE= nntpcache-license | |
13 | ||||
14 | .include "../../mk/bsd.prefs.mk" | |||
15 | ||||
16 | NNTPCACHE_USER?= news | |||
17 | NNTPCACHE_GROUP?= news | |||
18 | PKG_GROUPS= ${NNTPCACHE_GROUP} | |||
19 | PKG_USERS= ${NNTPCACHE_USER}:${NNTPCACHE_GROUP} | |||
20 | PKG_GROUPS_VARS+= NNTPCACHE_GROUP | |||
21 | PKG_USERS_VARS+= NNTPCACHE_USER | |||
22 | ||||
23 | NNTPCACHE_DIR= ${VARBASE}/spool/nntpcache | |||
24 | ||||
25 | REQD_DIRS_PERMS+= ${NNTPCACHE_DIR} ${NNTPCACHE_USER} ${NNTPCACHE_GROUP} 700 | |||
12 | 26 | |||
13 | .include "options.mk" | 27 | .include "options.mk" | |
14 | 28 | |||
15 | GNU_CONFIGURE= yes | 29 | GNU_CONFIGURE= yes | |
16 | CONFIGURE_ARGS+= --localstatedir=${VARBASE}/spool | 30 | CONFIGURE_ENV+= cacheDir=${NNTPCACHE_DIR} | |
31 | CONFIGURE_ENV+= configDir=${PKG_SYSCONFDIR} | |||
17 | CONFIGURE_ENV+= INSTALL_SCRIPT=${INSTALL_SCRIPT:Q} | 32 | CONFIGURE_ENV+= INSTALL_SCRIPT=${INSTALL_SCRIPT:Q} | |
18 | USE_TOOLS+= gmake | 33 | CONFIGURE_ENV+= nc_cv_UID=${NNTPCACHE_USER} | |
34 | CONFIGURE_ENV+= nc_cv_GID=${NNTPCACHE_GROUP} | |||
35 | USE_TOOLS+= gmake perl:run | |||
19 | BUILD_DEFS+= VARBASE | 36 | BUILD_DEFS+= VARBASE | |
20 | 37 | |||
21 | INSTALL_TARGET= SUBDIRS="cf src filters http doc pgp contrib/newshound contrib/perlnewshound innreport scripts unixauth" \ | 38 | PKG_SYSCONFSUBDIR= nntpcache | |
22 | install | 39 | ||
23 | INSTALLATION_DIRS= libexec share/doc/nntpcache | 40 | INSTALL_MAKE_FLAGS+= SUBDIRS="cf src filters http doc pgp contrib/newshound contrib/perlnewshound innreport scripts unixauth" | |
24 | 41 | INSTALL_MAKE_FLAGS+= sysconfdir=${PREFIX}/share/examples/nntpcache | ||
25 | post-configure: | 42 | INSTALLATION_DIRS= libexec share/doc/nntpcache share/examples/nntpcache | |
26 | @${SED} -e "s:%%PREFIX%%:${PREFIX}:g" \ | 43 | ||
27 | ${FILESDIR}/nntpcached.rc > ${WRKSRC}/nntpcached.sh | 44 | RCD_SCRIPTS= nntpcached | |
45 | ||||
46 | REQD_FILES_PERMS+= share/examples/nntpcache/VERSION \ | |||
47 | ${NNTPCACHE_DIR}/VERSION \ | |||
48 | ${NNTPCACHE_USER} ${NNTPCACHE_GROUP} 600 | |||
49 | PKG_SYSCONFDIR_PERMS+= ${NNTPCACHE_USER} ${NNTPCACHE_GROUP} 700 | |||
50 | CONF_FILES_PERMS+= share/examples/nntpcache/nntpcache.access \ | |||
51 | ${PKG_SYSCONFDIR}/nntpcache.access \ | |||
52 | ${NNTPCACHE_USER} ${NNTPCACHE_GROUP} 600 | |||
53 | CONF_FILES_PERMS+= share/examples/nntpcache/nntpcache.config \ | |||
54 | ${PKG_SYSCONFDIR}/nntpcache.config \ | |||
55 | ${NNTPCACHE_USER} ${NNTPCACHE_GROUP} 600 | |||
56 | CONF_FILES_PERMS+= share/examples/nntpcache/nntpcache.servers \ | |||
57 | ${PKG_SYSCONFDIR}/nntpcache.servers \ | |||
58 | ${NNTPCACHE_USER} ${NNTPCACHE_GROUP} 600 | |||
59 | CONF_FILES_PERMS+= share/examples/nntpcache/pubring.asc \ | |||
60 | ${PKG_SYSCONFDIR}/pubring.asc \ | |||
61 | ${NNTPCACHE_USER} ${NNTPCACHE_GROUP} 600 | |||
62 | CONF_FILES_PERMS+= share/examples/nntpcache/pubring.asc \ | |||
63 | ${PKG_SYSCONFDIR}/pubring.asc \ | |||
64 | ${NNTPCACHE_USER} ${NNTPCACHE_GROUP} 600 | |||
65 | CONF_FILES_PERMS+= share/examples/nntpcache/pubring.pgp \ | |||
66 | ${PKG_SYSCONFDIR}/pubring.pgp \ | |||
67 | ${NNTPCACHE_USER} ${NNTPCACHE_GROUP} 600 | |||
68 | CONF_FILES_PERMS+= share/examples/nntpcache/spam.filter \ | |||
69 | ${PKG_SYSCONFDIR}/spam.filter \ | |||
70 | ${NNTPCACHE_USER} ${NNTPCACHE_GROUP} 600 | |||
71 | SPECIAL_PERMS+= libexec/unixauth ${ROOT_USER} ${NNTPCACHE_GROUP} 4554 | |||
72 | ||||
73 | REPLACE_PERL+= innreport/innreport.pl innreport/innreport.pm | |||
74 | REPLACE_PERL+= contrib/perlnewshound/newshound.pl | |||
28 | 75 | |||
29 | post-install: | 76 | post-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" |
@@ -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 $ | |
2 | etc/nntpcache/VERSION | |||
3 | etc/nntpcache/innreport.conf-dist | |||
4 | etc/nntpcache/innreport.pl | |||
5 | etc/nntpcache/innreport.pm | |||
6 | etc/nntpcache/newshound.conf-dist | |||
7 | etc/nntpcache/nntpcache.access-dist | |||
8 | etc/nntpcache/nntpcache.access | |||
9 | etc/nntpcache/nntpcache.config-dist | |||
10 | etc/nntpcache/nntpcache.config | |||
11 | etc/nntpcache/nntpcache.servers-dist | |||
12 | etc/nntpcache/nntpcache.servers | |||
13 | etc/nntpcache/pubring.asc-dist | |||
14 | etc/nntpcache/pubring.asc | |||
15 | etc/nntpcache/pubring.pgp-dist | |||
16 | etc/nntpcache/pubring.pgp | |||
17 | etc/nntpcache/spam.filter | |||
18 | etc/nntpcache/http/index.html | |||
19 | etc/nntpcache/http/moose.gif | |||
20 | etc/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} | |||
25 | etc/rc.d/nntpcached | |||
26 | sbin/innreport.sh | |||
27 | sbin/newshound | |||
28 | sbin/newshound.pl | |||
29 | sbin/nntpcached | |||
30 | libexec/unixauth | |||
31 | libexec/nntpcached.debug | |||
32 | libexec/nntpcache-gdb.sh | 2 | libexec/nntpcache-gdb.sh | |
33 | libexec/nntpcache.gdb | 3 | libexec/nntpcache.gdb | |
4 | libexec/nntpcached.debug | |||
5 | libexec/unixauth | |||
34 | man/man8/newshound.8 | 6 | man/man8/newshound.8 | |
35 | man/man8/nntpcached.8 | 7 | man/man8/nntpcached.8 | |
36 | @unexec ${RMDIR} %D/etc/nntpcache 2>/dev/null || ${TRUE} | 8 | sbin/innreport.sh | |
37 | @exec ${MKDIR} /var/spool/nntpcache | 9 | sbin/newshound | |
38 | @exec cp %D/etc/nntpcache/VERSION /var/spool/nntpcache/VERSION | 10 | sbin/newshound.pl | |
39 | @exec ${CHOWN} -R news:news /var/spool/nntpcache | 11 | sbin/nntpcached | |
40 | @exec ${CHMOD} 700 /var/spool/nntpcache | |||
41 | @unexec ${RM} -rf /var/spool/nntpcache | |||
42 | share/doc/nntpcache/ChangeLog | 12 | share/doc/nntpcache/ChangeLog | |
43 | share/doc/nntpcache/FAQ | 13 | share/doc/nntpcache/FAQ | |
44 | share/doc/nntpcache/FAQ.html | 14 | share/doc/nntpcache/FAQ.html | |
45 | share/doc/nntpcache/INSTALL | 15 | share/doc/nntpcache/INSTALL | |
46 | share/doc/nntpcache/LICENSING | 16 | share/doc/nntpcache/LICENSING | |
47 | share/doc/nntpcache/README | 17 | share/doc/nntpcache/README | |
48 | share/doc/nntpcache/README.INN | 18 | share/doc/nntpcache/README.INN | |
49 | share/doc/nntpcache/README.pam | 19 | share/doc/nntpcache/README.pam | |
20 | share/examples/nntpcache/VERSION | |||
21 | share/examples/nntpcache/http/index.html | |||
22 | share/examples/nntpcache/http/moose.gif | |||
23 | share/examples/nntpcache/http/nntpcache.jpg | |||
24 | share/examples/nntpcache/innreport.conf-dist | |||
25 | share/examples/nntpcache/innreport.pl | |||
26 | share/examples/nntpcache/innreport.pm | |||
27 | share/examples/nntpcache/newshound.conf-dist | |||
28 | share/examples/nntpcache/nntpcache.access | |||
29 | share/examples/nntpcache/nntpcache.access-dist | |||
30 | share/examples/nntpcache/nntpcache.config | |||
31 | share/examples/nntpcache/nntpcache.config-dist | |||
32 | share/examples/nntpcache/nntpcache.servers | |||
33 | share/examples/nntpcache/nntpcache.servers-dist | |||
34 | share/examples/nntpcache/pubring.asc | |||
35 | share/examples/nntpcache/pubring.asc-dist | |||
36 | share/examples/nntpcache/pubring.pgp | |||
37 | share/examples/nntpcache/pubring.pgp-dist | |||
38 | share/examples/nntpcache/spam.filter | |||
39 | @exec ${MKDIR} %D/share/examples/nntpcache/http/innreport/pics | |||
40 | share/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 |
@@ -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 | |||
3 | PKG_OPTIONS_VAR= PKG_OPTIONS.nntpcache | 3 | PKG_OPTIONS_VAR= PKG_OPTIONS.nntpcache | |
4 | PKG_SUPPORTED_OPTIONS= nntpcache-pgp | 4 | PKG_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) | |
14 | DEPENDS+= pgp-2.*:../../security/pgp2 | 14 | DEPENDS+= pgp-2.*:../../security/pgp2 | |
15 | CONFIGURE_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) | |
18 | CONFIGURE_ARGS+= --with-authinfo-ldap | 19 | CONFIGURE_ARGS+= --with-authinfo-ldap | |
19 | .include "../../databases/openldap-client/buildlink3.mk" | 20 | .include "../../databases/openldap-client/buildlink3.mk" | |
20 | .endif | 21 | .endif |
#!@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"