2 # - R: perl* should be autogenerated?
5 %bcond_with sybase # add Sybase support to munin-node
7 %include /usr/lib/rpm/macros.perl
8 Summary: Munin - the Linpro RRD data agent
9 Summary(pl): Munin - agent danych RRD Linpro
15 Source0: http://dl.sourceforge.net/munin/%{name}_%{version}.tar.gz
16 # Source0-md5: 9eef4a53626cee0e088391c5deb8bd51
17 Source1: %{name}-node.init
19 Source3: %{name}-apache.conf
20 Patch0: %{name}-Makefile.patch
21 Patch1: %{name}-plugins.patch
22 Patch2: %{name}-node-config.patch
23 URL: http://munin.sourceforge.net/
24 BuildRequires: htmldoc
25 BuildRequires: html2text
26 BuildRequires: perl-devel
27 BuildRequires: rpmbuild(macros) >= 1.226
28 Requires: %{name}-common = %{version}-%{release}
29 Requires: perl-Date-Manip
30 Requires: perl-HTML-Template
31 Requires: perl-Net-Server
34 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36 %define _sysconfdir /etc/%{name}
37 %define htmldir /home/services/httpd/html/%{name}
40 Munin, formerly known as The Linpro RRD server, queries a number of
41 nodes, and processes the data using RRDtool and presents it on web
45 Munin, znany poprzednio jako serwer RRD Linpro, odpytuje wiele wêz³ów
46 i przetwarza dane przy u¿yciu RRDtoola, a nastêpnie prezentuje je na
50 Summary: Munin - the Linpro RRD data agent - common files
51 Summary(pl): Munin - agent danych RRD Linpro - wspólne pliki
53 Requires(pre): /usr/bin/getgid
54 Requires(pre): /bin/id
55 Requires(pre): /usr/sbin/groupadd
56 Requires(pre): /usr/sbin/useradd
57 Requires(postun): /usr/sbin/groupdel
58 Requires(postun): /usr/sbin/userdel
61 Munin, formerly known as The Linpro RRD server, queries a number of
62 nodes, and processes the data using RRDtool and presents it on web
65 %description common -l pl
66 Munin, znany poprzednio jako serwer RRD Linpro, odpytuje wiele wêz³ów
67 i przetwarza dane przy u¿yciu RRDtoola, a nastêpnie prezentuje je na
71 Summary: Linpro RRD data agent
72 Summary(pl): Agent danych RRD Linpro
74 Requires(post,preun): /sbin/chkconfig
75 Requires: %{name}-common = %{version}-%{release}
77 #Requires: perl-Config-General
78 Requires: perl-Net-Netmask
79 Requires: perl-Net-Server
80 Requires: perl-Net-SNMP
82 Requires: procps >= 2.0.7
83 Requires: rc-scripts >= 0.4.0.15
87 The Munin node package returns statistical data on the request of a
90 %description node -l pl
91 Pakiet Munin dla wêz³a zwraca dane statystyczne na ¿±danie serwera
104 rm -rf $RPM_BUILD_ROOT
105 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,cron.d}
108 DESTDIR=$RPM_BUILD_ROOT
110 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/munin-node
111 install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/munin
113 install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
115 install node/node.d/README README.plugins
117 install dists/tarball/plugins.conf $RPM_BUILD_ROOT%{_sysconfdir}
118 ln -sf %{_sysconfdir}/plugins.conf $RPM_BUILD_ROOT%{_sysconfdir}/plugin-conf.d/munin-node
120 install server/munin-htaccess $RPM_BUILD_ROOT%{htmldir}/.htaccess
121 install server/style.css $RPM_BUILD_ROOT%{htmldir}/
124 rm -rf $RPM_BUILD_ROOT
126 %triggerin -- apache1 >= 1.3.33-2
127 %apache_config_install -v 1 -c %{_sysconfdir}/apache.conf
129 %triggerun -- apache1 >= 1.3.33-2
130 %apache_config_uninstall -v 1
132 %triggerin -- apache >= 2.0.0
133 %apache_config_install -v 2 -c %{_sysconfdir}/apache.conf
135 %triggerun -- apache >= 2.0.0
136 %apache_config_uninstall -v 2
139 if [ "$1" = "1" ] ; then
140 /sbin/chkconfig --add munin-node
141 %{_sbindir}/munin-node-configure --shell | sh
142 echo "Run \"/etc/rc.d/init.d/munin-node start\" to start Munin Node agent." >&2
144 if [ -f /var/lock/subsys/munin-node ]; then
145 /etc/rc.d/init.d/munin-node restart >&2
150 if [ "$1" = "0" ] ; then
151 if [ -f /var/lock/subsys/munin-node ]; then
152 /etc/rc.d/init.d/munin-node stop >&2
154 /sbin/chkconfig --del munin-node
158 %groupadd -g 158 munin
159 %useradd -o -u 158 -s /bin/false -g munin -c "Munin Node agent" -d /var/lib/munin munin
162 if [ "$1" = "0" ]; then
168 %defattr(644,root,root,755)
169 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/cron.d/munin
170 %dir %{_sysconfdir}/templates
171 %{_sysconfdir}/templates/*
172 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/munin.conf
173 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
174 %attr(755,root,root) %{_sbindir}/munin-cron
175 %attr(755,root,root) %{_datadir}/munin/munin-graph
176 %attr(755,root,root) %{_datadir}/munin/munin-html
177 %attr(755,root,root) %{_datadir}/munin/munin-limits
178 %attr(755,root,root) %{_datadir}/munin/munin-update
179 %attr(755,munin,root) %dir %{htmldir}
180 %attr(644,munin,root) %{htmldir}/.htaccess
181 %attr(644,munin,root) %{htmldir}/style.css
182 %attr(755,munin,root) %dir %{_datadir}/munin/cgi
183 %attr(755,munin,root) %{_datadir}/munin/cgi/munin-cgi-graph
184 %{perl_vendorlib}/Munin.pm
185 %{_mandir}/man8/munin-graph*
186 %{_mandir}/man8/munin-update*
187 %{_mandir}/man8/munin-limits*
188 %{_mandir}/man8/munin-html*
189 %{_mandir}/man8/munin-cron*
190 %{_mandir}/man5/munin.conf*
193 %defattr(644,root,root,755)
194 %doc README.api README.plugins ChangeLog
195 # %{_docdir}/munin/README.config
196 %doc build/doc/*.{html,pdf}
198 %dir %{_datadir}/munin
199 %attr(750,munin,root) %dir /var/log/munin
200 %attr(770,munin,munin) %dir /var/lib/munin
203 %defattr(644,root,root,755)
204 %dir %{_sysconfdir}/plugins
205 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/munin-node.conf
206 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/plugins.conf
207 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/plugin-conf.d/munin-node
208 %attr(754,root,root) /etc/rc.d/init.d/munin-node
209 %attr(755,root,root) %{_sbindir}/munin-run
210 %attr(755,root,root) %{_sbindir}/munin-node
211 %attr(755,root,root) %{_sbindir}/munin-node-configure
212 %attr(755,root,root) %{_sbindir}/munin-node-configure-snmp
213 %dir %{_datadir}/munin/plugins
214 %attr(755,root,root) %{_datadir}/munin/plugins/*
215 %if %{without sybase}
216 %exclude %{_datadir}/munin/plugins/sybase_space
218 %dir %attr(770,munin,munin) /var/lib/munin/plugin-state
219 %{_mandir}/man5/munin-node*
220 %{_mandir}/man8/munin-run*
221 %{_mandir}/man8/munin-node*