]> git.pld-linux.org Git - packages/rrdtool.git/blobdiff - rrdtool.spec
- fix shebangs
[packages/rrdtool.git] / rrdtool.spec
index b2dce405e5ae3bc3a5daff11b60b7bc221f87a97..8697415855785159220f394f49f38edbdb4d334d 100644 (file)
@@ -1,13 +1,20 @@
-#
-## TODO:
-# - separate package with rrdcached (init script, systemd file, etc)
+# TODO:
+# - SysV init script for rrdcached, post/postun/etc.
 #
 # Conditional build:
-%bcond_without python  # Python binding
-%bcond_without tcl     # Tcl binding
-%bcond_without ruby    # Ruby binding
-#
-%include       /usr/lib/rpm/macros.perl
+%bcond_without lua             # LUA binding
+%bcond_without perl            # Perl binding
+%bcond_without python          # Python binding
+%bcond_without ruby            # Ruby binding
+%bcond_without tcl             # Tcl binding
+%bcond_without ceph            # Ceph (RADOS) storage support
+%bcond_without rrd_graph       # all rrd_graph functions (depend on cairo+pango)
+%bcond_without rrdcgi          # building of rrdcgi (depends on rrd_graph)
+
+%if %{without rrd_graph}
+%undefine      with_rrdcgi
+%endif
+
 %define        pdir    RRDp
 Summary:       RRDtool - round robin database
 Summary(pl.UTF-8):     RRDtool - baza danych typu round-robin
@@ -15,43 +22,57 @@ Summary(pt_BR.UTF-8):       Round Robin Database, uma ferramenta para construção de
 Summary(ru.UTF-8):     RRDtool - база данных с "циклическим обновлением"
 Summary(uk.UTF-8):     RRDtool - це система зберігання та показу серійних даних
 Name:          rrdtool
-Version:       1.4.8
-Release:       9
+Version:       1.7.2
+Release:       3
 License:       GPL v2+ + FLOSS exception
 Group:         Applications/Databases
-Source0:       http://oss.oetiker.ch/rrdtool/pub/%{name}-%{version}.tar.gz
-# Source0-md5: dbe59386db97fd2f2216729facd74ca8
+Source0:       https://oss.oetiker.ch/rrdtool/pub/%{name}-%{version}.tar.gz
+# Source0-md5: 638e3a0a1609d97e9f82e8832759dcd2
 Patch0:                %{name}-tcl-path.patch
+Patch1:                %{name}-missing.patch
+Patch2:                %{name}-build.patch
 URL:           http://oss.oetiker.ch/rrdtool/
 BuildRequires: autoconf >= 2.60
 BuildRequires: automake
-BuildRequires: cairo-devel >= 1.10.2
+%{?with_ceph:BuildRequires:    ceph-devel}
 BuildRequires: gettext-tools >= 0.18
 BuildRequires: glib2-devel >= 1:2.28.7
 BuildRequires: groff
-BuildRequires: intltool
 BuildRequires: libdbi-devel
 BuildRequires: libtool
 BuildRequires: libwrap-devel
 BuildRequires: libxml2-devel >= 1:2.7.8
+BuildRequires: pkgconfig
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.272
+%if %{with rrd_graph}
+BuildRequires: cairo-devel >= 1.10.2
+BuildRequires: libpng-devel
+BuildRequires: pango-devel >= 1:1.28.7
+%endif
+%if %{with lua}
 BuildRequires: lua51 >= 5.1
 BuildRequires: lua51-devel >= 5.1
-BuildRequires: pango-devel >= 1:1.28.7
+%endif
+%if %{with perl}
 BuildRequires: perl-devel >= 1:5.8.0
-BuildRequires: pkgconfig
+BuildRequires: rpm-perlprov
+%endif
 %if %{with python}
-BuildRequires: python >= 2.3
-BuildRequires: python-devel >= 2.3
+BuildRequires: python >= 1:2.3
+BuildRequires: python-devel >= 1:2.3
 %endif
