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