pkgsrc-Bugs archive

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

Re: pkg/47189: Cacti configuration file is overwritten



Improved patch :

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/net/cacti/Makefile,v
retrieving revision 1.24
diff -u -p -r1.24 Makefile
--- Makefile    23 Aug 2014 12:50:25 -0000      1.24
+++ Makefile    13 Feb 2015 13:52:31 -0000
@@ -1,7 +1,7 @@
 # $NetBSD: Makefile,v 1.24 2014/08/23 12:50:25 adam Exp $

 DISTNAME=      cacti-0.8.8b
-PKGREVISION=   3
+PKGREVISION=   4
 CATEGORIES=    net
 MASTER_SITES=  http://www.cacti.net/downloads/

@@ -35,6 +35,7 @@ BUILD_DEFS+=          PKG_SYSCONFBASE
 PKG_SYSCONFSUBDIR?=    httpd
 EGDIR=                 ${PREFIX}/share/examples/cacti
 CONF_FILES+=           ${EGDIR}/httpd-cacti.conf ${PKG_SYSCONFDIR}/httpd-cacti.conf
+CONF_FILES+=           ${EGDIR}/config.php ${CACTIDIR}/include/config.php
 CACTIDIR=              ${PREFIX}/share/cacti
 CACTI_LOGDIR?=         ${CACTIDIR}/log
 CACTI_RRADIR?=         ${CACTIDIR}/rra
@@ -95,8 +96,9 @@ post-extract:

 do-install:
        ${INSTALL_DATA} ${WRKDIR}/httpd-cacti.conf ${DESTDIR}${EGDIR}/httpd-cacti.conf
+       ${INSTALL_DATA} ${WRKSRC}/include/config.php ${DESTDIR}${EGDIR}/config.php
        ${FIND} ${WRKSRC} -type f -name '*.orig' -exec ${RM} -f {} \;
-       cd ${WRKSRC} && ${PAX} -wr * ${DESTDIR}${CACTIDIR}
+       cd ${WRKSRC} && ${PAX} -rw -s ',\./include/config\.php,,' . ${DESTDIR}${CACTIDIR}
        ${INSTALL_SCRIPT} ${WRKDIR}/cacti-poller ${DESTDIR}${PREFIX}/bin

 .include "../../databases/rrdtool/buildlink3.mk"
Index: PLIST
===================================================================
RCS file: /cvsroot/pkgsrc/net/cacti/PLIST,v
retrieving revision 1.5
diff -u -p -r1.5 PLIST
--- PLIST       16 Jan 2014 21:10:00 -0000      1.5
+++ PLIST       13 Feb 2015 13:52:31 -0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.5 2014/01/16 21:10:00 tron Exp $
+@comment $NetBSD$
 bin/cacti-poller
 share/cacti/LICENSE
 share/cacti/README
@@ -224,7 +224,6 @@ share/cacti/images/uninstall_icon.gif
 share/cacti/images/view_none.gif
 share/cacti/include/auth.php
 share/cacti/include/bottom_footer.php
-share/cacti/include/config.php
 share/cacti/include/global.php
 share/cacti/include/global_arrays.php
 share/cacti/include/global_constants.php
@@ -445,6 +444,7 @@ share/cacti/lib/utility.php
 share/cacti/lib/variables.php
 share/cacti/lib/xml.php
 share/cacti/log/.htaccess
+share/cacti/log/cacti.log
 share/cacti/logout.php
 share/cacti/plugins.php
 share/cacti/plugins/index.php
@@ -496,4 +496,5 @@ share/cacti/templates_import.php
 share/cacti/tree.php
 share/cacti/user_admin.php
 share/cacti/utilities.php
+share/examples/cacti/config.php
 share/examples/cacti/httpd-cacti.conf


Home | Main Index | Thread Index | Old Index