pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/www/dansguardian Create log dir and set to $VARBASE/lo...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/026002bdccc0
branches:  trunk
changeset: 540228:026002bdccc0
user:      sborrill <sborrill%pkgsrc.org@localhost>
date:      Thu Apr 03 10:19:17 2008 +0000

description:
Create log dir and set to $VARBASE/log/dansguardian.
Set user with DANSGUARDIAN_USER and DANSGUARDIAN_GROUP and ensure log dirs
is created with correct permissions.
Use OWN_DIRS to create languages and phraselists directories instead of our
own pre-install target - this fixes binary packages.
Bump PKGREVISION to 2

diffstat:

 www/dansguardian/Makefile |  90 +++++++++++++++-------------------------------
 1 files changed, 30 insertions(+), 60 deletions(-)

diffs (129 lines):

diff -r 2049d32cae40 -r 026002bdccc0 www/dansguardian/Makefile
--- a/www/dansguardian/Makefile Thu Apr 03 09:46:16 2008 +0000
+++ b/www/dansguardian/Makefile Thu Apr 03 10:19:17 2008 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.2 2008/02/26 12:39:52 sborrill Exp $
+# $NetBSD: Makefile,v 1.3 2008/04/03 10:19:17 sborrill Exp $
 
 DISTNAME=      dansguardian-2.8.0.6.source
 PKGNAME=       dansguardian-2.8.0.6
-PKGREVISION=   1
+PKGREVISION=   2
 CATEGORIES=    www
 MASTER_SITES=  http://dansguardian.org/downloads/2/Stable/
 
@@ -33,13 +33,22 @@
 SUBST_FILES.perlpath=  *.pl
 SUBST_SED.perlpath=    -e 's,/usr/bin,${PREFIX}/bin,g'
 
+DANSGUARDIAN_USER?=    nobody
+DANSGUARDIAN_GROUP?=   nobody
+
 CONFIGURE_ARGS=                --prefix=${PREFIX:Q} \
                        --cgidir=/libexec/cgi-bin/ \
                        --sysconfdir=/etc/dansguardian/ \
                        --bindir=/sbin/ \
                        --mandir=/man/ \
-                       --logdir=/var/log/
+                       --runas_usr=${DANSGUARDIAN_USER} \
+                       --runas_grp=${DANSGUARDIAN_GROUP} \
+                       --logdir=${VARBASE}/log/dansguardian/
 
+OWN_DIRS+=             ${VARBASE}/log/dansguardian
+OWN_DIRS_PERMS+=       ${VARBASE}/log/dansguardian \
+                       ${DANSGUARDIAN_USER} ${DANSGUARDIAN_GROUP} 0755
+                       
 DEPENDS+=      squid>=2.5:../../www/squid
 
 .for f in logrotation pics transparent1x1.gif \
@@ -117,72 +126,33 @@
        phraselists/weapons/weighted    \
        phraselists/weapons/weighted_portuguese \
        phraselists/webmail/weighted    \
-       languages/ReadMe        \
-       languages/arspanish/messages    \
-       languages/arspanish/template.html       \
-       languages/bulgarian/messages    \
-       languages/bulgarian/template.html       \
-       languages/chinesebig5/messages  \
-       languages/chinesebig5/template.html     \
-       languages/chinesegb2312/messages        \
-       languages/chinesegb2312/template.html   \
-       languages/czech/messages        \
-       languages/czech/template.html   \
-       languages/danish/messages       \
-       languages/danish/template.html  \
-       languages/dutch/messages        \
-       languages/dutch/template.html   \
-       languages/french/messages       \
-       languages/french/template.html  \
-       languages/german/messages       \
-       languages/german/template.html  \
-       languages/hebrew/messages       \
-       languages/hebrew/template.html  \
-       languages/indonesian/messages   \
-       languages/indonesian/template.html      \
-       languages/italian/messages      \
-       languages/italian/template.html \
-       languages/lithuanian/messages   \
-       languages/lithuanian/template.html      \
-       languages/mxspanish/messages    \
-       languages/mxspanish/template.html       \
-       languages/polish/messages       \
-       languages/polish/template.html  \
-       languages/portuguese/messages   \
-       languages/portuguese/messagesaccents    \
-       languages/portuguese/template.html      \
-       languages/russian-1251/messages \
-       languages/russian-1251/template.html    \
-       languages/slovak/messages       \
-       languages/slovak/template.html  \
-       languages/spanish/messages      \
-       languages/spanish/template.html \
-       languages/swedish/messages      \
-       languages/swedish/template.html \
-       languages/turkish/messages      \
-       languages/turkish/template.html \
-       languages/ukenglish/messages    \
-       languages/ukenglish/template.html
+       languages/ReadMe
 CONF_FILES+=   ${EGDIR}/${f} ${PKG_SYSCONFDIR}/${f}
 .endfor
 
-pre-install:
-       for dir in badwords chat drugadvocacy gambling games \
+PHRASEDIRS=    badwords chat drugadvocacy gambling games \
                goodphrases googlesearches gore illegaldrugs \
                intolerance legaldrugs malware news nudism \
                peer2peer personals pornography proxies sport \
-               violence warezhacking weapons webmail; \
-       do \
-               ${INSTALL_DATA_DIR} ${PKG_SYSCONFDIR}/phraselists/$${dir}; \
-       done; \
-       for dir in arspanish bulgarian chinesebig5 chinesegb2312 \
+               violence warezhacking weapons webmail
+
+LANGUAGEDIRS=  arspanish bulgarian chinesebig5 chinesegb2312 \
                czech danish dutch french german hebrew \
                indonesian italian lithuanian mxspanish polish \
                portuguese russian-1251 slovak spanish \
-               swedish turkish ukenglish; \
-       do \
-               ${INSTALL_DATA_DIR} ${PKG_SYSCONFDIR}/languages/$${dir}; \
-       done
+               swedish turkish ukenglish
+
+.for d in ${PHRASEDIRS}
+OWN_DIRS+=     ${PKG_SYSCONFDIR}/phraselists/${d}
+.endfor
+
+.for d in ${LANGUAGEDIRS}
+OWN_DIRS+=     ${PKG_SYSCONFDIR}/languages/${d}
+CONF_FILES+=   ${EGDIR}/languages/${d}/messages \
+               ${PKG_SYSCONFDIR}/languages/${d}/messages
+CONF_FILES+=   ${EGDIR}/languages/${d}/template.html \
+               ${PKG_SYSCONFDIR}/languages/${d}/template.html
+.endfor
 
 show-conffiles:
        cd ${WRKSRC};                           \



Home | Main Index | Thread Index | Old Index