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