]> git.pld-linux.org Git - SPECS.git/blob - serverstats.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / serverstats.spec
1 #include        /usr/lib/rpm/macros.perl
2 Summary:        Simple tool for creating graphs using rrdtool
3 Name:           serverstats
4 Version:        0.8.2
5 Release:        0.1
6 License:        GPL/LGPL ?
7 Group:          Applications/System
8 Source0:        http://download.berlios.de/serverstats/%{name}-%{version}.tar.bz2
9 # Source0-md5:  e17ec7aef1029c06aeaf53becf15dd67
10 Source1:        %{name}.cron
11 URL:            http://serverstats.berlios.de/
12 BuildRequires:  rpmbuild(macros) >= 1.268
13 Requires:       php-cli
14 Requires:       rrdtool >= 1.2
15 BuildArch:      noarch
16 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17
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}
23
24 %description
25 Serverstats is a simple tool for creating graphs using rrdtool.
26
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 ...
32
33 I created this because Cacti was much to overloaded and I disliked that
34 it depends on a database.
35
36 %prep
37 %setup -q
38
39 %install
40 rm -rf $RPM_BUILD_ROOT
41 install -d $RPM_BUILD_ROOT{/etc/cron.d,%{_appdir},%{_webappdir},%{_pkglibdir}/{cache,graph,rrd}}
42
43 install *.php *.css $RPM_BUILD_ROOT%{_appdir}
44 cp -R sources lang includes $RPM_BUILD_ROOT%{_appdir}
45
46 # configs:
47 install config.sample/*.php $RPM_BUILD_ROOT%{_webappdir}
48 ln -s %{_webappdir} $RPM_BUILD_ROOT%{_appdir}/config
49
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
53
54 install %{SOURCE1} $RPM_BUILD_ROOT/etc/cron.d/%{name}
55
56 %clean
57 rm -rf $RPM_BUILD_ROOT
58
59 %triggerin -- apache1 < 1.3.37-3, apache1-base
60 %webapp_register apache %{_webapp}
61
62 %triggerun -- apache1 < 1.3.37-3, apache1-base
63 %webapp_unregister apache %{_webapp}
64
65 %triggerin -- apache < 2.2.0, apache-base
66 %webapp_register httpd %{_webapp}
67
68 %triggerun -- apache < 2.2.0, apache-base
69 %webapp_unregister httpd %{_webapp}
70
71 %files
72 %defattr(644,root,root,755)
73 %doc doc/*
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
79 %dir %{_appdir}
80 %{_appdir}/*.css
81 %{_appdir}/detail.php
82 %{_appdir}/graph.php
83 %{_appdir}/index.php
84 %{_appdir}/init.php
85 %attr(750,stats,stats) %{_appdir}/update.php
86 %{_appdir}/includes
87 %{_appdir}/lang
88 %{_appdir}/sources
89 %dir %{_pkglibdir}
90 %dir %attr(750,stats,http) %{_pkglibdir}/cache
91 %dir %attr(750,http,http) %{_pkglibdir}/graph
92 %dir %attr(750,stats,http) %{_pkglibdir}/rrd
93 # symlinks:
94 %{_appdir}/cache
95 %{_appdir}/config
96 %{_appdir}/graph
97 %{_appdir}/rrd
This page took 0.390065 seconds and 3 git commands to generate.