1 #include /usr/lib/rpm/macros.perl
2 Summary: Simple tool for creating graphs using rrdtool
7 Group: Applications/System
8 Source0: http://download.berlios.de/serverstats/%{name}-%{version}.tar.bz2
9 # Source0-md5: e17ec7aef1029c06aeaf53becf15dd67
11 URL: http://serverstats.berlios.de/
12 BuildRequires: rpmbuild(macros) >= 1.268
14 Requires: rrdtool >= 1.2
16 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18 %define _pkglibdir /var/lib/%{name}
19 %define _webapps /etc/webapps
20 %define _webapp %{name}
21 %define _webappdir %{_webapps}/%{_webapp}
22 %define _appdir %{_datadir}/%{_webapp}
25 Serverstats is a simple tool for creating graphs using rrdtool.
27 Serverstats does not have any features to manage the created rrd-files,
28 if you change anything you have to delete and recreate the files. Perhaps
29 you can avoid this using third-party-tools. Also there is no frontend
30 managing your graphs and sources. You will have to use your $EDITOR.
31 Serverstats is build to be configured once and then run and run and ...
33 I created this because Cacti was much to overloaded and I disliked that
34 it depends on a database.
40 rm -rf $RPM_BUILD_ROOT
41 install -d $RPM_BUILD_ROOT{/etc/cron.d,%{_appdir},%{_webappdir},%{_pkglibdir}/{cache,graph,rrd}}
43 install *.php *.css $RPM_BUILD_ROOT%{_appdir}
44 cp -R sources lang includes $RPM_BUILD_ROOT%{_appdir}
47 install config.sample/*.php $RPM_BUILD_ROOT%{_webappdir}
48 ln -s %{_webappdir} $RPM_BUILD_ROOT%{_appdir}/config
50 ln -s %{_pkglibdir}/cache $RPM_BUILD_ROOT%{_appdir}/cache
51 ln -s %{_pkglibdir}/graph $RPM_BUILD_ROOT%{_appdir}/graph
52 ln -s %{_pkglibdir}/rrd $RPM_BUILD_ROOT%{_appdir}/rrd
54 install %{SOURCE1} $RPM_BUILD_ROOT/etc/cron.d/%{name}
57 rm -rf $RPM_BUILD_ROOT
59 %triggerin -- apache1 < 1.3.37-3, apache1-base
60 %webapp_register apache %{_webapp}
62 %triggerun -- apache1 < 1.3.37-3, apache1-base
63 %webapp_unregister apache %{_webapp}
65 %triggerin -- apache < 2.2.0, apache-base
66 %webapp_register httpd %{_webapp}
68 %triggerun -- apache < 2.2.0, apache-base
69 %webapp_unregister httpd %{_webapp}
72 %defattr(644,root,root,755)
74 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}
75 %dir %attr(750,root,http) %{_webapps}/%{_webapp}
76 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/*.php
77 #%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/apache.conf
78 #%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/httpd.conf
85 %attr(750,stats,stats) %{_appdir}/update.php
90 %dir %attr(750,stats,http) %{_pkglibdir}/cache
91 %dir %attr(750,http,http) %{_pkglibdir}/graph
92 %dir %attr(750,stats,http) %{_pkglibdir}/rrd