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