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