]> git.pld-linux.org Git - packages/rrdtool.git/blob - rrdtool.spec
- rebuild with perl 5.26
[packages/rrdtool.git] / rrdtool.spec
1 # TODO:
2 # - SysV init script for rrdcached, post/postun/etc.
3 #
4 # Conditional build:
5 %bcond_without  lua             # LUA binding
6 %bcond_without  perl            # Perl binding
7 %bcond_without  python          # Python binding
8 %bcond_without  ruby            # Ruby binding
9 %bcond_without  tcl             # Tcl binding
10 %bcond_without  ceph            # Ceph (RADOS) storage support
11 %bcond_without  rrd_graph       # all rrd_graph functions (depend on cairo+pango)
12 %bcond_without  rrdcgi          # building of rrdcgi (depends on rrd_graph)
13
14 %if %{without rrd_graph}
15 %undefine       with_rrdcgi
16 %endif
17
18 %define pdir    RRDp
19 %include        /usr/lib/rpm/macros.perl
20 Summary:        RRDtool - round robin database
21 Summary(pl.UTF-8):      RRDtool - baza danych typu round-robin
22 Summary(pt_BR.UTF-8):   Round Robin Database, uma ferramenta para construção de gráficos
23 Summary(ru.UTF-8):      RRDtool - база данных с "циклическим обновлением"
24 Summary(uk.UTF-8):      RRDtool - це система зберігання та показу серійних даних
25 Name:           rrdtool
26 Version:        1.5.4
27 Release:        8
28 License:        GPL v2+ + FLOSS exception
29 Group:          Applications/Databases
30 Source0:        http://oss.oetiker.ch/rrdtool/pub/%{name}-%{version}.tar.gz
31 # Source0-md5:  4daea1e628e1c70d91800d6a06427dc1
32 Patch0:         %{name}-tcl-path.patch
33 Patch1:         %{name}-missing.patch
34 URL:            http://oss.oetiker.ch/rrdtool/
35 BuildRequires:  autoconf >= 2.60
36 BuildRequires:  automake
37 %{?with_ceph:BuildRequires:     ceph-devel}
38 BuildRequires:  gettext-tools >= 0.18
39 BuildRequires:  glib2-devel >= 1:2.28.7
40 BuildRequires:  groff
41 BuildRequires:  libdbi-devel
42 BuildRequires:  libtool
43 BuildRequires:  libwrap-devel
44 BuildRequires:  libxml2-devel >= 1:2.7.8
45 BuildRequires:  pkgconfig
46 BuildRequires:  rpm-pythonprov
47 BuildRequires:  rpmbuild(macros) >= 1.272
48 %if %{with rrd_graph}
49 BuildRequires:  cairo-devel >= 1.10.2
50 BuildRequires:  libpng-devel
51 BuildRequires:  pango-devel >= 1:1.28.7
52 %endif
53 %if %{with lua}
54 BuildRequires:  lua51 >= 5.1
55 BuildRequires:  lua51-devel >= 5.1
56 %endif
57 %if %{with perl}
58 BuildRequires:  perl-devel >= 1:5.8.0
59 BuildRequires:  rpm-perlprov
60 %endif
61 %if %{with python}
62 BuildRequires:  python >= 1:2.3
63 BuildRequires:  python-devel >= 1:2.3
64 %endif
65 %if %{with ruby}
66 BuildRequires:  rpm-rubyprov
67 BuildRequires:  ruby-devel
68 %endif
69 %if %{with tcl}
70 BuildRequires:  tcl-devel
71 %endif
72 %{?with_rrd_graph:Requires:     cairo >= 1.10.2}
73 Requires:       glib2 >= 1:2.28.7
74 Requires:       libxml2 >= 1:2.7.8
75 %{?with_rrd_graph:Requires:     pango >= 1:1.28.7}
76 Suggests:       fonts-TTF-DejaVu
77 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
78
79 %description
80 RRD is the Acronym for Round Robin Database. RRD is a system to store
81 and display time-series data (i.e. network bandwidth, machine-room
82 temperature, server load average). It stores the data in a very
83 compact way that will not expand over time, and it presents useful
84 graphs by processing the data to enforce a certain data density. It
85 can be used either via simple wrapper scripts (from shell or Perl) or
86 via frontends that poll network devices and put a friendly user
87 interface on it.
88
89 %description -l pl.UTF-8
90 RRD jest akronimem Round Robin Database. Jest to system pozwalający na
91 składowanie i wyświetlanie czasowych serii danych (np. przepustowość
92 sieci, temperatura w pomieszczeniu, obciążenie serwera). Składuje dane
93 w "skondensowanej" postaci, która nie rozrasta się z biegiem czasu
94 oraz pozwala na produkowanie wykresów z użytecznymi danymi. Może być
95 używane poprzez prosty skrypcik (shell lub Perl), frontendy czy inne
96 interfejsy użytkownika.
97
98 %description -l pt_BR.UTF-8
99 RRD e' um sistema para armazenar e apresentar series temporais de
100 dados (i.e. utilização de rede, temperaturas, cargas em servidores).
101 Os dados são armazenados em uma forma compacta que não se expande com
102 o tempo, e gráficos podem ser apresentados processando-se esses dados.
103 RRD pode ser utilizado com wrapper scripts (em shell ou Perl) ou
104 através de front-ends.
105
106 %description -l ru.UTF-8
107 RRD - соращение для "Round Robin Database" (база данных с "циклическим
108 обновлением"). RRD - система для сохранения и показа информации за
109 определенный промежуток времени (например скорость передачи данных в
110 сети, температуру в машинном зале, среднюю загрузку сервера). Она
111 сохраняет данные в очень компактной форме, так что данные не будут
112 занимать все больше и больше места с течением времени и предоставляет
113 разумное графическое представление информации. Может быть использована
114 как из простых скриптов (shell, Perl, etc) или встроена в программы,
115 которые опрашивают сетевые устройства и показывают данные в удобном
116 для пользователя виде.
117
118 %description -l uk.UTF-8
119 Назва RRD - це акронім для Round Robin Database. RRD - це система
120 зберігання та показу серійних даних (наприклад, полоси каналу,
121 температура гермозони, завантаження сервера). RRD зберігає дані дуже
122 компактно і так, що розмір бази даних не збільшується з часом, та
123 презентує корисні графіки обробляючи дані з тим, щоб встановити
124 потрібну щільність вибірки в часі. RRD можна використовувати як через
125 прості wrapper-скрипти, так і через фронтенди, що опитують мережеві
126 пристрої та надають дружній інтерфейс користувача.
127
128 %package cached
129 Summary:        Data caching daemon for RRDtool
130 Summary(pl.UTF-8):      Demon pamięci podręcznej danych dla RRDtoola
131 Group:          Daemons
132 Requires:       %{name} = %{version}-%{release}
133
134 %description cached
135 Data caching daemon for RRDtool.
136
137 %description cached -l pl.UTF-8
138 Demon pamięci podręcznej danych dla RRDtoola.
139
140 %package devel
141 Summary:        RRDtool development
142 Summary(pl.UTF-8):      Narzędzia programistyczne pakietu RRDtool
143 Summary(pt_BR.UTF-8):   Bibliotecas e arquivos de inclusão da librrd
144 Summary(ru.UTF-8):      RRDtool - Заголовки, необходимые для разработки
145 Summary(uk.UTF-8):      RRDtool - бібліотечні лінки та файли хедерів
146 Group:          Development/Libraries
147 Requires:       %{name} = %{version}-%{release}
148 %{?with_rrd_graph:Requires:     cairo-devel >= 1.10.2}
149 Requires:       glib2-devel >= 1:2.28.7
150 Requires:       libdbi-devel
151 Requires:       libwrap-devel
152 Requires:       libxml2-devel >= 1:2.7.8
153 %{?with_rrd_graph:Requires:     pango-devel >= 1:1.28.7}
154
155 %description devel
156 RRDtool development files.
157
158 %description devel -l pl.UTF-8
159 Narzędzia programistyczne pakietu RRDtool.
160
161 %description devel -l pt_BR.UTF-8
162 RRD e' um sistema para armazenar e apresentar series temporais de
163 dados (i.e. utilização de rede, temperaturas, cargas em servidores).
164
165 Este pacote contem arquivos de desenvolvimento do RRD.
166
167 %description devel -l ru.UTF-8
168 RRD - соращение для "Round Robin Database" (база данных с "циклическим
169 обновлением"). RRD - система для сохранения и показа информации за
170 определенный промежуток времени (например скорость передачи данных в
171 сети, температуру в машинном зале, среднюю загрузку сервера).
172
173 Этот пакет позволяет создавать программы, которые используют это
174 библиотеку непосредственно.
175
176 %description devel -l uk.UTF-8
177 RRDtool - библиотечные линки и файлы хедеров.
178
179 %package static
180 Summary:        RRDtool static library
181 Summary(pl.UTF-8):      Statyczne biblioteki RRDtool
182 Summary(pt_BR.UTF-8):   Biblioteca estática librrd
183 Summary(ru.UTF-8):      RRDtool - Статические библиотеки
184 Summary(uk.UTF-8):      Статичні бібліотеки RRDtool
185 Group:          Development/Libraries
186 Requires:       %{name}-devel = %{version}-%{release}
187
188 %description static
189 RRDtool static library.
190
191 %description static -l pl.UTF-8
192 Statyczne biblioteki RRDtool.
193
194 %description static -l pt_BR.UTF-8
195 RRD e' um sistema para armazenar e apresentar series temporais de
196 dados (i.e. utilização de rede, temperaturas, cargas em servidores).
197
198 Este pacote contem a biblioteca estática do RRD.
199
200 %description static -l ru.UTF-8
201 RRD - соращение для "Round Robin Database" (база данных с "циклическим
202 обновлением"). RRD - система для сохранения и показа информации за
203 определенный промежуток времени (например скорость передачи данных в
204 сети, температуру в машинном зале, среднюю загрузку сервера). Этот
205 пакет позволяет создавать статически слинкованные программы, которые
206 используют это библиотеку непосредственно.
207
208 %description static -l uk.UTF-8
209 Статичні бібліотеки для розробки програм, що використовують RRDtool.
210
211 %package doc
212 Summary:        RRDtool documentation
213 Summary(pl.UTF-8):      Dokumentacja do RRDtoola
214 Group:          Documentation
215 # noarch subpackages only when building with rpm5
216 %if "%{_rpmversion}" >= "5"
217 BuildArch:      noarch
218 %endif
219
220 %description doc
221 RRD is the Acronym for Round Robin Database. RRD is a system to store
222 and display time-series data (i.e. network bandwidth, machine-room
223 temperature, server load average).
224
225 This package contains documentation on using RRD.
226
227 %description doc -l pl.UTF-8
228 RRD jest akronimem Round Robin Database. Jest to system pozwalający na
229 składowanie i wyświetlanie czasowych serii danych (np. przepustowość
230 sieci, temperatura w pomieszczeniu, obciążenie serwera).
231
232 Ten pakiet zawiera dokumentację użytkownika dla RRD.
233
234 %package -n lua-rrdtool
235 Summary:        RRD module for Lua
236 Summary(pl.UTF-8):      Moduł RRD dla języka Lua
237 Group:          Development/Languages
238 Requires:       %{name} = %{version}-%{release}
239 Requires:       lua51
240
241 %description -n lua-rrdtool
242 Lua interface to RRDtool.
243
244 %description -n lua-rrdtool -l pl.UTF-8
245 Interfejs języka Lua do RRDtoola.
246
247 %package -n perl-rrdtool
248 Summary:        Access RRDtool from Perl
249 Summary(pl.UTF-8):      Dostęp do RRDtoola z poziomu Perla
250 Group:          Development/Languages/Perl
251 Requires:       %{name} = %{version}-%{release}
252
253 %description -n perl-rrdtool
254 Perl modules to access RRDtool: RRDs to access RRDtool as shared
255 module and RRDp to access RRDtool via a set of pipes.
256
257 %description -n perl-rrdtool -l pl.UTF-8
258 Moduły Perla pozwalające na dostęp do RRDtoola: RRDs do dostępu do
259 RRDtoola jako modułu dzielonego oraz RRDp do dostępu poprzez zestaw
260 potoków.
261
262 %package -n python-rrdtool
263 Summary:        Python interface to RRDtool
264 Summary(pl.UTF-8):      Pythonowy interfejs do RRDtoola
265 Group:          Development/Languages/Python
266 Requires:       %{name} = %{version}-%{release}
267 Requires:       python-libs
268
269 %description -n python-rrdtool
270 Python interface to RRDtool, the graphing and logging utility.
271
272 %description -n python-rrdtool -l pl.UTF-8
273 Interfejs Pythona do RRDtoola - narzędzia do tworzenia wykresów i
274 logowania.
275
276 %package -n ruby-rrdtool
277 Summary:        Ruby interface to RRDtool
278 Summary(pl.UTF-8):      Interfejs języka Ruby do RRDtoola
279 Group:          Development/Languages/Python
280 Requires:       %{name} = %{version}-%{release}
281
282 %description -n ruby-rrdtool
283 Ruby interface to RRDtool, the graphing and logging utility.
284
285 %description -n ruby-rrdtool -l pl.UTF-8
286 Interfejs języka Ruby do RRDtoola - narzędzia do tworzenia wykresów i
287 logowania.
288
289 %package -n tcl-rrdtool
290 Summary:        Tcl extension to access the RRD library
291 Summary(pl.UTF-8):      Rozszerzenie Tcl-a pozwalające na dostęp do biblioteki Tcl
292 Group:          Development/Languages/Tcl
293 Requires:       %{name} = %{version}-%{release}
294 Requires:       tcl
295
296 %description -n tcl-rrdtool
297 Tcl extension to access the RRD library.
298
299 %description -n tcl-rrdtool -l pl.UTF-8
300 Rozszerzenie Tcl-a pozwalające na dostęp do biblioteki Tcl.
301
302 %prep
303 %setup -q
304 %patch0 -p1
305 %patch1 -p1
306
307 sed -i -e 's#\$TCL_PACKAGE_PATH#%{_prefix}/lib#g' configure.ac
308 sed -i -e 's#/lib/lua/#/%{_lib}/lua/#g' configure.ac
309
310 # We only want .txt and .html files for the main documentation
311 install -d docs/{html,/txt}
312 mv doc/*.txt docs/txt
313 mv doc/*.html docs/html
314
315 # Put Perl docs in Perl package
316 install -d perl-docs/html
317 mv docs/html/RRD*.html perl-docs/html
318
319 %build
320 %{__libtoolize}
321 %{__aclocal} -I m4
322 %{__autoconf}
323 %{__autoheader}
324 %{__automake}
325 %configure \
326         LUA=/usr/bin/lua5.1 \
327         --disable-silent-rules \
328         %{!?with_ceph:--disable-librados} \
329         %{!?with_rrd_graph:--disable-rrd_graph} \
330         %{!?with_rrdcgi:--disable-rrdcgi} \
331         %{!?with_lua:--disable-lua} \
332         %{!?with_perl:--disable-perl} \
333         %{!?with_python:--disable-python} \
334         %{!?with_ruby:--disable-ruby} \
335         %{!?with_tcl:--disable-tcl} \
336         --with-perl-options="INSTALLDIRS=vendor"
337
338 # empty RUBY_MAKE_OPTIONS as workaround for some make weirdness
339 # (tried to install without DESTDIR on plain make)
340 %{__make} \
341         RUBY_MAKE_OPTIONS= \
342         LUA_CFLAGS=-I/usr/include/lua51
343
344 %install
345 rm -rf $RPM_BUILD_ROOT
346 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
347
348 %{__make} install \
349         DESTDIR=$RPM_BUILD_ROOT \
350         perl_sitearch=%{perl_vendorarch} \
351         pythondir=%{py_sitedir} \
352         examplesdir=%{_examplesdir}/%{name}-%{version} \
353         RUBYARCHDIR=$RPM_BUILD_ROOT%{ruby_archdir}
354
355 %{__rm} $RPM_BUILD_ROOT%{_libdir}/librrd.la
356 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}
357
358 %if %{with lua}
359 %{__rm} $RPM_BUILD_ROOT%{_libdir}/lua/5.1/*.{la,a}
360 %endif
361
362 %if %{with perl}
363 %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/RRDs/.packlist
364 %endif
365
366 %clean
367 rm -rf $RPM_BUILD_ROOT
368
369 %post   -p /sbin/ldconfig
370 %postun -p /sbin/ldconfig
371
372 %files
373 %defattr(644,root,root,755)
374 %doc CHANGES CONTRIBUTORS NEWS THREADS TODO
375 %attr(755,root,root) %{_libdir}/librrd.so.*.*.*
376 %attr(755,root,root) %ghost %{_libdir}/librrd.so.4
377 %attr(755,root,root) %{_libdir}/librrd_th.so.*.*.*
378 %attr(755,root,root) %ghost %{_libdir}/librrd_th.so.4
379 %{?with_rrdcgi:%attr(755,root,root) %{_bindir}/rrdcgi}
380 %attr(755,root,root) %{_bindir}/rrdcreate
381 %attr(755,root,root) %{_bindir}/rrdinfo
382 %attr(755,root,root) %{_bindir}/rrdtool
383 %attr(755,root,root) %{_bindir}/rrdupdate
384 %{_mandir}/man1/bin_dec_hex.1*
385 %{_mandir}/man1/cdeftutorial.1*
386 %{_mandir}/man1/rpntutorial.1*
387 %{_mandir}/man1/rrd-beginners.1*
388 %{_mandir}/man1/rrdbuild.1*
389 %{?with_rrdcgi:%{_mandir}/man1/rrdcgi.1*}
390 %{_mandir}/man1/rrdcreate.1*
391 %{_mandir}/man1/rrddump.1*
392 %{_mandir}/man1/rrdfetch.1*
393 %{_mandir}/man1/rrdfirst.1*
394 %{_mandir}/man1/rrdgraph*.1*
395 %{_mandir}/man1/rrdinfo.1*
396 %{_mandir}/man1/rrdlast.1*
397 %{_mandir}/man1/rrdlastupdate.1*
398 %{?with_ceph:%{_mandir}/man1/rrdrados.1*}
399 %{_mandir}/man1/rrdresize.1*
400 %{_mandir}/man1/rrdrestore.1*
401 %{_mandir}/man1/rrdthreads.1*
402 %{_mandir}/man1/rrdtool.1*
403 %{_mandir}/man1/rrdtune.1*
404 %{_mandir}/man1/rrdtutorial.1*
405 %{_mandir}/man1/rrdupdate.1*
406 %{_mandir}/man1/rrdxport.1*
407
408 %files cached
409 %defattr(644,root,root,755)
410 %attr(755,root,root) %{_bindir}/rrdcached
411 %{_mandir}/man1/rrdcached.1*
412 %{_mandir}/man1/rrdflushcached.1*
413 %{systemdunitdir}/rrdcached.service
414 %{systemdunitdir}/rrdcached.socket
415
416 %files devel
417 %defattr(644,root,root,755)
418 %attr(755,root,root) %{_libdir}/librrd.so
419 %attr(755,root,root) %{_libdir}/librrd_th.so
420 %{_libdir}/librrd_th.la
421 %{_includedir}/rrd*.h
422 %{_pkgconfigdir}/librrd.pc
423 %{_mandir}/man3/librrd.3*
424
425 %files static
426 %defattr(644,root,root,755)
427 %{_libdir}/librrd.a
428 %{_libdir}/librrd_th.a
429
430 %files doc
431 %defattr(644,root,root,755)
432 %doc docs/html docs/txt
433 %{_examplesdir}/%{name}-%{version}
434
435 %if %{with lua}
436 %files -n lua-rrdtool
437 %defattr(644,root,root,755)
438 %attr(755,root,root) %{_libdir}/lua/5.1/rrd.so*
439 %{_mandir}/man1/rrdlua.1*
440 %endif
441
442 %if %{with perl}
443 %files -n perl-rrdtool
444 %defattr(644,root,root,755)
445 %doc perl-docs/html/*
446 %{perl_vendorlib}/RRDp.pm
447 %{perl_vendorarch}/RRDs.pm
448 %dir %{perl_vendorarch}/auto/RRDs
449 %attr(755,root,root) %{perl_vendorarch}/auto/RRDs/RRDs.so
450 %{_mandir}/man3/RRDp.3*
451 %{_mandir}/man3/RRDs.3*
452 %endif
453
454 %if %{with python}
455 %files -n python-rrdtool
456 %defattr(644,root,root,755)
457 %attr(755,root,root) %{py_sitedir}/rrdtool.so
458 %if "%{py_ver}" > "2.4"
459 %{py_sitedir}/py_rrdtool-*.egg-info
460 %endif
461 %endif
462
463 %if %{with ruby}
464 %files -n ruby-rrdtool
465 %defattr(644,root,root,755)
466 %attr(755,root,root) %{ruby_archdir}/RRD.so
467 %endif
468
469 %if %{with tcl}
470 %files -n tcl-rrdtool
471 %defattr(644,root,root,755)
472 %attr(755,root,root) %{_libdir}/tclrrd%{version}.so
473 %{_prefix}/lib/tclrrd%{version}
474 %endif
This page took 0.053883 seconds and 3 git commands to generate.