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