SPECS: cacti.spec - moved configs to /etc/cacti - added /var/log/c...

arekm arekm at pld-linux.org
Thu Oct 6 11:49:44 CEST 2005


Author: arekm                        Date: Thu Oct  6 09:49:44 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- moved configs to /etc/cacti
- added /var/log/cacti
- moved rrd files to /var/lib/cacti
- added cron job
- addjusted requires

---- Files affected:
SPECS:
   cacti.spec (1.25 -> 1.26) 

---- Diffs:

================================================================
Index: SPECS/cacti.spec
diff -u SPECS/cacti.spec:1.25 SPECS/cacti.spec:1.26
--- SPECS/cacti.spec:1.25	Wed Oct  5 22:16:51 2005
+++ SPECS/cacti.spec	Thu Oct  6 11:49:39 2005
@@ -1,6 +1,5 @@
 # $Revision$, $Date$
 # TODO:
-# - move config files to /etc/%{name}
 # - add apache config
 # - security http://security.gentoo.org/glsa/glsa-200506-20.xml
 %include	/usr/lib/rpm/macros.perl
@@ -19,10 +18,11 @@
 Patch3:		http://www.cacti.net/downloads/patches/0.8.6g/mib_file_loading.patch
 URL:		http://www.cacti.net/
 BuildRequires:	rpm-perlprov
-Requires:	mysql
+Requires:	crondaemon
 Requires:	net-snmp-utils
 Requires:	net-snmp
 Requires:	php
+Requires:	php-cli
 Requires:	php-gd
 Requires:	php-mysql
 Requires:	php-pcre
@@ -66,9 +66,24 @@
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{webadminroot}/%{name}
+install -d $RPM_BUILD_ROOT%{webadminroot}
+install -d $RPM_BUILD_ROOT%{_sysconfdir}/{%{name},cron.d}
+install -d $RPM_BUILD_ROOT/var/{log,lib}
 
-cp -aRf * $RPM_BUILD_ROOT%{webadminroot}/%{name}
+cp -aRf * $RPM_BUILD_ROOT%{webadminroot}
+
+install include/config.php $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.cfg
+ln -sf %{_sysconfdir}/%{name}/%{name}.cfg $RPM_BUILD_ROOT%{webadminroot}/include/config.php
+
+mv $RPM_BUILD_ROOT%{webadminroot}/log $RPM_BUILD_ROOT/var/log/%{name}
+ln -sf /var/log/cacti $RPM_BUILD_ROOT%{webadminroot}/log
+
+mv $RPM_BUILD_ROOT%{webadminroot}/rra $RPM_BUILD_ROOT/var/lib/%{name}
+ln -sf /var/lib/%{name}/rra $RPM_BUILD_ROOT%{webadminroot}/rrd
+
+cat  << EOF > $RPM_BUILD_ROOT%{_sysconfdir}/cron.d/%{name}
+*/5 * * * * http umask 022; /usr/bin/php %{webadminroot}/poller.php > /dev/null 2>&1
+EOF
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -76,15 +91,13 @@
 %files
 %defattr(644,root,root,755)
 %doc docs/CHANGELOG docs/CONTRIB docs/README
-%dir %{webadminroot}
-%dir %{webadminroot}/%{name}
-%dir %{webadminroot}/%{name}/log
-%config(noreplace) %verify(not size mtime md5) %attr(644,http,http) %{webadminroot}/%{name}/log/cacti.log
-%dir %{webadminroot}/%{name}/rra
-%config(noreplace) %verify(not size mtime md5) %{webadminroot}/%{name}/rra/.placeholder
-%dir %{webadminroot}/%{name}/include
-%config(noreplace) %verify(not size mtime md5) %attr(644,http,http) %{webadminroot}/%{name}/include/config.php
-%{webadminroot}/%{name}/*
+%attr(750,root,http) %dir %{_sysconfdir}/%{name}
+%attr(640,root,http) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}/%{name}.cfg
+%attr(750,root,http) %dir /var/log/%{name}
+%attr(660,root,http) %ghost /var/log/%{name}/*.log
+%attr(750,root,root) /var/lib/%{name}
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}
+%{webadminroot}
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -92,6 +105,13 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.26  2005/10/06 09:49:39  arekm
+- moved configs to /etc/cacti
+- added /var/log/cacti
+- moved rrd files to /var/lib/cacti
+- added cron job
+- addjusted requires
+
 Revision 1.25  2005/10/05 20:16:51  arekm
 - up to 0.8.6g + 4 official patches
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/cacti.spec?r1=1.25&r2=1.26&f=u




More information about the pld-cvs-commit mailing list