-BuildRequires: rpm-perlprov
-BuildRequires: rpm-pythonprov
-BuildRequires: rpmbuild(macros) >= 1.272
-%{?with_ruby:BuildRequires:    ruby-devel}
-%{?with_tcl:BuildRequires:     tcl-devel}
-Requires:      cairo >= 1.10.2
+%if %{with ruby}
+BuildRequires: rpm-rubyprov
+BuildRequires: ruby-devel
+%endif
+%if %{with tcl}
+BuildRequires: tcl-devel
+%endif
+%{?with_rrd_graph:Requires:    cairo >= 1.10.2}
 Requires:      glib2 >= 1:2.28.7
 Requires:      libxml2 >= 1:2.7.8
-Requires:      pango >= 1:1.28.7
+%{?with_rrd_graph:Requires:    pango >= 1:1.28.7}
 Suggests:      fonts-TTF-DejaVu
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -71,7 +92,7 @@ składowanie i wyświetlanie czasowych serii danych (np. przepustowość
 sieci, temperatura w pomieszczeniu, obciążenie serwera). Składuje dane
 w "skondensowanej" postaci, która nie rozrasta się z biegiem czasu
 oraz pozwala na produkowanie wykresów z użytecznymi danymi. Może być
-używane poprzez prosty skrypcik (shell lub perl), frontendy czy inne
+używane poprzez prosty skrypcik (shell lub Perl), frontendy czy inne
 interfejsy użytkownika.
 
 %description -l pt_BR.UTF-8
