]> git.pld-linux.org Git - packages/cacti.git/blame - cacti.spec
*** empty log message ***
[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
0482abbd 5Summary(pl.UTF-8): Cacti - frontend w PHP do rrdtoola
94614147 6Name: cacti
50df8396 7Version: 0.8.7b
0482abbd 8Release: 3
6587a5d5 9License: GPL
94614147 10Group: Applications/WWW
761b4fb2 11Source0: http://www.cacti.net/downloads/%{name}-%{version}.tar.gz
50df8396 12# Source0-md5: 63ffca5735b60bc33c68bc880f0e8042
0482abbd 13Patch1: http://www.cacti.net/downloads/patches/%{version}/upgrade_from_086k_fix.patch
4e25427a
GS
14Patch10: %{name}-plugin-%{version}.diff
15Patch11: %{name}-config.patch
16Patch12: %{name}-adodb.patch
615a7329 17Patch13: %{name}-url_path.patch
761b4fb2 18URL: http://www.cacti.net/
89aea3b3 19BuildRequires: rpm-perlprov
f44cea91 20Requires: adodb >= 4.67-1.17
e9300b9e 21Requires: crondaemon
94614147 22Requires: net-snmp-utils
f5a0e42f
ER
23Requires: php(gd)
24Requires: php(mysql)
25Requires: php(pcre)
26Requires: php(snmp)
27Requires: php(xml)
4e25427a 28Requires: php-cli
94614147 29Requires: rrdtool
e4f2f951 30Requires: webserver
f5a0e42f 31Requires: webserver(php)
578edcb5 32Suggests: cacti-spine
6587a5d5 33BuildArch: noarch
94614147
JB
34BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
90312589 36%define webadminroot /usr/share/%{name}
6587a5d5
JB
37
38%description
39Cacti is a complete frondend to rrdtool, it stores all of the
94614147
JB
40nessesary information to create graphs and populate them with data in
41a MySQL database.
6587a5d5 42
94614147
JB
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.
6587a5d5 47
41840fab
JR
48%description -l pl.UTF-8
49Cacti to pełny frontend do rrdtoola, zapamiętujący wszystkie
0482abbd
GS
50informacje potrzebne do tworzenia wykresów i wypełniające je danymi w
51bazie MySQL.
c9dfb888 52
41840fab 53Frontend jest w pełni oparty na PHP. Oprócz zarządzania wykresami,
0482abbd
GS
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.
c9dfb888 57
6587a5d5 58%prep
6587a5d5 59%setup -q
0482abbd 60%patch1 -p1
4e25427a
GS
61%patch10 -p1
62%patch11 -p1
63%patch12 -p1
615a7329 64%patch13 -p1
6587a5d5 65
f44cea91 66rm -rf lib/adodb
6587a5d5
JB
67
68%install
94614147 69rm -rf $RPM_BUILD_ROOT
e9300b9e
AM
70install -d $RPM_BUILD_ROOT%{webadminroot}
71install -d $RPM_BUILD_ROOT%{_sysconfdir}/{%{name},cron.d}
c7a01fb3 72install -d $RPM_BUILD_ROOT/var/{log,lib/%{name}}
e9300b9e 73cp -aRf * $RPM_BUILD_ROOT%{webadminroot}
4e7db512 74ln -s . $RPM_BUILD_ROOT%{webadminroot}/%{name}
e9300b9e 75
8a891920
ER
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
8b0c4935 79<?php
8a891920
ER
80$database_type = 'mysql';
81$database_default = 'cacti';
82$database_hostname = 'localhost';
83$database_username = 'cactiuser';
84$database_password = 'cactiuser';
d0110f91
MWP
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*/
8a891920 98$config['url_path'] = '/cacti/';
d0110f91 99
8b0c4935
AM
100?>
101EOF
e9300b9e
AM
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}
4e7db512 107ln -sf /var/lib/%{name}/rra $RPM_BUILD_ROOT%{webadminroot}/rra
eba13275 108ln -sf %{_datadir}/php/adodb $RPM_BUILD_ROOT%{webadminroot}/lib/adodb
e9300b9e 109
8a891920 110cat << 'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/cron.d/%{name}
f44cea91 111*/5 * * * * http umask 022; %{_bindir}/php %{webadminroot}/poller.php > /dev/null 2>&1
e9300b9e 112EOF
6587a5d5
JB
113
114%clean
94614147 115rm -rf $RPM_BUILD_ROOT
6587a5d5
JB
116
117%files
94614147 118%defattr(644,root,root,755)
6587a5d5 119%doc docs/CHANGELOG docs/CONTRIB docs/README
e9300b9e 120%attr(750,root,http) %dir %{_sysconfdir}/%{name}
270f88a1 121%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.cfg
f18c97be 122%attr(770,root,http) %dir /var/log/%{name}
e9300b9e 123%attr(660,root,http) %ghost /var/log/%{name}/*.log
271af71b 124%attr(750,root,http) %dir /var/lib/%{name}
cd209fd1 125%attr(770,root,http) %dir /var/lib/%{name}/rra
e9300b9e
AM
126%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}
127%{webadminroot}
This page took 0.095993 seconds and 4 git commands to generate.