2 # - patch source to use adodb system path instead of symlinking
3 # - shouldn't files in scripts dir be executable?
4 %include /usr/lib/rpm/macros.perl
5 Summary: Cacti is a PHP frontend for rrdtool
6 Summary(pl.UTF-8): Cacti - frontend w PHP do rrdtoola
11 Group: Applications/WWW
12 Source0: http://www.cacti.net/downloads/%{name}-%{version}.tar.gz
13 # Source0-md5: 63ffca5735b60bc33c68bc880f0e8042
14 Source1: %{name}.cfg.php
15 Source2: %{name}.crontab
16 Patch1: %{name}-upgrade_from_086k_fix.patch
17 Patch2: http://www.cacti.net/downloads/patches/0.8.7b/snmp_auth_none_notice.patch
18 Patch3: http://www.cacti.net/downloads/patches/0.8.7b/reset_each_patch.patch
19 Patch10: %{name}-plugin-%{version}.diff
20 Patch11: %{name}-config.patch
21 Patch12: %{name}-adodb.patch
22 Patch13: %{name}-url_path.patch
23 URL: http://www.cacti.net/
24 BuildRequires: rpm-perlprov
25 Requires(postun): /usr/sbin/userdel
26 Requires(pre): /bin/id
27 Requires(pre): /usr/sbin/useradd
28 Requires: adodb >= 4.67-1.17
31 Requires: net-snmp-utils
40 Requires: webserver(php)
44 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46 %define webadminroot /usr/share/%{name}
49 Cacti is a complete frondend to rrdtool, it stores all of the
50 nessesary information to create graphs and populate them with data in
53 The frontend is completely PHP driven. Along with being able to
54 maintain Graphs, Data Sources, and Round Robin Archives in a database,
55 cacti handles the data gathering also. There is also SNMP support for
56 those used to creating traffic graphs with MRTG.
58 %description -l pl.UTF-8
59 Cacti to pełny frontend do rrdtoola, zapamiętujący wszystkie
60 informacje potrzebne do tworzenia wykresów i wypełniające je danymi w
63 Frontend jest w pełni oparty na PHP. Oprócz zarządzania wykresami,
64 źródłami danych, archiwami Round Robin w bazie danych, cacti obsługuje
65 także gromadzenie danych. Ma także obsługę SNMP przydatną przy
66 tworzeniu wykresów ruchu przy użyciu MRTG.
80 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
83 rm -rf $RPM_BUILD_ROOT
84 install -d $RPM_BUILD_ROOT%{webadminroot}
85 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},/etc/cron.d}
86 install -d $RPM_BUILD_ROOT/var/{log,lib/%{name}}
87 cp -a * $RPM_BUILD_ROOT%{webadminroot}
89 ln -s . $RPM_BUILD_ROOT%{webadminroot}/%{name}
91 cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.cfg
93 mv $RPM_BUILD_ROOT%{webadminroot}/log $RPM_BUILD_ROOT/var/log/%{name}
94 ln -sf /var/log/cacti $RPM_BUILD_ROOT%{webadminroot}/log
96 mv $RPM_BUILD_ROOT%{webadminroot}/rra $RPM_BUILD_ROOT/var/lib/%{name}
97 ln -sf /var/lib/%{name}/rra $RPM_BUILD_ROOT%{webadminroot}/rra
98 ln -sf %{_datadir}/php/adodb $RPM_BUILD_ROOT%{webadminroot}/lib/adodb
100 # TODO: switch to user cacti here
101 cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/cron.d/%{name}
104 rm -rf $RPM_BUILD_ROOT
107 %useradd -u 184 -d /var/lib/%{name} -g http -c "Cacti User" cacti
110 if [ "$1" = "0" ]; then
115 %defattr(644,root,root,755)
116 %doc docs/CHANGELOG docs/CONTRIB docs/README
117 %attr(750,root,http) %dir %{_sysconfdir}/%{name}
118 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.cfg
119 %attr(770,root,http) %dir /var/log/%{name}
120 %attr(660,root,http) %ghost /var/log/%{name}/*.log
121 %attr(750,root,http) %dir /var/lib/%{name}
122 %attr(770,root,http) %dir /var/lib/%{name}/rra
123 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}