X-Git-Url: https://git.tld-linux.org/?p=packages%2Frrdtool.git;a=blobdiff_plain;f=rrdtool.spec;h=caeb8c89544948b4a1727ab50077d634e9c83b0d;hp=64c31fb5db63ad7c9ffc2fc0ac2cc9cd352ba274;hb=HEAD;hpb=542b0495c32e4ace9e395e34e9d8831ae91fddc8 diff --git a/rrdtool.spec b/rrdtool.spec index 64c31fb..03526dc 100644 --- a/rrdtool.spec +++ b/rrdtool.spec @@ -7,7 +7,7 @@ %bcond_without python # Python binding %bcond_without ruby # Ruby binding %bcond_without tcl # Tcl binding -%bcond_without ceph # Ceph (RADOS) storage support +%bcond_with 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) @@ -21,22 +21,22 @@ %endif %define pdir RRDp -%include /usr/lib/rpm/macros.perl Summary: RRDtool - round robin database Summary(pl.UTF-8): RRDtool - baza danych typu round-robin Summary(pt_BR.UTF-8): Round Robin Database, uma ferramenta para construção de gráficos Summary(ru.UTF-8): RRDtool - база данных с "циклическим обновлением" Summary(uk.UTF-8): RRDtool - це система зберігання та показу серійних даних Name: rrdtool -Version: 1.7.2 -Release: 1 +Version: 1.8.0 +Release: 3 License: GPL v2+ + FLOSS exception Group: Applications/Databases -Source0: https://oss.oetiker.ch/rrdtool/pub/%{name}-%{version}.tar.gz -# Source0-md5: 638e3a0a1609d97e9f82e8832759dcd2 +Source0: https://github.com/oetiker/rrdtool-1.x/releases/download/v%{version}/%{name}-%{version}.tar.gz +# Source0-md5: 852754364cbd0703a099b5eb32932851 +Source1: rrdcached.init +Source2: rrdcached.sysconfig Patch0: %{name}-tcl-path.patch -Patch1: %{name}-missing.patch -Patch2: groff.patch +Patch1: groff.patch URL: http://oss.oetiker.ch/rrdtool/ BuildRequires: autoconf >= 2.60 BuildRequires: automake @@ -50,32 +50,37 @@ BuildRequires: libwrap-devel BuildRequires: libxml2-devel >= 1:2.7.8 BuildRequires: pkgconfig BuildRequires: rpm-pythonprov -BuildRequires: rpmbuild(macros) >= 1.272 +BuildRequires: rpmbuild(macros) >= 1.745 %if %{with rrd_graph} -BuildRequires: cairo-devel >= 1.10.2 -BuildRequires: libpng-devel +BuildRequires: glib2-devel >= 1:2.58.1 +BuildRequires: libpng-devel >= 2:1.4.8 BuildRequires: pango-devel >= 1:1.28.7 %endif %if %{with lua} -BuildRequires: lua51 >= 5.1 -BuildRequires: lua51-devel >= 5.1 +BuildRequires: lua >= 5.1 +BuildRequires: lua-devel >= 5.1 %endif %if %{with perl} BuildRequires: perl-devel >= 1:5.8.0 BuildRequires: rpm-perlprov %endif %if %{with python} -BuildRequires: python >= 1:2.3 -BuildRequires: python-devel >= 1:2.3 +BuildRequires: python3 +BuildRequires: python3-devel %endif %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} +%if %{with rrd_graph} +Requires: glib2 >= 1:2.58.1 +%else Requires: glib2 >= 1:2.28.7 +%endif +%{?with_rrd_graph:Requires: libpng >= 2:1.4.8} Requires: libxml2 >= 1:2.7.8 %{?with_rrd_graph:Requires: pango >= 1:1.28.7} Suggests: fonts-TTF-DejaVu @@ -150,8 +155,11 @@ Summary(ru.UTF-8): RRDtool - Заголовки, необходимые для Summary(uk.UTF-8): RRDtool - бібліотечні лінки та файли хедерів Group: Development/Libraries Requires: %{name} = %{version}-%{release} -%{?with_rrd_graph:Requires: cairo-devel >= 1.10.2} +%if %{with rrd_graph} +Requires: glib2-devel >= 1:2.58.1 +%else Requires: glib2-devel >= 1:2.28.7 +%endif Requires: libdbi-devel Requires: libwrap-devel Requires: libxml2-devel >= 1:2.7.8 @@ -217,10 +225,7 @@ RRD - соращение для "Round Robin Database" (база данных с 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 @@ -241,7 +246,7 @@ Summary: RRD module for Lua Summary(pl.UTF-8): Moduł RRD dla języka Lua Group: Development/Languages Requires: %{name} = %{version}-%{release} -Requires: lua51 +Requires: lua %description -n lua-rrdtool Lua interface to RRDtool. @@ -264,24 +269,25 @@ Moduły Perla pozwalające na dostęp do RRDtoola: RRDs do dostępu do RRDtoola jako modułu dzielonego oraz RRDp do dostępu poprzez zestaw potoków. -%package -n python-rrdtool -Summary: Python interface to RRDtool +%package -n python3-rrdtool +Summary: Python 3 interface to RRDtool Summary(pl.UTF-8): Pythonowy interfejs do RRDtoola Group: Development/Languages/Python Requires: %{name} = %{version}-%{release} -Requires: python-libs +Requires: python3-libs +Obsoletes: python-rrdtool -%description -n python-rrdtool -Python interface to RRDtool, the graphing and logging utility. +%description -n python3-rrdtool +Python 3 interface to RRDtool, the graphing and logging utility. -%description -n python-rrdtool -l pl.UTF-8 -Interfejs Pythona do RRDtoola - narzędzia do tworzenia wykresów i +%description -n python3-rrdtool -l pl.UTF-8 +Interfejs Pythona 3 do RRDtoola - narzędzia do tworzenia wykresów i logowania. %package -n ruby-rrdtool Summary: Ruby interface to RRDtool Summary(pl.UTF-8): Interfejs języka Ruby do RRDtoola -Group: Development/Languages/Python +Group: Development/Languages/Ruby Requires: %{name} = %{version}-%{release} %description -n ruby-rrdtool @@ -308,19 +314,24 @@ Rozszerzenie Tcl-a pozwalające na dostęp do biblioteki Tcl. %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|$),#!%{__python3}\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 +%{__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 +%{__mv} docs/html/RRD*.html perl-docs/html %build %{__libtoolize} @@ -329,7 +340,7 @@ mv docs/html/RRD*.html perl-docs/html %{__autoheader} %{__automake} %configure \ - LUA=/usr/bin/lua5.1 \ + PYTHON=%{__python3} \ --disable-silent-rules \ %{!?with_ceph:--disable-librados} \ %{!?with_rrd_graph:--disable-rrd_graph} \ @@ -344,25 +355,27 @@ mv docs/html/RRD*.html perl-docs/html # empty RUBY_MAKE_OPTIONS as workaround for some make weirdness # (tried to install without DESTDIR on plain make) %{__make} \ - RUBY_MAKE_OPTIONS= \ - LUA_CFLAGS=-I/usr/include/lua51 + RUBY_MAKE_OPTIONS= %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} +install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig},%{_examplesdir}/%{name}-%{version}} %{__make} install \ DESTDIR=$RPM_BUILD_ROOT \ perl_sitearch=%{perl_vendorarch} \ - pythondir=%{py_sitedir} \ + pythondir=%{py3_sitedir} \ examplesdir=%{_examplesdir}/%{name}-%{version} \ RUBYARCHDIR=$RPM_BUILD_ROOT%{ruby_archdir} +install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/rrdcached +install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/rrdcached + %{__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} +%{__rm} $RPM_BUILD_ROOT%{_libdir}/lua/5.*/*.{la,a} %endif %if %{with perl} @@ -375,9 +388,29 @@ rm -rf $RPM_BUILD_ROOT %post -p /sbin/ldconfig %postun -p /sbin/ldconfig +%pre cached +%groupadd -g 347 rrdcached +%useradd -u 347 -d /usr/share/empty -g rrdcached -c "rrdcached daemon user" rrdcached + +%post cached +/sbin/chkconfig --add rrdcached +%service rrdcached restart + +%postun cached +if [ "$1" = "0" ]; then + %userremove rrdcached + %groupremove rrdcached +fi + +%preun cached +if [ "$1" = "0" ]; then + %service rrdcached stop + /sbin/chkconfig --del rrdcached +fi + %files %defattr(644,root,root,755) -%doc CHANGES CONTRIBUTORS NEWS THREADS TODO +%doc CHANGES CONTRIBUTORS COPYRIGHT NEWS THREADS TODO %attr(755,root,root) %{_libdir}/librrd.so.*.*.* %attr(755,root,root) %ghost %{_libdir}/librrd.so.8 %{?with_rrdcgi:%attr(755,root,root) %{_bindir}/rrdcgi} @@ -402,8 +435,10 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man1/rrdlastupdate.1* %{_mandir}/man1/rrdlist.1* %{?with_ceph:%{_mandir}/man1/rrdrados.1*} +%{?with_python:%{_mandir}/man1/rrdpython.1*} %{_mandir}/man1/rrdresize.1* %{_mandir}/man1/rrdrestore.1* +%{?with_ruby:%{_mandir}/man1/rrdruby.1*} %{_mandir}/man1/rrdthreads.1* %{_mandir}/man1/rrdtool.1* %{_mandir}/man1/rrdtune.1* @@ -414,12 +449,16 @@ rm -rf $RPM_BUILD_ROOT %files cached %defattr(644,root,root,755) %attr(755,root,root) %{_bindir}/rrdcached +%attr(754,root,root) /etc/rc.d/init.d/rrdcached +%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rrdcached %{_mandir}/man1/rrdcached.1* %{_mandir}/man1/rrdflushcached.1* %files devel %defattr(644,root,root,755) %attr(755,root,root) %{_libdir}/librrd.so +%attr(754,root,root) /etc/rc.d/init.d/rrdcached +%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rrdcached %{_includedir}/rrd*.h %{_pkgconfigdir}/librrd.pc %{_mandir}/man3/librrd.3* @@ -436,7 +475,7 @@ rm -rf $RPM_BUILD_ROOT %if %{with lua} %files -n lua-rrdtool %defattr(644,root,root,755) -%attr(755,root,root) %{_libdir}/lua/5.1/rrd.so* +%attr(755,root,root) %{_libdir}/lua/5.*/rrd.so* %{_mandir}/man1/rrdlua.1* %endif @@ -453,12 +492,10 @@ rm -rf $RPM_BUILD_ROOT %endif %if %{with python} -%files -n python-rrdtool +%files -n python3-rrdtool %defattr(644,root,root,755) -%attr(755,root,root) %{py_sitedir}/rrdtool.so -%if "%{py_ver}" > "2.4" -%{py_sitedir}/rrdtool-*.egg-info -%endif +%attr(755,root,root) %{py3_sitedir}/rrdtool*.so +%{py3_sitedir}/rrdtool-*.egg-info %endif %if %{with ruby}