Patch1: %{name}-perl-install.patch
Patch2: %{name}-acfix.patch
Patch3: %{name}-system-libs.patch
+Patch4: %{name}-php-config.patch
URL: http://ee-staff.ethz.ch/~oetiker/webtools/rrdtol/
BuildRequires: autoconf
BuildRequires: automake
Summary: RRDtool php module
Summary(pl): Modu³ PHP RRDtool
Group: Unknown/Unknown
-Requires: %{name} = %{version}
+Requires(post,preun): php-common
+Requires: php-common
%description -n php-rrdtool
-empty
+RRDtool module for PHP.
%prep
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
+%patch4 -p0
%{__perl} -pi -e 's/--localdir=/-B /g' Makefile.am */Makefile.am
%{__autoconf}
%configure \
--with-openssl \
- --with-rrdtool="$(pwd)/../../temp-install%{_prefix}"
+ --with-rrdtool="$(pwd)/../../temp-install%{_prefix}" \
+ --includedir="%{_includedir}/php"
%{__make}
cd ../../
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
+%post -n php-rrdtool
+%{_sbindir}/php-module-install install rrdtool %{_sysconfdir}/php.ini
+
+%preun -n php-rrdtool
+if [ "$1" = "0" ]; then
+ %{_sbindir}/php-module-install remove rrdtool %{_sysconfdir}/php.ini
+fi
+
%files
%defattr(644,root,root,755)
%doc CHANGES CONTRIBUTORS README TODO doc/*.html