]> git.pld-linux.org Git - packages/cacti.git/blame_incremental - cacti.spec
*** empty log message ***
[packages/cacti.git] / cacti.spec
... / ...
CommitLineData
1# TODO
2# - patch source to use adodb system path instead of symlinking
3%include /usr/lib/rpm/macros.perl
4Summary: Cacti is a PHP frontend for rrdtool
5Summary(pl.UTF-8): Cacti - frontend w PHP do rrdtoola
6Name: cacti
7Version: 0.8.7b
8Release: 3
9License: GPL
10Group: Applications/WWW
11Source0: http://www.cacti.net/downloads/%{name}-%{version}.tar.gz
12# Source0-md5: 63ffca5735b60bc33c68bc880f0e8042
13Patch1: http://www.cacti.net/downloads/patches/%{version}/upgrade_from_086k_fix.patch
14Patch10: %{name}-plugin-%{version}.diff
15Patch11: %{name}-config.patch
16Patch12: %{name}-adodb.patch
17Patch13: %{name}-url_path.patch
18URL: http://www.cacti.net/
19BuildRequires: rpm-perlprov
20Requires: adodb >= 4.67-1.17
21Requires: crondaemon
22Requires: net-snmp-utils
23Requires: php(gd)
24Requires: php(mysql)
25Requires: php(pcre)
26Requires: php(snmp)
27Requires: php(xml)
28Requires: php-cli
29Requires: rrdtool
30Requires: webserver
31Requires: webserver(php)
32Suggests: cacti-spine
33BuildArch: noarch
34BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36%define webadminroot /usr/share/%{name}
37
38%description
39Cacti is a complete frondend to rrdtool, it stores all of the
40nessesary information to create graphs and populate them with data in
41a MySQL database.
42
43The frontend is completely PHP driven. Along with being able to
44maintain Graphs, Data Sources, and Round Robin Archives in a database,
45cacti handles the data gathering also. There is also SNMP support for
46those used to creating traffic graphs with MRTG.
47
48%description -l pl.UTF-8
49Cacti to pełny frontend do rrdtoola, zapamiętujący wszystkie
50informacje potrzebne do tworzenia wykresów i wypełniające je danymi w
51bazie MySQL.
52
53Frontend jest w pełni oparty na PHP. Oprócz zarządzania wykresami,
54źródłami danych, archiwami Round Robin w bazie danych, cacti obsługuje
55także gromadzenie danych. Ma także obsługę SNMP przydatną przy
56tworzeniu wykresów ruchu przy użyciu MRTG.
57
58%prep
59%setup -q
60%patch1 -p1
61%patch10 -p1
62%patch11 -p1
63%patch12 -p1
64%patch13 -p1
65
66rm -rf lib/adodb
67
68%install
69rm -rf $RPM_BUILD_ROOT
70install -d $RPM_BUILD_ROOT%{webadminroot}
71install -d $RPM_BUILD_ROOT%{_sysconfdir}/{%{name},cron.d}
72install -d $RPM_BUILD_ROOT/var/{log,lib/%{name}}
73cp -aRf * $RPM_BUILD_ROOT%{webadminroot}
74ln -s . $RPM_BUILD_ROOT%{webadminroot}/%{name}
75
76# TODO: move this to SOURCES. it's a lot better to backtrack changes
77# if it's a separate file.
78cat << 'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.cfg
79<?php
80$database_type = 'mysql';
81$database_default = 'cacti';
82$database_hostname = 'localhost';
83$database_username = 'cactiuser';
84$database_password = 'cactiuser';
85
86$plugins = array();
87// $plugins[] = 'thold';
88// $plugins[] = 'monitor';
89// $plugins[] = 'discovery';
90
91/* Do not edit this line */
92$config = array();
93
94/* This is full URL Path to the Cacti installation
95 For example, if your cacti was accessible by http://server/cacti/ you would user '/cacti/'
96 as the url path. For just http://server/ use '/'
97*/
98$config['url_path'] = '/cacti/';
99
100?>
101EOF
102
103mv $RPM_BUILD_ROOT%{webadminroot}/log $RPM_BUILD_ROOT/var/log/%{name}
104ln -sf /var/log/cacti $RPM_BUILD_ROOT%{webadminroot}/log
105
106mv $RPM_BUILD_ROOT%{webadminroot}/rra $RPM_BUILD_ROOT/var/lib/%{name}
107ln -sf /var/lib/%{name}/rra $RPM_BUILD_ROOT%{webadminroot}/rra
108ln -sf %{_datadir}/php/adodb $RPM_BUILD_ROOT%{webadminroot}/lib/adodb
109
110cat << 'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/cron.d/%{name}
111*/5 * * * * http umask 022; %{_bindir}/php %{webadminroot}/poller.php > /dev/null 2>&1
112EOF
113
114%clean
115rm -rf $RPM_BUILD_ROOT
116
117%files
118%defattr(644,root,root,755)
119%doc docs/CHANGELOG docs/CONTRIB docs/README
120%attr(750,root,http) %dir %{_sysconfdir}/%{name}
121%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.cfg
122%attr(770,root,http) %dir /var/log/%{name}
123%attr(660,root,http) %ghost /var/log/%{name}/*.log
124%attr(750,root,http) %dir /var/lib/%{name}
125%attr(770,root,http) %dir /var/lib/%{name}/rra
126%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}
127%{webadminroot}
This page took 0.065992 seconds and 4 git commands to generate.