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