pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/security/py-prewikka Fix config file handling by honou...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/bbda98974921
branches:  trunk
changeset: 519818:bbda98974921
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Tue Oct 10 15:05:14 2006 +0000

description:
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:

 security/py-prewikka/Makefile         |  10 ++++++++--
 security/py-prewikka/PLIST            |   3 ++-
 security/py-prewikka/distinfo         |   3 ++-
 security/py-prewikka/patches/patch-ab |  24 ++++++++++++++++++++++++
 4 files changed, 36 insertions(+), 4 deletions(-)

diffs (92 lines):

diff -r 09b44bf10642 -r bbda98974921 security/py-prewikka/Makefile
--- a/security/py-prewikka/Makefile     Tue Oct 10 15:04:38 2006 +0000
+++ b/security/py-prewikka/Makefile     Tue Oct 10 15:05:14 2006 +0000
@@ -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_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 @@
 
 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 -r 09b44bf10642 -r bbda98974921 security/py-prewikka/PLIST
--- a/security/py-prewikka/PLIST        Tue Oct 10 15:04:38 2006 +0000
+++ b/security/py-prewikka/PLIST        Tue Oct 10 15:05:14 2006 +0000
@@ -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.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 -r 09b44bf10642 -r bbda98974921 security/py-prewikka/distinfo
--- a/security/py-prewikka/distinfo     Tue Oct 10 15:04:38 2006 +0000
+++ b/security/py-prewikka/distinfo     Tue Oct 10 15:05:14 2006 +0000
@@ -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 -r 09b44bf10642 -r bbda98974921 security/py-prewikka/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/py-prewikka/patches/patch-ab     Tue Oct 10 15:05:14 2006 +0000
@@ -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)



Home | Main Index | Thread Index | Old Index