Return of the php-rrdtool sub-package...

This commit is contained in:
Jarod Wilson 2006-06-08 03:20:59 +00:00
parent 2354c7e25b
commit 86803c24c9
4 changed files with 1158 additions and 9 deletions

View File

@ -1,2 +1,3 @@
rrdtool-1.2.12.tar.gz
rrdtool-1.2.13.tar.gz
php4-svn839.tar.gz

1095
rrdtool-1.2.13-php.patch Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,16 +1,20 @@
%define php_rrd_svn 839
%define php_extdir %(php-config --extension-dir 2>/dev/null || echo %{_libdir}/php4)
Summary: Round Robin Database Tool to store and display time-series data
Name: rrdtool
Version: 1.2.13
Release: 3%{?dist}
Release: 4%{?dist}
License: GPL
Group: Applications/Databases
URL: http://people.ee.ethz.ch/~oetiker/webtools/%{name}/
Source: http://people.ee.ethz.ch/~oetiker/webtools/%{name}/pub/%{name}-%{version}.tar.gz
Source0: http://people.ee.ethz.ch/~oetiker/webtools/%{name}/pub/%{name}-%{version}.tar.gz
Source1: php4-svn%{php_rrd_svn}.tar.gz
Patch0: rrdtool-1.2.13-php.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: gcc-c++, openssl-devel
BuildRequires: libpng-devel, zlib-devel, libart_lgpl-devel >= 2.0
BuildRequires: freetype-devel, python-devel >= 2.3
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
%{!?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]')}
@ -47,8 +51,9 @@ server load average). This package contains documentation on using RRD.
Summary: Perl RRDtool bindings
Group: Development/Languages
Requires: %{name} = %{version}-%{release}
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
Obsoletes: %{name}-perl <= %{version}
Provides: %{name}-perl = %{version}
Provides: %{name}-perl = %{version}-%{release}
%description -n perl-%{name}
The Perl RRDtool bindings
@ -63,18 +68,31 @@ Requires: %{name} = %{version}-%{release}
%description -n python-%{name}
Python RRDtool bindings.
%package -n php-%{name}
Summary: PHP RRDtool bindings
Group: Development/Languages
BuildRequires: php-devel >= 4.0
Requires: php >= 4.0
Requires: %{name} = %{version}-%{release}
%description -n php-%{name}
The php-%{name} package includes a dynamic shared object (DSO) that adds
RRDtool bindings to the PHP HTML-embedded scripting language.
%prep
%setup
%setup -q
%setup -q -T -D -a 1
# Patch based on http://oss.oetiker.ch/rrdtool/pub/contrib/php_rrdtool.tgz
%patch -p0 -b .php
# 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...
# 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
configure Makefile.in php4/configure php4/ltconfig*
%build
%configure \
@ -97,6 +115,18 @@ popd
%{__make} %{?_smp_mflags}
# Build the php module, the tmp install is required
%define rrdtmp %{_tmppath}/%{name}-%{version}-tmpinstall
%{__make} install DESTDIR="%{rrdtmp}"
pushd php4/
%configure \
--libdir=%{_libdir} \
--with-rrdtool="%{rrdtmp}%{_prefix}" \
--disable-static
%{__make} %{?_smp_mflags}
popd
%{__rm} -rf %{rrdtmp}
# Fix @perl@ and @PERL@
find examples/ -type f \
-exec %{__perl} -pi -e 's|^#! \@perl\@|#!%{__perl}|gi' {} \;
@ -107,6 +137,18 @@ find examples/ -name "*.pl" \
rm -rf $RPM_BUILD_ROOT
make DESTDIR="$RPM_BUILD_ROOT" install
# Install the php module
%{__install} -D -m0755 php4/modules/rrdtool.so \
%{buildroot}%{php_extdir}/rrdtool.so
# Clean up the examples for inclusion as docs
%{__rm} -rf php4/examples/.svn
# Put the php config bit into place
%{__mkdir_p} %{buildroot}%{_sysconfdir}/php.d
%{__cat} << __EOF__ > %{buildroot}%{_sysconfdir}/php.d/rrdtool.ini
; Enable rrdtool extension module
extension=rrdtool.so
__EOF__
# Pesky RRDp.pm...
%{__mv} $RPM_BUILD_ROOT%{perl_vendorarch}/../RRDp.pm $RPM_BUILD_ROOT%{perl_vendorarch}/
@ -140,6 +182,7 @@ find examples/ -type f -exec chmod 0644 {} \;
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%{_bindir}/*
%{_libdir}/*.so.*
%{_datadir}/%{name}/fonts/*
@ -168,7 +211,16 @@ find examples/ -type f -exec chmod 0644 {} \;
%doc bindings/python/AUTHORS bindings/python/COPYING bindings/python/README
%{python_sitearch}/rrdtoolmodule.so
%files -n php-%{name}
%defattr(-,root,root,0755)
%doc php4/examples php4/README
%config(noreplace) %{_sysconfdir}/php.d/rrdtool.ini
%{php_extdir}/rrdtool.so
%changelog
* Wed Jun 07 2006 Jarod Wilson <jwilson@redhat.com> 1.2.13-4
- Add php bits back into the mix
* Mon Jun 05 2006 Jarod Wilson <jwilson@redhat.com> 1.2.13-3
- Merge spec fixes from bz 185909

View File

@ -1,2 +1,3 @@
7b544c38a818cbebcf06fe39b9f52d0d rrdtool-1.2.12.tar.gz
d9b5b7caa28e56de82780d943f59c231 rrdtool-1.2.13.tar.gz
ca1f00dd694d22c4fdadf48df5bd54f7 php4-svn839.tar.gz