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