X-Git-Url: https://git.octo.it/?p=rrdtool.git;a=blobdiff_plain;f=rrdtool.spec;h=8df98fa921097b581ad4c41f5685dab73d09013d;hp=36f663802cc98fcfdb4f3289591d81bcd751f9ea;hb=b375d439fffdc6985be67b9ca6cdf4d072c704b1;hpb=36ac3705aa8c1799e4597aa13a9545041ca08174 diff --git a/rrdtool.spec b/rrdtool.spec index 36f6638..8df98fa 100644 --- a/rrdtool.spec +++ b/rrdtool.spec @@ -9,20 +9,22 @@ Summary: Round Robin Database Tool to store and display time-series data Name: rrdtool -Version: 1.3 +Version: 1.3.99908093000 Release: 0.20%{?pre:.%{pre}}%{?dist} License: GPLv2+ with exceptions Group: Applications/Databases URL: http://oss.oetiker.ch/rrdtool/ #Source0: http://oss.oetiker.ch/%{name}/pub/%{name}-%{version}.tar.gz -Source0: http://oss.oetiker.ch/rrdtool/pub/beta/%{name}-%{version}%{pre}.tar.gz +Source0: http://oss.oetiker.ch/rrdtool/pub/beta/%{name}-%{version}.tar.gz +%if %{with_php} Source1: php4-%{svnrev}.tar.gz Patch1: rrdtool-1.3.0-beta4-fix-rrd_update-in-php-bindings.patch +%endif BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: dejavu-lgc-fonts BuildRequires: gcc-c++, openssl-devel, freetype-devel BuildRequires: libpng-devel, zlib-devel, intltool >= 0.35.0 -BuildRequires: cairo-devel >= 1.4.6, pango-devel >= 1.17 +BuildRequires: cairo-devel >= 1.2, pango-devel >= 1.14 BuildRequires: libtool, groff BuildRequires: gettext, libxml2-devel %if 0%{?fedora} >= 7 @@ -142,9 +144,11 @@ The %{name}-ruby package includes RRDtool bindings for Ruby. %endif %prep -%setup -q -n %{name}-%{version}%{pre} %{?with_php: -a 1} %if %{with_php} +%setup -q -n %{name}-%{version} -a 1 %patch1 -p1 +%else +%setup -q -n %{name}-%{version} %endif # Fix to find correct python dir on lib64 @@ -153,8 +157,10 @@ The %{name}-ruby package includes RRDtool bindings for Ruby. # Most edits shouldn't be necessary when using --libdir, but # w/o, some introduce hardcoded rpaths where they shouldn't -%{__perl} -pi.orig -e 's|/lib\b|/%{_lib}|g' \ - configure Makefile.in php4/configure php4/ltconfig* +%{__perl} -pi.orig -e 's|/lib\b|/%{_lib}|g' configure Makefile.in* +%if %{with_php} +%{__perl} -pi.orig -e 's|/lib\b|/%{_lib}|g' php4/configure php4/ltconfig* +%endif # Perl 5.10 seems to not like long version strings, hack around it %{__perl} -pi.orig -e 's|1.299907080300|1.29990708|' \ @@ -163,10 +169,14 @@ The %{name}-ruby package includes RRDtool bindings for Ruby. # # fix config files for php4 bindings # workaround needed due to https://bugzilla.redhat.com/show_bug.cgi?id=211069 +%if %{with_php} cp -p /usr/lib/rpm/config.{guess,sub} php4/ +%endif + %build %configure \ + CFLAGS="-g -O0" \ --with-perl-options='INSTALLDIRS="vendor"' \ %if %{with_tcl} --enable-tcl-site \ @@ -265,12 +275,27 @@ find examples/ -type f -exec chmod 0644 {} \; $RPM_BUILD_ROOT%{_datadir}/%{name}/examples \ $RPM_BUILD_ROOT%{perl_vendorarch}/auto/*/{.packlist,*.bs} +# Set up rrdcached +%__install -d -m 0755 $RPM_BUILD_ROOT/%{_sysconfdir}/default +%__install -d -m 0755 $RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d +%__install -m 0644 etc/rrdcached-default $RPM_BUILD_ROOT/%{_sysconfdir}/default/rrdcached +%__install -m 0755 etc/rrdcached-init $RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d/rrdcached +%__install -d -m 0755 -o nobody -g nobody $RPM_BUILD_ROOT/%{_localstatedir}/run/rrdcached + %clean %{__rm} -rf $RPM_BUILD_ROOT -%post -p /sbin/ldconfig +%post +/sbin/ldconfig +/sbin/chkconfig --add rrdcached +/sbin/service rrdcached start + +%preun +/sbin/service rrdcached stop -%postun -p /sbin/ldconfig +%postun +/sbin/chkconfig --del rrdcached +/sbin/ldconfig %files %defattr(-,root,root,-) @@ -278,6 +303,9 @@ find examples/ -type f -exec chmod 0644 {} \; %{_libdir}/*.so.* %{_datadir}/%{name} %{_mandir}/man1/* +%config %{_sysconfdir}/default/* +%config %{_sysconfdir}/rc.d/init.d/* +%attr(0775 nobody nobody) %dir %{_localstatedir}/run/rrdcached %files devel %defattr(-,root,root,-)