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