]> git.pld-linux.org Git - packages/munin.git/blob - munin.spec
- node R: proper rc-scripts
[packages/munin.git] / munin.spec
1 # TODO
2 # - R: perl* should be autogenerated?
3 #
4 # Condtional build:
5 %bcond_with     sybase          # add Sybase support to munin-node
6 #
7 %include        /usr/lib/rpm/macros.perl
8 Summary:        Munin - the Linpro RRD data agent
9 Summary(pl):    Munin - agent danych RRD Linpro
10 Name:           munin
11 Version:        1.3.2
12 Release:        1.4
13 License:        GPL
14 Group:          Daemons
15 Source0:        http://dl.sourceforge.net/munin/%{name}_%{version}.tar.gz
16 # Source0-md5:  9eef4a53626cee0e088391c5deb8bd51
17 Source1:        %{name}-node.init
18 Source2:        %{name}.cron
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
32 Requires:       rrdtool
33 BuildArch:      noarch
34 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36 %define         _sysconfdir     /etc/%{name}
37 %define         htmldir         /home/services/httpd/html/%{name}
38
39 %description
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
42 pages.
43
44 %description -l pl
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
47 stronach WWW.
48
49 %package common
50 Summary:        Munin - the Linpro RRD data agent - common files
51 Summary(pl):    Munin - agent danych RRD Linpro - wspólne pliki
52 Group:          Daemons
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
59
60 %description common
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
63 pages.
64
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
68 stronach WWW.
69
70 %package node
71 Summary:        Linpro RRD data agent
72 Summary(pl):    Agent danych RRD Linpro
73 Group:          Daemons
74 Requires(post,preun):   /sbin/chkconfig
75 Requires:       %{name}-common = %{version}-%{release}
76 Requires:       logtool
77 #Requires:      perl-Config-General
78 Requires:       perl-Net-Netmask
79 Requires:       perl-Net-Server
80 Requires:       perl-Net-SNMP
81 Requires:       perl-libwww
82 Requires:       procps >= 2.0.7
83 Requires:       rc-scripts >= 0.4.0.15
84 Requires:       sysstat
85
86 %description node
87 The Munin node package returns statistical data on the request of a
88 Munin server.
89
90 %description node -l pl
91 Pakiet Munin dla wêz³a zwraca dane statystyczne na ¿±danie serwera
92 Munin.
93
94 %prep
95 %setup -q
96 %patch0 -p1
97 %patch1 -p1
98 %patch2 -p1
99
100 %build
101 %{__make} build
102
103 %install
104 rm -rf $RPM_BUILD_ROOT
105 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,cron.d}
106
107 %{__make} install \
108         DESTDIR=$RPM_BUILD_ROOT
109
110 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/munin-node
111 install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/munin
112
113 install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
114
115 install node/node.d/README README.plugins
116
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
119
120 install server/munin-htaccess $RPM_BUILD_ROOT%{htmldir}/.htaccess
121 install server/style.css $RPM_BUILD_ROOT%{htmldir}/
122
123 %clean
124 rm -rf $RPM_BUILD_ROOT
125
126 %triggerin -- apache1 >= 1.3.33-2
127 %apache_config_install -v 1 -c %{_sysconfdir}/apache.conf
128
129 %triggerun -- apache1 >= 1.3.33-2
130 %apache_config_uninstall -v 1
131
132 %triggerin -- apache >= 2.0.0
133 %apache_config_install -v 2 -c %{_sysconfdir}/apache.conf
134
135 %triggerun -- apache >= 2.0.0
136 %apache_config_uninstall -v 2
137
138 %post node
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
143 else
144         if [ -f /var/lock/subsys/munin-node ]; then
145                 /etc/rc.d/init.d/munin-node restart >&2
146         fi
147 fi
148
149 %preun node
150 if [ "$1" = "0" ] ; then
151         if [ -f /var/lock/subsys/munin-node ]; then
152                 /etc/rc.d/init.d/munin-node stop >&2
153         fi
154         /sbin/chkconfig --del munin-node
155 fi
156
157 %pre common
158 %groupadd -g 158 munin
159 %useradd -o -u 158 -s /bin/false -g munin -c "Munin Node agent" -d /var/lib/munin munin
160
161 %postun common
162 if [ "$1" = "0" ]; then
163         %userremove munin
164         %groupremove munin
165 fi
166
167 %files
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*
191
192 %files common
193 %defattr(644,root,root,755)
194 %doc README.api README.plugins ChangeLog
195 # %{_docdir}/munin/README.config
196 %doc build/doc/*.{html,pdf}
197 %dir %{_sysconfdir}
198 %dir %{_datadir}/munin
199 %attr(750,munin,root) %dir /var/log/munin
200 %attr(770,munin,munin) %dir /var/lib/munin
201
202 %files node
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
217 %endif
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*
This page took 0.078246 seconds and 3 git commands to generate.