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