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