%define realname RRD %define modname rrd %define soname %{modname}.so %define inifile 61_%{modname}.ini Summary: The %{realname} module for PHP Name: php-%{modname} Version: 2.0.1 Release: %mkrel 8 Group: Development/PHP License: BSD URL: https://pecl.php.net/package/rrd Source0: http://pecl.php.net/get/%{modname}-%{version}.tgz BuildRequires: gettext-devel BuildRequires: pkgconfig(librrd) >= 1.2.7 BuildRequires: pkgconfig(libpng) BuildRequires: pkgconfig(zlib) BuildRequires: php-devel >= 3:7.3.0 Requires: php >= 3:7.4.0 Requires: php-common = 3:7.4 Obsoletes: php-rrdtool < 1 %description The php-rrd package is a dynamic shared object (DSO) that adds RRD support to PHP. %prep %setup -q -n %{modname}-%{version} %build phpize %configure2_5x --with-libdir=%{_lib} \ --with-%{modname}=shared,%{_prefix} %make_build mv modules/*.so . %install install -d %{buildroot}%{_libdir}/php/extensions install -d %{buildroot}%{_sysconfdir}/php.d install -m0755 %{soname} %{buildroot}%{_libdir}/php/extensions/ %{__cat} > README.%{modname} << EOF The php-rrd package contains a dynamic shared object (DSO) for PHP. To activate it, make sure a file /etc/php.d/%{inifile} is present and contains the line 'extension = %{soname}'. EOF %{__cat} > %{buildroot}%{_sysconfdir}/php.d/%{inifile} << EOF extension = %{soname} EOF %files %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/php.d/%{inifile} %attr(0755,root,root) %{_libdir}/php/extensions/%{soname} %changelog * Thu Jun 18 2020 mokraemer <mokraemer> 2.0.1-8.mga7 + Revision: 1595926 - Fix dependency - backport for php 7.4 - backport php 7.4 * Tue Feb 18 2020 umeabot <umeabot> 2.0.1-7.mga8 + Revision: 1538994 - Mageia 8 Mass Rebuild + wally <wally> - replace deprecated %%configure2_5x * Fri Nov 29 2019 mokraemer <mokraemer> 2.0.1-6.mga8 + Revision: 1463540 + rebuild (emptylog) * Wed Dec 12 2018 mokraemer <mokraemer> 2.0.1-4.mga7 + Revision: 1340456 - rebuild * Fri Oct 26 2018 mokraemer <mokraemer> 2.0.1-3.mga7 + Revision: 1325890 - updated requirements - updated requirements - updated requirements - added source - initial commit for package replacement of php-rrdtool to php-rrd - Created package structure for php-rrd.