@@ -90,7 +111,7 @@ RRD - соращение для "Round Robin Database" (база данных с
 сохраняет данные в очень компактной форме, так что данные не будут
 занимать все больше и больше места с течением времени и предоставляет
 разумное графическое представление информации. Может быть использована
-как из простых скриптов (shell, perl, etc) или встроена в программы,
+как из простых скриптов (shell, Perl, etc) или встроена в программы,
 которые опрашивают сетевые устройства и показывают данные в удобном
 для пользователя виде.
 
@@ -104,6 +125,18 @@ RRD - соращение для "Round Robin Database" (база данных с
 прості wrapper-скрипти, так і через фронтенди, що опитують мережеві
 пристрої та надають дружній інтерфейс користувача.
 
+%package cached
+Summary:       Data caching daemon for RRDtool
+Summary(pl.UTF-8):     Demon pamięci podręcznej danych dla RRDtoola
+Group:         Daemons
+Requires:      %{name} = %{version}-%{release}
+
+%description cached
+Data caching daemon for RRDtool.
+
+%description cached -l pl.UTF-8
+Demon pamięci podręcznej danych dla RRDtoola.
+
 %package devel
 Summary:       RRDtool development
 Summary(pl.UTF-8):     Narzędzia programistyczne pakietu RRDtool
@@ -112,12 +145,12 @@ Summary(ru.UTF-8):        RRDtool - Заголовки, необходимые для 
 Summary(uk.UTF-8):     RRDtool - бібліотечні лінки та файли хедерів
 Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
-Requires:      cairo-devel >= 1.10.2
+%{?with_rrd_graph:Requires:    cairo-devel >= 1.10.2}
 Requires:      glib2-devel >= 1:2.28.7
 Requires:      libdbi-devel
 Requires:      libwrap-devel
 Requires:      libxml2-devel >= 1:2.7.8
-Requires:      pango-devel >= 1:1.28.7
+%{?with_rrd_graph:Requires:    pango-devel >= 1:1.28.7}
 
 %description devel
 RRDtool development files.
@@ -175,6 +208,29 @@ RRD - соращение для "Round Robin Database" (база данных с
 %description static -l uk.UTF-8
 Статичні бібліотеки для розробки програм, що використовують RRDtool.
 
+%package doc
+Summary:       RRDtool documentation
+Summary(pl.UTF-8):     Dokumentacja do RRDtoola
+Group:         Documentation
+# noarch subpackages only when building with rpm5
+%if "%{_rpmversion}" >= "5"
+BuildArch:     noarch
+%endif
+
+%description doc
+RRD is the Acronym for Round Robin Database. RRD is a system to store
+and display time-series data (i.e. network bandwidth, machine-room
+temperature, server load average).
+
+This package contains documentation on using RRD.
+
+%description doc -l pl.UTF-8
+RRD jest akronimem Round Robin Database. Jest to system pozwalający na
+składowanie i wyświetlanie czasowych serii danych (np. przepustowość
+sieci, temperatura w pomieszczeniu, obciążenie serwera).
+
+Ten pakiet zawiera dokumentację użytkownika dla RRD.
+
 %package -n lua-rrdtool
 Summary:       RRD module for Lua
 Summary(pl.UTF-8):     Moduł RRD dla języka Lua
@@ -208,7 +264,7 @@ Summary:    Python interface to RRDtool
 Summary(pl.UTF-8):     Pythonowy interfejs do RRDtoola
 Group:         Development/Languages/Python
 Requires:      %{name} = %{version}-%{release}
-%pyrequires_eq python-libs
+Requires:      python-libs
 
 %description -n python-rrdtool
 Python interface to RRDtool, the graphing and logging utility.
@@ -222,7 +278,6 @@ Summary:    Ruby interface to RRDtool
 Summary(pl.UTF-8):     Interfejs języka Ruby do RRDtoola
 Group:         Development/Languages/Python
 Requires:      %{name} = %{version}-%{release}
-%{?ruby_mod_ver_requires_eq}
 
 %description -n ruby-rrdtool
 Ruby interface to RRDtool, the graphing and logging utility.
@@ -247,9 +302,26 @@ Rozszerzenie Tcl-a pozwalające na dostęp do biblioteki Tcl.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
+%patch2 -p1
+
+%{__sed} -i -e 's#\$TCL_PACKAGE_PATH#%{_prefix}/lib#g' configure.ac
+%{__sed} -i -e 's#/lib/lua/#/%{_lib}/lua/#g' configure.ac
 
-sed -i -e 's#\$TCL_PACKAGE_PATH#%{_prefix}/lib#g' configure.ac
-sed -i -e 's#/lib/lua/#/%{_lib}/lua/#g' configure.ac
+%{__sed} -E -i -e '1s,#!\s*/usr/bin/python(\s|$),#!%{__python}\1,' \
+      examples/stripes.py
+
+%{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+tclsh@TCL_VERSION@(\s|$),#!%{__tclsh}\1,' \
+      bindings/tcl/ifOctets.tcl.in
+
+# We only want .txt and .html files for the main documentation
+install -d docs/{html,/txt}
+mv doc/*.txt docs/txt
+mv doc/*.html docs/html
+
+# Put Perl docs in Perl package
+install -d perl-docs/html
+mv docs/html/RRD*.html perl-docs/html
 
 %build
 %{__libtoolize}
@@ -260,8 +332,14 @@ sed -i -e 's#/lib/lua/#/%{_lib}/lua/#g' configure.ac
 %configure \
        LUA=/usr/bin/lua5.1 \
        --disable-silent-rules \
-       %{!?with_tcl:--disable-tcl} \
+       %{!?with_ceph:--disable-librados} \
+       %{!?with_rrd_graph:--disable-rrd_graph} \
+       %{!?with_rrdcgi:--disable-rrdcgi} \
+       %{!?with_lua:--disable-lua} \
+       %{!?with_perl:--disable-perl} \
+       %{!?with_python:--disable-python} \
        %{!?with_ruby:--disable-ruby} \
+       %{!?with_tcl:--disable-tcl} \
        --with-perl-options="INSTALLDIRS=vendor"
 
 # empty RUBY_MAKE_OPTIONS as workaround for some make weirdness
@@ -281,13 +359,17 @@ install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
        examplesdir=%{_examplesdir}/%{name}-%{version} \
        RUBYARCHDIR=$RPM_BUILD_ROOT%{ruby_archdir}
 
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/lua/5.1/*.{la,a}
-%{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/RRDs/.packlist
-
 %{__rm} $RPM_BUILD_ROOT%{_libdir}/librrd.la
-
 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}
 
+%if %{with lua}
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/lua/5.1/*.{la,a}
+%endif
+
+%if %{with perl}
+%{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/RRDs/.packlist
+%endif
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -296,51 +378,88 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc CHANGES CONTRIBUTORS NEWS README THREADS TODO doc/*.html
-%attr(755,root,root) %{_bindir}/rrd*
+%doc CHANGES CONTRIBUTORS NEWS THREADS TODO
 %attr(755,root,root) %{_libdir}/librrd.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/librrd.so.4
-%attr(755,root,root) %{_libdir}/librrd_th.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/librrd_th.so.4
+%attr(755,root,root) %ghost %{_libdir}/librrd.so.8
+%{?with_rrdcgi:%attr(755,root,root) %{_bindir}/rrdcgi}
+%attr(755,root,root) %{_bindir}/rrdcreate
+%attr(755,root,root) %{_bindir}/rrdinfo
+%attr(755,root,root) %{_bindir}/rrdtool
+%attr(755,root,root) %{_bindir}/rrdupdate
 %{_mandir}/man1/bin_dec_hex.1*
 %{_mandir}/man1/cdeftutorial.1*
 %{_mandir}/man1/rpntutorial.1*
-%{_mandir}/man1/rrd*.1*
+%{_mandir}/man1/rrd-beginners.1*
+%{_mandir}/man1/rrdbuild.1*
+%{?with_rrdcgi:%{_mandir}/man1/rrdcgi.1*}
+%{_mandir}/man1/rrdcreate.1*
+%{_mandir}/man1/rrddump.1*
+%{_mandir}/man1/rrdfetch.1*
+%{_mandir}/man1/rrdfirst.1*
+%{_mandir}/man1/rrdgraph*.1*
+%{_mandir}/man1/rrdinfo.1*
+%{_mandir}/man1/rrdlast.1*
+%{_mandir}/man1/rrdlastupdate.1*
+%{_mandir}/man1/rrdlist.1*
+%{?with_ceph:%{_mandir}/man1/rrdrados.1*}
+%{_mandir}/man1/rrdresize.1*
+%{_mandir}/man1/rrdrestore.1*
+%{_mandir}/man1/rrdthreads.1*
+%{_mandir}/man1/rrdtool.1*
+%{_mandir}/man1/rrdtune.1*
+%{_mandir}/man1/rrdtutorial.1*
+%{_mandir}/man1/rrdupdate.1*
+%{_mandir}/man1/rrdxport.1*
+
+%files cached
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/rrdcached
+%{_mandir}/man1/rrdcached.1*
+%{_mandir}/man1/rrdflushcached.1*
+%{systemdunitdir}/rrdcached.service
+%{systemdunitdir}/rrdcached.socket
 
 %files devel
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/librrd.so
-%attr(755,root,root) %{_libdir}/librrd_th.so
-%{_libdir}/librrd_th.la
 %{_includedir}/rrd*.h
 %{_pkgconfigdir}/librrd.pc
-%{_examplesdir}/%{name}-%{version}
 %{_mandir}/man3/librrd.3*
 
 %files static
 %defattr(644,root,root,755)
 %{_libdir}/librrd.a
-%{_libdir}/librrd_th.a
 
+%files doc
+%defattr(644,root,root,755)
+%doc docs/html docs/txt
+%{_examplesdir}/%{name}-%{version}
+
+%if %{with lua}
 %files -n lua-rrdtool
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/lua/5.1/rrd.so*
+%{_mandir}/man1/rrdlua.1*
+%endif
 
+%if %{with perl}
 %files -n perl-rrdtool
 %defattr(644,root,root,755)
+%doc perl-docs/html/*
 %{perl_vendorlib}/RRDp.pm
 %{perl_vendorarch}/RRDs.pm
 %dir %{perl_vendorarch}/auto/RRDs
 %attr(755,root,root) %{perl_vendorarch}/auto/RRDs/RRDs.so
 %{_mandir}/man3/RRDp.3*
 %{_mandir}/man3/RRDs.3*
+%endif
 
 %if %{with python}
 %files -n python-rrdtool
 %defattr(644,root,root,755)
-%attr(755,root,root) %{py_sitedir}/rrdtoolmodule.so
+%attr(755,root,root) %{py_sitedir}/rrdtool.so
 %if "%{py_ver}" > "2.4"
-%{py_sitedir}/py_rrdtool-*.egg-info
+%{py_sitedir}/rrdtool-*.egg-info
 %endif
 %endif
 
This page took 0.045293 seconds and 4 git commands to generate.