# $Id: smeserver-cacti.spec,v 1.10 2013/11/21 17:03:18 unnilennium Exp $ # Authority: nocvs # Name: Michel Van hees Summary: Cacti for smeserver %define name smeserver-cacti Name: %{name} %define version 0.8.8b %define release 12 Version: %{version} Release: %{release}%{?dist} License: Freely distributable Group: Apache Source: %{name}-%{version}.tar.gz Patch0: smeserver-cacti-0.8.8b-patch0.patch Patch1: smeserver-cacti-0.8.8b-patch1.patch Patch2: smeserver-cacti-0.8.8b-patch2.patch Patch3: smeserver-cacti-0.8.8b-patch3.patch Patch4: smeserver-cacti-0.8.8b-patch4.patch Patch5: smeserver-cacti-0.8.8b-patch5.patch Patch6: smeserver-cacti-0.8.8b-patch6.patch Patch7: smeserver-cacti-0.8.8b-patch7.patch Patch8: smeserver-cacti-0.8.8b-poller.patch Patch9: smeserver-cacti-0.8.8b-disenabled.patch #Patch:%{name}-%{version}.patch.yyyymmddnn BuildRoot: /var/tmp/e-smith-buildroot BuildRequires: e-smith-devtools BuildArchitectures: noarch Requires: smeserver-release >= 8 , rrdtool >= 1 Requires: cacti = 0.8.8b-2.el5 AutoReqProv: no %changelog * Thu Nov 21 2013 Jean-Philippe Pialasse 0.8.8b-12.sme - fixed poller not running in cron , added to crontab - fixed wrong ownership for db.php, now cacti:www - added status enabled by default - user cacti to run in cron * Tue Nov 14 2013 Jean-Philippe Pialasse 0.8.8b-10.sme - typo fix in last patch (7) * Sun Nov 10 2013 Jean-Philippe Pialasse 0.8.8b-9.sme - fix paths in sql dump [SME: 7419] * Mon Oct 21 2013 Jean-Philippe Pialasse 0.8.8b-8.sme - fixing last template path error in createlinks * Fri Oct 18 2013 Jean-Philippe Pialasse 0.8.8b-7.sme - fix missing type - fix wrong path in Virtualhost template - fix DB not creating - fix extra file in template - updated db mysql default * Tue Oct 15 2013 Jean-Philippe Pialasse 0.8.8b-3.sme - initial release for SME 8 - use el5 repo cacti - fix dependencies * Tue Dec 4 2007 Michel Van hees - Update contrib to 0.8.7a version - Adding access limitation - Adding automatic redirection to https - Automatic Update process from 0.8.6j * Mon Jan 29 2007 Michel Van hees - Based on cacti 0.8.6j - Initial release %description SME server - Cacti %prep %setup %patch0 -p1 %patch1 -p1 %patch2 -p1 %patch3 -p1 %patch4 -p1 %patch5 -p1 %patch6 -p1 %patch7 -p1 %patch8 -p1 %patch9 -p1 %build perl createlinks %install rm -rf $RPM_BUILD_ROOT (cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) rm -f %{name}-%{version}-filelist /sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist echo "%doc COPYING" >> %{name}-%{version}-filelist %clean rm -rf $RPM_BUILD_ROOT %pre #/sbin/e-smith/db accounts set cacti reserved %preun %post #/sbin/e-smith/db configuration set cacti service #/sbin/e-smith/db configuration setprop cacti access private #/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf #/sbin/e-smith/expand-template /opt/cacti/include/config.php #service httpd-e-smith sigusr1 #cactiVersion=`mysql cacti_sme -N -s -e"select * from version"` #case "$cactiVersion" in # 0.8.6j) # echo "" # echo "Upgrade process !!!!!!" # mysql cacti_sme < /opt/cacti/cacti_upg086j.sql # rm -f /opt/cacti/cacti_sme.sql # rm -f /opt/cacti/cacti_upg086j.sql # echo "Upgrade complete ..." # echo "" # ;; # 0.8.7a) # # Shoul not be here for the moment # ;; # *) # # Fresh install # echo "" # echo "fresh install..." # mysqladmin create cacti_sme # mysql cacti_sme < /opt/cacti/cacti_sme.sql # rm -Rf /opt/cacti/install # rm -f /opt/cacti/cacti_sme.sql # rm -f /opt/cacti/cacti_upg086j.sql # echo "Install complete ..." # echo "" #esac %postun %files -f %{name}-%{version}-filelist %defattr(-,root,root)