- Conditionalize python, php and tcl bits (Resolves #203275)
This commit is contained in:
parent
eeb4076b1d
commit
2a0aeeeaef
53
rrdtool.spec
53
rrdtool.spec
@ -1,10 +1,13 @@
|
|||||||
|
%define with_python %{?_without_python: 0} %{?!_without_python: 1}
|
||||||
|
%define with_php %{?_without_php: 0} %{?!_without_php: 1}
|
||||||
|
%define with_tcl %{?_without_tcl: 0} %{?!_without_tcl: 1}
|
||||||
%define php_rrd_svn 839
|
%define php_rrd_svn 839
|
||||||
%define php_extdir %(php-config --extension-dir 2>/dev/null || echo %{_libdir}/php4)
|
%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
|
Summary: Round Robin Database Tool to store and display time-series data
|
||||||
Name: rrdtool
|
Name: rrdtool
|
||||||
Version: 1.2.15
|
Version: 1.2.15
|
||||||
Release: 5%{?dist}
|
Release: 6%{?dist}
|
||||||
License: GPL
|
License: GPL
|
||||||
Group: Applications/Databases
|
Group: Applications/Databases
|
||||||
URL: http://people.ee.ethz.ch/~oetiker/webtools/%{name}/
|
URL: http://people.ee.ethz.ch/~oetiker/webtools/%{name}/
|
||||||
@ -13,13 +16,8 @@ Source1: php4-svn%{php_rrd_svn}.tar.gz
|
|||||||
Patch0: rrdtool-1.2.13-php.patch
|
Patch0: rrdtool-1.2.13-php.patch
|
||||||
Patch1: rrdtool-1.2.15-initrrdtool.patch
|
Patch1: rrdtool-1.2.15-initrrdtool.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
BuildRequires: gcc-c++, openssl-devel
|
BuildRequires: gcc-c++, openssl-devel, freetype-devel
|
||||||
BuildRequires: libpng-devel, zlib-devel, libart_lgpl-devel >= 2.0
|
BuildRequires: libpng-devel, zlib-devel, libart_lgpl-devel >= 2.0
|
||||||
BuildRequires: freetype-devel, python-devel >= 2.3
|
|
||||||
|
|
||||||
%{!?python_sitearch: %define python_sitearch %(%{__python} -c 'from distutils import sysconfig; print sysconfig.get_python_lib(1)')}
|
|
||||||
# eval to 2.3 if python isn't yet present, workaround for no python in fc4 minimal buildroot
|
|
||||||
%{!?python_version: %define python_version %(%{__python} -c 'import sys; print sys.version.split(" ")[0]' || echo "2.3")}
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
RRD is the Acronym for Round Robin Database. RRD is a system to store and
|
RRD is the Acronym for Round Robin Database. RRD is a system to store and
|
||||||
@ -60,18 +58,24 @@ Provides: perl-%{name} = %{version}-%{release}
|
|||||||
%description perl
|
%description perl
|
||||||
The Perl RRDtool bindings
|
The Perl RRDtool bindings
|
||||||
|
|
||||||
|
%if %{with_python}
|
||||||
%package python
|
%package python
|
||||||
Summary: Python RRDtool bindings
|
Summary: Python RRDtool bindings
|
||||||
Group: Development/Languages
|
Group: Development/Languages
|
||||||
BuildRequires: python
|
BuildRequires: python-devel >= 2.3
|
||||||
Requires: python >= %{python_version}
|
Requires: python >= %{python_version}
|
||||||
Requires: %{name} = %{version}-%{release}
|
Requires: %{name} = %{version}-%{release}
|
||||||
Obsoletes: python-%{name} < %{version}-%{release}
|
Obsoletes: python-%{name} < %{version}-%{release}
|
||||||
Provides: python-%{name} = %{version}-%{release}
|
Provides: python-%{name} = %{version}-%{release}
|
||||||
|
%{!?python_sitearch: %define python_sitearch %(%{__python} -c 'from distutils import sysconfig; print sysconfig.get_python_lib(1)')}
|
||||||
|
# eval to 2.3 if python isn't yet present, workaround for no python in fc4 minimal buildroot
|
||||||
|
%{!?python_version: %define python_version %(%{__python} -c 'import sys; print sys.version.split(" ")[0]' || echo "2.3")}
|
||||||
|
|
||||||
%description python
|
%description python
|
||||||
Python RRDtool bindings.
|
Python RRDtool bindings.
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with_php}
|
||||||
%package php
|
%package php
|
||||||
Summary: PHP RRDtool bindings
|
Summary: PHP RRDtool bindings
|
||||||
Group: Development/Languages
|
Group: Development/Languages
|
||||||
@ -84,7 +88,9 @@ Provides: php-%{name} = %{version}-%{release}
|
|||||||
%description php
|
%description php
|
||||||
The %{name}-php package includes a dynamic shared object (DSO) that adds
|
The %{name}-php package includes a dynamic shared object (DSO) that adds
|
||||||
RRDtool bindings to the PHP HTML-embedded scripting language.
|
RRDtool bindings to the PHP HTML-embedded scripting language.
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with_tcl}
|
||||||
%package tcl
|
%package tcl
|
||||||
Summary: Tcl RRDtool bindings
|
Summary: Tcl RRDtool bindings
|
||||||
Group: Development/Languages
|
Group: Development/Languages
|
||||||
@ -96,12 +102,15 @@ Provides: tcl-%{name} = %{version}-%{release}
|
|||||||
|
|
||||||
%description tcl
|
%description tcl
|
||||||
The %{name}-tcl package includes RRDtool bindings for Tcl.
|
The %{name}-tcl package includes RRDtool bindings for Tcl.
|
||||||
|
%endif
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%setup -q -T -D -a 1
|
%setup -q -T -D -a 1
|
||||||
# Patch based on http://oss.oetiker.ch/rrdtool/pub/contrib/php_rrdtool.tgz
|
# Patch based on http://oss.oetiker.ch/rrdtool/pub/contrib/php_rrdtool.tgz
|
||||||
|
%if %{with_php}
|
||||||
%patch0 -p0 -b .php
|
%patch0 -p0 -b .php
|
||||||
|
%endif
|
||||||
%patch1 -p1 -b .initrrdtool
|
%patch1 -p1 -b .initrrdtool
|
||||||
|
|
||||||
# Fix to find correct python dir on lib64
|
# Fix to find correct python dir on lib64
|
||||||
@ -115,11 +124,20 @@ The %{name}-tcl package includes RRDtool bindings for Tcl.
|
|||||||
|
|
||||||
%build
|
%build
|
||||||
%configure \
|
%configure \
|
||||||
--disable-static \
|
--with-perl-options='INSTALLDIRS="vendor"' \
|
||||||
--with-pic \
|
%if %{with_tcl}
|
||||||
--enable-tcl-site \
|
--enable-tcl-site \
|
||||||
--with-tcllib=%{_libdir} \
|
--with-tcllib=%{_libdir} \
|
||||||
--with-perl-options='INSTALLDIRS="vendor"'
|
%else
|
||||||
|
--disable-tcl \
|
||||||
|
%endif
|
||||||
|
%if %{with_python}
|
||||||
|
--enable-python \
|
||||||
|
%else
|
||||||
|
--disable-python \
|
||||||
|
%endif
|
||||||
|
--disable-static \
|
||||||
|
--with-pic
|
||||||
|
|
||||||
# Fix another rpath issue
|
# Fix another rpath issue
|
||||||
%{__perl} -pi.orig -e 's|-Wl,--rpath -Wl,\$rp||g' \
|
%{__perl} -pi.orig -e 's|-Wl,--rpath -Wl,\$rp||g' \
|
||||||
@ -135,6 +153,7 @@ popd
|
|||||||
%{__make} %{?_smp_mflags}
|
%{__make} %{?_smp_mflags}
|
||||||
|
|
||||||
# Build the php module, the tmp install is required
|
# Build the php module, the tmp install is required
|
||||||
|
%if %{with_php}
|
||||||
%define rrdtmp %{_tmppath}/%{name}-%{version}-tmpinstall
|
%define rrdtmp %{_tmppath}/%{name}-%{version}-tmpinstall
|
||||||
%{__make} install DESTDIR="%{rrdtmp}"
|
%{__make} install DESTDIR="%{rrdtmp}"
|
||||||
pushd php4/
|
pushd php4/
|
||||||
@ -144,6 +163,7 @@ pushd php4/
|
|||||||
%{__make} %{?_smp_mflags}
|
%{__make} %{?_smp_mflags}
|
||||||
popd
|
popd
|
||||||
%{__rm} -rf %{rrdtmp}
|
%{__rm} -rf %{rrdtmp}
|
||||||
|
%endif
|
||||||
|
|
||||||
# Fix @perl@ and @PERL@
|
# Fix @perl@ and @PERL@
|
||||||
find examples/ -type f \
|
find examples/ -type f \
|
||||||
@ -156,6 +176,7 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
make DESTDIR="$RPM_BUILD_ROOT" install
|
make DESTDIR="$RPM_BUILD_ROOT" install
|
||||||
|
|
||||||
# Install the php module
|
# Install the php module
|
||||||
|
%if %{with_php}
|
||||||
%{__install} -D -m0755 php4/modules/rrdtool.so \
|
%{__install} -D -m0755 php4/modules/rrdtool.so \
|
||||||
%{buildroot}%{php_extdir}/rrdtool.so
|
%{buildroot}%{php_extdir}/rrdtool.so
|
||||||
# Clean up the examples for inclusion as docs
|
# Clean up the examples for inclusion as docs
|
||||||
@ -166,6 +187,7 @@ make DESTDIR="$RPM_BUILD_ROOT" install
|
|||||||
; Enable rrdtool extension module
|
; Enable rrdtool extension module
|
||||||
extension=rrdtool.so
|
extension=rrdtool.so
|
||||||
__EOF__
|
__EOF__
|
||||||
|
%endif
|
||||||
|
|
||||||
# Pesky RRDp.pm...
|
# Pesky RRDp.pm...
|
||||||
%{__mv} $RPM_BUILD_ROOT%{perl_vendorarch}/../RRDp.pm $RPM_BUILD_ROOT%{perl_vendorarch}/
|
%{__mv} $RPM_BUILD_ROOT%{perl_vendorarch}/../RRDp.pm $RPM_BUILD_ROOT%{perl_vendorarch}/
|
||||||
@ -224,24 +246,33 @@ find examples/ -type f -exec chmod 0644 {} \;
|
|||||||
%{perl_vendorarch}/*.pm
|
%{perl_vendorarch}/*.pm
|
||||||
%attr(0755,root,root) %{perl_vendorarch}/auto/RRDs/
|
%attr(0755,root,root) %{perl_vendorarch}/auto/RRDs/
|
||||||
|
|
||||||
|
%if %{with_python}
|
||||||
%files python
|
%files python
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc bindings/python/AUTHORS bindings/python/COPYING bindings/python/README
|
%doc bindings/python/AUTHORS bindings/python/COPYING bindings/python/README
|
||||||
%{python_sitearch}/rrdtoolmodule.so
|
%{python_sitearch}/rrdtoolmodule.so
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with_php}
|
||||||
%files php
|
%files php
|
||||||
%defattr(-,root,root,0755)
|
%defattr(-,root,root,0755)
|
||||||
%doc php4/examples php4/README
|
%doc php4/examples php4/README
|
||||||
%config(noreplace) %{_sysconfdir}/php.d/rrdtool.ini
|
%config(noreplace) %{_sysconfdir}/php.d/rrdtool.ini
|
||||||
%{php_extdir}/rrdtool.so
|
%{php_extdir}/rrdtool.so
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with_tcl}
|
||||||
%files tcl
|
%files tcl
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc bindings/tcl/README
|
%doc bindings/tcl/README
|
||||||
%{_libdir}/tclrrd*.so
|
%{_libdir}/tclrrd*.so
|
||||||
%{_libdir}/rrdtool/*.tcl
|
%{_libdir}/rrdtool/*.tcl
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Nov 14 2006 Jarod Wilson <jwilson@redhat.com> 1.2.15-6
|
||||||
|
- Conditionalize python, php and tcl bits (Resolves #203275)
|
||||||
|
|
||||||
* Wed Oct 25 2006 Jarod Wilson <jwilson@redhat.com> 1.2.15-5
|
* Wed Oct 25 2006 Jarod Wilson <jwilson@redhat.com> 1.2.15-5
|
||||||
- Add tcl sub-package (#203275)
|
- Add tcl sub-package (#203275)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user