From 7dcd1231c4433c3fcafc72627c926818eb0f272f Mon Sep 17 00:00:00 2001 From: Jarod Wilson Date: Sat, 3 Jun 2006 21:26:59 +0000 Subject: [PATCH] - Update to release 1.2.13 - Merge spec changes from dag, atrpms and mdk builds - Additional hacktastic contortions for lib64 & rpath messiness - Add missing post/postun ldconfig - Fix a bunch of rpmlint errors - Disable static libs, per FE guidelines - Split off docs --- rrdtool.spec | 141 ++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 110 insertions(+), 31 deletions(-) diff --git a/rrdtool.spec b/rrdtool.spec index 557198c..bac704f 100644 --- a/rrdtool.spec +++ b/rrdtool.spec @@ -1,17 +1,18 @@ Summary: Round Robin Database Tool to store and display time-series data Name: rrdtool -Version: 1.2.12 +Version: 1.2.13 Release: 1%{?dist} License: GPL Group: Applications/Databases -URL: http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/ -Source: http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/rrdtool-1.0.x/rrdtool-%{version}.tar.gz +URL: http://people.ee.ethz.ch/~oetiker/webtools/%{name}/ +Source: http://people.ee.ethz.ch/~oetiker/webtools/%{name}/pub/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root -BuildRequires: gcc-c++ openssl-devel -BuildRequires: libpng-devel, zlib-devel, libart_lgpl-devel -BuildRequires: freetype-devel, python-devel +BuildRequires: gcc-c++, openssl-devel +BuildRequires: libpng-devel, zlib-devel, libart_lgpl-devel >= 2.0 +BuildRequires: freetype-devel, python-devel >= 2.3 -%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} +%{!?python_sitearch: %define python_sitearch %(%{__python} -c 'from distutils import sysconfig; print sysconfig.get_python_lib(1)')} +%{!?python_version: %define python_version %(%{__python} -c 'import sys; print sys.version.split(" ")[0]')} %description RRD is the Acronym for Round Robin Database. RRD is a system to store and @@ -23,7 +24,7 @@ scripts (from shell or Perl) or via frontends that poll network devices and put a friendly user interface on it. %package devel -Summary: RRDtool static libraries and header files +Summary: RRDtool libraries and header files Group: Development/Libraries Requires: %{name} = %{version} @@ -32,20 +33,68 @@ 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 allow you to use directly this library. +%package doc +Summary: RRDtool documentation +Group: Documentation + +%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. + +%package -n perl-%{name} +Summary: Perl RRDtool bindings +Group: Development/Languages +Requires: %{name} = %{version} +Obsoletes: %{name}-perl <= %{version} +Provides: %{name}-perl = %{version} +Requires: perl >= %(rpm -q --qf '%%{epoch}:%%{version}' perl) + +%description -n perl-%{name} +The Perl RRDtool bindings + +%package -n python-%{name} +Summary: Python RRDtool bindings +Group: Development/Languages +BuildRequires: python +Requires: python >= %{python_version} +Requires: %{name} = %{version} + +%description -n python-%{name} +Python RRDtool bindings. + %prep %setup -# Fixes to /usr/lib(64) for x86_64 +# Fix to find correct python dir on lib64 +%{__perl} -pi -e 's|get_python_lib\(0,0,prefix|get_python_lib\(1,0,prefix|g' \ + configure + +# Shouldn't be necessary when using --libdir, but +# introduces hardcoded rpaths where it shouldn't, +# if not done... %{__perl} -pi.orig -e 's|/lib\b|/%{_lib}|g' \ configure Makefile.in %build %configure \ --program-prefix="%{?_program_prefix}" \ - --enable-shared \ + --libdir=%{_libdir} \ + --disable-static \ --with-pic \ - --enable-perl-site-install \ --with-perl-options='INSTALLDIRS="vendor"' + +# Fix another rpath issue +%{__perl} -pi.orig -e 's|-Wl,--rpath -Wl,\$rp||g' \ + bindings/perl-shared/Makefile.PL + +# Force RRDp bits where we want 'em, not sure yet why the +# --with-perl-options and --libdir don't take +pushd bindings/perl-piped/ +%{__perl} Makefile.PL INSTALLDIRS=vendor +%{__perl} -pi.orig -e 's|/lib/perl|/%{_lib}/perl|g' Makefile +popd + %{__make} %{?_smp_mflags} # Fix @perl@ and @PERL@ @@ -54,51 +103,81 @@ find examples/ -type f \ find examples/ -name "*.pl" \ -exec %{__perl} -pi -e 's|\015||gi' {} \; - %install rm -rf $RPM_BUILD_ROOT make DESTDIR="$RPM_BUILD_ROOT" install -# We only want .txt and .html files for the main documentation -%{__mkdir_p} doc2/doc -%{__cp} -a doc/*.txt doc/*.html doc2/doc/ +# Pesky RRDp.pm... +%{__mv} $RPM_BUILD_ROOT%{perl_vendorarch}/../RRDp.pm $RPM_BUILD_ROOT%{perl_vendorarch}/ -# Clean up the examples and contrib +# We only want .txt and .html files for the main documentation +%{__mkdir_p} doc2/html doc2/txt +%{__cp} -a doc/*.txt doc2/txt/ +%{__cp} -a doc/*.html doc2/html/ + +# Put perl docs in perl package +%{__mkdir_p} doc3/html +%{__mv} doc2/html/RRD*.html doc3/html/ + +# Clean up the examples %{__rm} -f examples/Makefile* examples/*.in # This is so rpm doesn't pick up perl module dependencies automatically find examples/ -type f -exec chmod 0644 {} \; # Clean up the buildroot -%{__rm} -rf %{buildroot}%{_prefix}/{doc,examples,html}/ \ - %{buildroot}%{perl_vendorarch}/ntmake.pl \ - %{buildroot}%{perl_archlib}/perllocal.pod \ +%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/doc/%{name}-%{version}/{txt,html}/ \ + $RPM_BUILD_ROOT%{perl_vendorarch}/ntmake.pl \ + $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod \ + $RPM_BUILD_ROOT%{_datadir}/%{name}/examples \ + $RPM_BUILD_ROOT%{perl_vendorarch}/auto/*/{.packlist,*.bs} %clean -%{__rm} -rf %{buildroot} +%{__rm} -rf $RPM_BUILD_ROOT + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig %files -%defattr(-, root, root, 0755) -%doc CHANGES CONTRIBUTORS COPYING COPYRIGHT README TODO NEWS THREADS doc2/doc %{_bindir}/* %{_libdir}/*.so.* -%{_datadir}/rrdtool/ -%{perl_vendorlib}/*.pm -%{perl_vendorarch}/*.pm -%{perl_vendorarch}/auto/* -%{python_sitelib}/rrdtoolmodule.so +%{_datadir}/%{name}/fonts/* %{_mandir}/man1/* -%{_mandir}/man3/* %files devel -%defattr(-, root, root, 0755) -%doc examples/ +%defattr(-,root,root,-) %{_includedir}/*.h -%{_libdir}/*.a %exclude %{_libdir}/*.la %{_libdir}/*.so +%files doc +%defattr(-,root,root,-) +%doc CHANGES CONTRIBUTORS COPYING COPYRIGHT README TODO NEWS THREADS doc2/html doc2/txt +%doc examples + +%files -n perl-%{name} +%defattr(-,root,root,-) +%doc doc3/html +%{_mandir}/man3/* +%{perl_vendorarch}/*.pm +%attr(0755,root,root) %{perl_vendorarch}/auto/RRDs/* + +%files -n python-%{name} +%defattr(-,root,root,-) +%doc bindings/python/AUTHORS bindings/python/COPYING bindings/python/README +%{python_sitearch}/rrdtoolmodule.so + %changelog +* Sat Jun 03 2006 Jarod Wilson 1.2.13-1 +- Update to release 1.2.13 +- Merge spec changes from dag, atrpms and mdk builds +- Additional hacktastic contortions for lib64 & rpath messiness +- Add missing post/postun ldconfig +- Fix a bunch of rpmlint errors +- Disable static libs, per FE guidelines +- Split off docs + * Wed Apr 19 2006 Chris Ricker 1.2.12-1 - Rev to 1.2