]>
Commit | Line | Data |
---|---|---|
17ec29bd JR |
1 | # TODO: |
2 | # - better descriptions? | |
3 | # | |
f4933203 JR |
4 | %define contrib_package()\ |
5 | %package %1\ | |
6 | Summary: Munin plugins from MuninExchange - %1\ | |
7 | Summary(pl.UTF-8): Wtyczki munina z MuninExchange - %1\ | |
8 | Group: Daemons\ | |
9 | Requires: munin-node\ | |
10 | \ | |
11 | %description %1\ | |
12 | This package contains plugins for Munin from MuninExchange repository\ | |
13 | located at https://github.com/munin-monitoring/contrib/.\ | |
14 | \ | |
15 | %description %1 -l pl.UTF-8\ | |
16 | Ten pakiet zawera wtyczki dla Munina z repozytorium MuninExchange,\ | |
17 | znajdującym się na https://github.com/munin-monitoring/contrib/.\ | |
18 | \ | |
19 | %files %1 -f %1.list\ | |
20 | %defattr(644,root,root,755)\ | |
21 | %{nil} | |
22 | ||
17ec29bd JR |
23 | %include /usr/lib/rpm/macros.perl |
24 | Summary: Munin plugins from MuninExchange | |
25 | Summary(pl.UTF-8): Wtyczki munina z MuninExchange | |
26 | Name: munin-plugins-muninexchange | |
f4933203 JR |
27 | Version: 20130823 |
28 | Release: 0.1 | |
17ec29bd JR |
29 | License: GPL |
30 | Group: Daemons | |
f4933203 JR |
31 | Source0: https://github.com/munin-monitoring/contrib/tarball/master/%{name}.tar.gz |
32 | # Source0-md5: d0b1caf2e18a0edc349184f51d7d0cb5 | |
d7600175 | 33 | Patch0: %{name}-vserver.patch |
e33d63e5 | 34 | Patch1: %{name}-postfix.patch |
70d3b22c | 35 | Patch2: %{name}-other.patch |
19c70efe | 36 | Patch3: %{name}-php.patch |
050b7cc6 | 37 | Patch4: %{name}-openvpn.patch |
f561ce70 | 38 | Patch5: %{name}-samba.patch |
89ed4d75 | 39 | Patch6: %{name}-apache.patch |
8e3711de | 40 | Patch7: %{name}-passenger.patch |
decdd1b2 | 41 | URL: http://exchange.munin-monitoring.org/ |
00e773e7 | 42 | BuildRequires: dos2unix |
17ec29bd | 43 | BuildRequires: perl-devel |
4ddd1685 | 44 | BuildRequires: rpm-perlprov |
45 | BuildRequires: rpm-pythonprov | |
17ec29bd | 46 | BuildRequires: rpmbuild(macros) >= 1.268 |
17ec29bd JR |
47 | BuildArch: noarch |
48 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
49 | ||
50 | %description | |
045095f2 ER |
51 | This package contains plugins for Munin from MuninExchange repository |
52 | located at <http://muninexchange.projects.linpro.no/>. | |
17ec29bd JR |
53 | |
54 | %description -l pl.UTF-8 | |
55 | Ten pakiet zawera wtyczki dla Munina z repozytorium MuninExchange, | |
045095f2 | 56 | znajdującym się na <http://muninexchange.projects.linpro.no/>. |
17ec29bd | 57 | |
23ac86d2 JR |
58 | %package databases |
59 | Summary: Munin plugins from MuninExchange - databases | |
60 | Summary(pl.UTF-8): Wtyczki munina z MuninExchange - databases | |
17ec29bd | 61 | Group: Daemons |
d2d89dcf | 62 | Requires: munin-node |
23ac86d2 | 63 | Obsoletes: munin-plugins-muninexchange-mysql |
17ec29bd | 64 | |
23ac86d2 | 65 | %description databases |
045095f2 ER |
66 | This package contains plugins for Munin from MuninExchange repository |
67 | located at <http://muninexchange.projects.linpro.no/>. | |
17ec29bd | 68 | |
23ac86d2 | 69 | %description databases -l pl.UTF-8 |
17ec29bd | 70 | Ten pakiet zawera wtyczki dla Munina z repozytorium MuninExchange, |
045095f2 | 71 | znajdującym się na <http://muninexchange.projects.linpro.no/>. |
17ec29bd | 72 | |
23ac86d2 JR |
73 | %package network |
74 | Summary: Munin plugins from MuninExchange - network | |
75 | Summary(pl.UTF-8): Wtyczki munina z MuninExchange - network | |
17ec29bd | 76 | Group: Daemons |
d2d89dcf | 77 | Requires: munin-node |
23ac86d2 | 78 | Obsoletes: munin-plugins-muninexchange-powerdns |
17ec29bd | 79 | |
23ac86d2 | 80 | %description network |
045095f2 ER |
81 | This package contains plugins for Munin from MuninExchange repository |
82 | located at <http://muninexchange.projects.linpro.no/>. | |
17ec29bd | 83 | |
23ac86d2 | 84 | %description network -l pl.UTF-8 |
17ec29bd | 85 | Ten pakiet zawera wtyczki dla Munina z repozytorium MuninExchange, |
045095f2 | 86 | znajdującym się na <http://muninexchange.projects.linpro.no/>. |
17ec29bd | 87 | |
23ac86d2 JR |
88 | %package other |
89 | Summary: Munin plugins from MuninExchange - other | |
90 | Summary(pl.UTF-8): Wtyczki munina z MuninExchange - other | |
17ec29bd | 91 | Group: Daemons |
d2d89dcf | 92 | Requires: munin-node |
23ac86d2 JR |
93 | Obsoletes: munin-plugins-muninexchange-amavis |
94 | Obsoletes: munin-plugins-muninexchange-amule | |
95 | Obsoletes: munin-plugins-muninexchange-apache | |
96 | Obsoletes: munin-plugins-muninexchange-apt | |
97 | Obsoletes: munin-plugins-muninexchange-asterisk | |
98 | Obsoletes: munin-plugins-muninexchange-bacula | |
99 | Obsoletes: munin-plugins-muninexchange-bind | |
100 | Obsoletes: munin-plugins-muninexchange-boinc | |
101 | Obsoletes: munin-plugins-muninexchange-condor | |
102 | Obsoletes: munin-plugins-muninexchange-disk | |
103 | Obsoletes: munin-plugins-muninexchange-flashmediaserver | |
104 | Obsoletes: munin-plugins-muninexchange-freeradius | |
105 | Obsoletes: munin-plugins-muninexchange-games | |
106 | Obsoletes: munin-plugins-muninexchange-groupwise | |
107 | Obsoletes: munin-plugins-muninexchange-heimdal | |
108 | Obsoletes: munin-plugins-muninexchange-icecast | |
109 | Obsoletes: munin-plugins-muninexchange-iperf | |
110 | Obsoletes: munin-plugins-muninexchange-java | |
111 | Obsoletes: munin-plugins-muninexchange-mediawiki | |
112 | Obsoletes: munin-plugins-muninexchange-memcache | |
113 | Obsoletes: munin-plugins-muninexchange-mysql | |
114 | Obsoletes: munin-plugins-muninexchange-mythtv | |
115 | Obsoletes: munin-plugins-muninexchange-nfs | |
116 | Obsoletes: munin-plugins-muninexchange-openldap | |
117 | Obsoletes: munin-plugins-muninexchange-openvpn | |
118 | Obsoletes: munin-plugins-muninexchange-oracle | |
119 | Obsoletes: munin-plugins-muninexchange-php | |
120 | Obsoletes: munin-plugins-muninexchange-postfix | |
121 | Obsoletes: munin-plugins-muninexchange-postgresql | |
122 | Obsoletes: munin-plugins-muninexchange-printing | |
123 | Obsoletes: munin-plugins-muninexchange-processes | |
124 | Obsoletes: munin-plugins-muninexchange-proftpd | |
125 | Obsoletes: munin-plugins-muninexchange-puppet | |
126 | Obsoletes: munin-plugins-muninexchange-pure-ftpd | |
127 | Obsoletes: munin-plugins-muninexchange-qmail | |
128 | Obsoletes: munin-plugins-muninexchange-radiator | |
129 | Obsoletes: munin-plugins-muninexchange-rtorrent | |
130 | Obsoletes: munin-plugins-muninexchange-samba | |
131 | Obsoletes: munin-plugins-muninexchange-scalix | |
132 | Obsoletes: munin-plugins-muninexchange-sensors | |
133 | Obsoletes: munin-plugins-muninexchange-squid | |
134 | Obsoletes: munin-plugins-muninexchange-teamspeak | |
135 | Obsoletes: munin-plugins-muninexchange-time | |
136 | Obsoletes: munin-plugins-muninexchange-tor | |
137 | Obsoletes: munin-plugins-muninexchange-ups | |
138 | Obsoletes: munin-plugins-muninexchange-varnish | |
139 | Obsoletes: munin-plugins-muninexchange-vmware | |
140 | Obsoletes: munin-plugins-muninexchange-vserver | |
141 | Obsoletes: munin-plugins-muninexchange-xen | |
142 | Obsoletes: munin-plugins-muninexchange-yum | |
143 | Obsoletes: munin-plugins-muninexchange-zyxel | |
17ec29bd | 144 | |
23ac86d2 | 145 | %description other |
045095f2 ER |
146 | This package contains plugins for Munin from MuninExchange repository |
147 | located at <http://muninexchange.projects.linpro.no/>. | |
17ec29bd | 148 | |
23ac86d2 | 149 | %description other -l pl.UTF-8 |
17ec29bd | 150 | Ten pakiet zawera wtyczki dla Munina z repozytorium MuninExchange, |
045095f2 | 151 | znajdującym się na <http://muninexchange.projects.linpro.no/>. |
17ec29bd | 152 | |
23ac86d2 JR |
153 | %package services |
154 | Summary: Munin plugins from MuninExchange - services | |
155 | Summary(pl.UTF-8): Wtyczki munina z MuninExchange - services | |
17ec29bd | 156 | Group: Daemons |
d2d89dcf | 157 | Requires: munin-node |
23ac86d2 JR |
158 | Obsoletes: munin-plugins-muninexchange-icecast |
159 | Obsoletes: munin-plugins-muninexchange-postfix | |
160 | Obsoletes: munin-plugins-muninexchange-proftpd | |
161 | Obsoletes: munin-plugins-muninexchange-pure-ftpd | |
162 | Obsoletes: munin-plugins-muninexchange-sensors | |
163 | Obsoletes: munin-plugins-muninexchange-squid | |
164 | Obsoletes: munin-plugins-muninexchange-time | |
165 | Obsoletes: munin-plugins-muninexchange-varnish | |
17ec29bd | 166 | |
23ac86d2 | 167 | %description services |
045095f2 ER |
168 | This package contains plugins for Munin from MuninExchange repository |
169 | located at <http://muninexchange.projects.linpro.no/>. | |
17ec29bd | 170 | |
23ac86d2 | 171 | %description services -l pl.UTF-8 |
17ec29bd | 172 | Ten pakiet zawera wtyczki dla Munina z repozytorium MuninExchange, |
045095f2 | 173 | znajdującym się na <http://muninexchange.projects.linpro.no/>. |
17ec29bd JR |
174 | |
175 | %package system | |
176 | Summary: Munin plugins from MuninExchange - system | |
177 | Summary(pl.UTF-8): Wtyczki munina z MuninExchange - system | |
178 | Group: Daemons | |
d2d89dcf | 179 | Requires: munin-node |
23ac86d2 | 180 | Obsoletes: munin-plugins-muninexchange-disk |
17ec29bd JR |
181 | |
182 | %description system | |
045095f2 ER |
183 | This package contains plugins for Munin from MuninExchange repository |
184 | located at <http://muninexchange.projects.linpro.no/>. | |
17ec29bd | 185 | |
045095f2 | 186 | %description system -l pl.UTF-8 |
17ec29bd | 187 | Ten pakiet zawera wtyczki dla Munina z repozytorium MuninExchange, |
045095f2 | 188 | znajdującym się na <http://muninexchange.projects.linpro.no/>. |
17ec29bd | 189 | |
23ac86d2 JR |
190 | %package web-servers |
191 | Summary: Munin plugins from MuninExchange - web servers | |
192 | Summary(pl.UTF-8): Wtyczki munina z MuninExchange - web servers | |
d2d89dcf JR |
193 | Group: Daemons |
194 | Requires: munin-node | |
23ac86d2 JR |
195 | Obsoletes: munin-plugins-muninexchange-apache |
196 | Obsoletes: munin-plugins-muninexchange-nginx | |
197 | Obsoletes: munin-plugins-muninexchange-tomcat | |
d2d89dcf | 198 | |
23ac86d2 | 199 | %description web-servers |
045095f2 ER |
200 | This package contains plugins for Munin from MuninExchange repository |
201 | located at <http://muninexchange.projects.linpro.no/>. | |
d2d89dcf | 202 | |
23ac86d2 | 203 | %description web-servers -l pl.UTF-8 |
d2d89dcf | 204 | Ten pakiet zawera wtyczki dla Munina z repozytorium MuninExchange, |
045095f2 | 205 | znajdującym się na <http://muninexchange.projects.linpro.no/>. |
17ec29bd JR |
206 | |
207 | %prep | |
f4933203 | 208 | %setup -q -n munin-monitoring-contrib-538cdc9 |
00e773e7 JR |
209 | |
210 | find -type f -print0 | xargs -0 dos2unix | |
211 | ||
d7600175 | 212 | %patch0 -p1 |
e33d63e5 | 213 | %patch1 -p1 |
70d3b22c | 214 | %patch2 -p1 |
19c70efe | 215 | %patch3 -p1 |
050b7cc6 | 216 | %patch4 -p1 |
f561ce70 | 217 | %patch5 -p1 |
89ed4d75 | 218 | %patch6 -p0 |
8e3711de | 219 | %patch7 -p1 |
7f7a5353 | 220 | |
045095f2 ER |
221 | grep -r bin/env -l . | xargs sed -i -e '1{ |
222 | s,#!.*bin/env ruby,#!%{__ruby}, | |
23ac86d2 | 223 | s,#!.*bin/env python[^ ]*,#!%{__python}, |
045095f2 ER |
224 | s,#!.*bin/env perl,#!%{__perl}, |
225 | }' | |
226 | ||
23ac86d2 JR |
227 | sed -i -e 's|#!.*/usr/local/bin/|#!/usr/bin/|' */* |
228 | ||
045095f2 ER |
229 | # cleanup backups after patching |
230 | find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f | |
231 | ||
17ec29bd JR |
232 | %install |
233 | rm -rf $RPM_BUILD_ROOT | |
234 | install -d $RPM_BUILD_ROOT%{_datadir}/munin/plugins/ | |
235 | ||
045095f2 | 236 | for i in *; do |
23ac86d2 JR |
237 | [ -d $i ] || continue |
238 | echo "%defattr(644,root,root,755)" > $i.list | |
239 | (cd $i; for f in *; do echo "%attr(755,root,root) %{_datadir}/munin/plugins/$f"; done) >> $i.list | |
17ec29bd JR |
240 | done |
241 | ||
242 | cp -a */* $RPM_BUILD_ROOT%{_datadir}/munin/plugins/ | |
243 | chmod 755 $RPM_BUILD_ROOT%{_datadir}/munin/plugins/* | |
244 | ||
f4933203 JR |
245 | touch $RPM_BUILD_ROOT/dupa |
246 | echo /dupa >dupa.list | |
247 | ||
17ec29bd JR |
248 | %clean |
249 | rm -rf $RPM_BUILD_ROOT | |
250 | ||
23ac86d2 | 251 | %files databases -f databases.list |
045095f2 | 252 | %defattr(644,root,root,755) |
23ac86d2 | 253 | |
17ec29bd | 254 | %files network -f network.list |
045095f2 | 255 | %defattr(644,root,root,755) |
23ac86d2 | 256 | |
17ec29bd | 257 | %files other -f other.list |
045095f2 | 258 | %defattr(644,root,root,755) |
23ac86d2 JR |
259 | |
260 | %files services -f services.list | |
045095f2 | 261 | %defattr(644,root,root,755) |
23ac86d2 | 262 | |
17ec29bd | 263 | %files system -f system.list |
045095f2 | 264 | %defattr(644,root,root,755) |
23ac86d2 JR |
265 | |
266 | %files web-servers -f web-servers.list | |
045095f2 | 267 | %defattr(644,root,root,755) |
f4933203 JR |
268 | |
269 | %contrib_package dupa |