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