summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2006-10-10 15:05:14 +0000
committerjoerg <joerg@pkgsrc.org>2006-10-10 15:05:14 +0000
commit450268d1cfe9d6fd9434c3af12fd2e62c4e206e0 (patch)
treee90601006ae1605c36cf2b57c14ab0be9c9c8cc0 /security
parente0c592da0143624908d6a8e40371966ea99ed572 (diff)
downloadpkgsrc-450268d1cfe9d6fd9434c3af12fd2e62c4e206e0.tar.gz
Fix config file handling by honouring PKG_SYSCONFDIR, installing the
configuration file to share/examples and using CONF_FILES. It also stops the package from polluting /etc. Bump revision.
Diffstat (limited to 'security')
-rw-r--r--security/py-prewikka/Makefile10
-rw-r--r--security/py-prewikka/PLIST3
-rw-r--r--security/py-prewikka/distinfo3
-rw-r--r--security/py-prewikka/patches/patch-ab24
4 files changed, 36 insertions, 4 deletions
diff --git a/security/py-prewikka/Makefile b/security/py-prewikka/Makefile
index 0dc02f4f244..f4b73d1aa2d 100644
--- a/security/py-prewikka/Makefile
+++ b/security/py-prewikka/Makefile
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.13 2006/10/01 15:13:22 rillig Exp $
+# $NetBSD: Makefile,v 1.14 2006/10/10 15:05:14 joerg Exp $
#
DISTNAME= prewikka-${VERSION}
PKGNAME= ${PYPKGPREFIX}-prewikka-${VERSION}
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= security
MASTER_SITES= http://www.prelude-ids.org/download/releases/ \
http://www.prelude-ids.org/download/releases/old/
@@ -29,6 +29,7 @@ PREWIKKA_USER?= prewikka
PREWIKKA_GROUP?= prewikka
PREWIKKA_HOME= /nonexistent
RCD_SCRIPTS= prewikka
+PKG_SYSCONFSUBDIR= prewikka
PKG_GROUPS= ${PREWIKKA_GROUP}
PKG_USERS= ${PREWIKKA_USER}:${PREWIKKA_GROUP}
@@ -45,6 +46,11 @@ SUBST_SED.code+= -e 's,@PYTHONBIN@,${PYTHONBIN},g'
FILES_SUBST+= PREWIKKA_USER=${PREWIKKA_USER:Q}
+MAKE_ENV+= EXAMPLEDIR=share/examples/${PKGBASE}
+
+INSTALLATION_DIRS+= ${PREFIX}/share/examples/${PKGBASE}
+CONF_FILES+= ${PREFIX}/share/examples/${PKGBASE}/prewikka.conf ${PKG_SYSCONFDIR}/prewikka.conf
+
pre-patch:
cp ${FILESDIR}/runPrewikka.c ${WRKSRC}
diff --git a/security/py-prewikka/PLIST b/security/py-prewikka/PLIST
index 7bff016669d..ad6b65cd811 100644
--- a/security/py-prewikka/PLIST
+++ b/security/py-prewikka/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.4 2006/08/17 11:35:20 shannonjr Exp $
+@comment $NetBSD: PLIST,v 1.5 2006/10/10 15:05:14 joerg Exp $
bin/prewikka-httpd
${PYSITELIB}/prewikka/Auth.py
${PYSITELIB}/prewikka/Auth.pyc
@@ -181,6 +181,7 @@ ${PYSITELIB}/prewikka/views/usermanagement.py
${PYSITELIB}/prewikka/views/usermanagement.pyc
${PYSITELIB}/prewikka/views/usermanagement.pyo
sbin/runPrewikka
+share/examples/${PKGBASE}/prewikka.conf
share/examples/rc.d/prewikka
share/prewikka/cgi-bin/prewikka.cgi
share/prewikka/database/mysql-update-0.9.1.sql
diff --git a/security/py-prewikka/distinfo b/security/py-prewikka/distinfo
index 51f7e8d2eb3..b6942e01533 100644
--- a/security/py-prewikka/distinfo
+++ b/security/py-prewikka/distinfo
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.5 2006/08/23 10:30:02 shannonjr Exp $
+$NetBSD: distinfo,v 1.6 2006/10/10 15:05:14 joerg Exp $
SHA1 (prewikka-0.9.7.tar.gz) = a11cd15a1290cd52553a824c61ab2c1e028435ff
RMD160 (prewikka-0.9.7.tar.gz) = 29b1dfe7e81b9273ed7e59b37acb3ded85f5e836
Size (prewikka-0.9.7.tar.gz) = 180802 bytes
SHA1 (patch-aa) = a250840804edea0c8eeeb8608aa8c07375d0a3f2
+SHA1 (patch-ab) = 76fd7ee4f1c19336a8eaa98fa1513e88e1c4c070
diff --git a/security/py-prewikka/patches/patch-ab b/security/py-prewikka/patches/patch-ab
new file mode 100644
index 00000000000..b039ab8bee0
--- /dev/null
+++ b/security/py-prewikka/patches/patch-ab
@@ -0,0 +1,24 @@
+$NetBSD: patch-ab,v 1.1 2006/10/10 15:05:14 joerg Exp $
+
+--- setup.py.orig 2006-08-16 10:45:41.000000000 +0000
++++ setup.py
+@@ -116,17 +116,13 @@ class my_install_scripts (install_script
+ class my_install(install):
+ def finalize_options(self):
+ ### if no prefix is given, configuration should go to /etc or in {prefix}/etc otherwise
+- if self.prefix:
+- self.conf_prefix = self.prefix + "/etc/prewikka"
+- else:
+- self.conf_prefix = "/etc/prewikka"
+-
++ self.conf_prefix = os.environ["PKG_SYSCONFDIR"]
+ install.finalize_options(self)
+
+ def install_conf(self):
+ self.mkpath((self.root or "") + self.conf_prefix)
+ for file in self.distribution.conf_files:
+- dest = (self.root or "") + self.conf_prefix + "/" + os.path.basename(file)
++ dest = (self.root or "") + self.prefix + "/" + os.environ["EXAMPLEDIR"] + "/" + os.path.basename(file)
+ if os.path.exists(dest):
+ dest += "-dist"
+ self.copy_file(file, dest)