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
The following reply was made to PR pkg/47189; it has been noted by GNATS.
From: Nils Ratusznik <nils.netbsd%anotherhomepage.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: pkg-manager%netbsd.org@localhost, gnats-admin%netbsd.org@localhost,
pkgsrc-bugs%netbsd.org@localhost
Subject: Re: pkg/47189: Cacti configuration file is overwritten
Date: Fri, 18 Oct 2013 14:15:58 +0200 (CEST)
Hi,
I made some modifications to the Makefile, following the example in
databases/phpmyadmin. 2 Things to notice :
- good news, this patch enables cacti to have a /usr/pkg/etc/cacti/ with
config.php sitting here and linked to its reald path ;
- bad news, the apache config file is not copied anymore, since the Makefile
had "PKG_SYSCONFSUBDIR?= httpd".
Patches for Makefile and PLIST are below and made against pkgsrc-2013Q3.
MESSAGES should also be modified but Makefile seems to be the most important
here.
What do you think ?
Makefile :
--- Makefile 2 Sep 2013 19:51:19 -0000 1.19
+++ Makefile 18 Oct 2013 12:07:50 -0000
@@ -2,7 +2,7 @@
#
DISTNAME= cacti-0.8.8a
-PKGREVISION= 7
+PKGREVISION= 8
CATEGORIES= net
MASTER_SITES= http://www.cacti.net/downloads/
@@ -33,9 +33,9 @@ PKG_USERS_VARS+= CACTI_USER
PKG_GROUPS_VARS+= CACTI_GROUP
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 ${PKG_SYSCONFDIR}/cacti/config.php
+OWN_DIRS= ${PKG_SYSCONFDIR}/cacti
CACTIDIR= ${PREFIX}/share/cacti
CACTI_LOGDIR?= ${CACTIDIR}/log
CACTI_RRADIR?= ${CACTIDIR}/rra
@@ -73,6 +73,7 @@ SPECIAL_PERMS+= share/cacti/log/cacti.l
INSTALLATION_DIRS= share/examples/cacti
INSTALLATION_DIRS+= share/cacti
+AUTO_MKDIRS= yes
post-extract:
${CP} ${FILESDIR}/httpd-cacti.conf ${WRKDIR}/
@@ -84,6 +85,8 @@ do-install:
${INSTALL_DATA} ${WRKDIR}/httpd-cacti.conf
${DESTDIR}${EGDIR}/httpd-cacti.conf
${FIND} ${WRKSRC} -type f -name '*.orig' -exec ${RM} -f {} \;
cd ${WRKSRC} && ${PAX} -wr * ${DESTDIR}${CACTIDIR}
+ ${MV} ${DESTDIR}${CACTIDIR}/include/config.php
${DESTDIR}${EGDIR}/config.php
+ ${LN} -s ${PKG_SYSCONFDIR}/config.php
${DESTDIR}${CACTIDIR}/include/config.php
.include "../../databases/rrdtool/buildlink3.mk"
PLIST :
--- PLIST 12 Dec 2012 10:48:43 -0000 1.3
+++ PLIST 18 Oct 2013 12:12:47 -0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.3 2012/12/12 10:48:43 wiz Exp $
+@comment $NetBSD$
share/cacti/LICENSE
share/cacti/README
share/cacti/about.php
@@ -494,4 +494,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
--
Nils
Home |
Main Index |
Thread Index |
Old Index