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