diff options
| -rw-r--r-- | php-pecl-apfd.spec | 77 |
1 files changed, 30 insertions, 47 deletions
diff --git a/php-pecl-apfd.spec b/php-pecl-apfd.spec index 3d5a6c6..782a000 100644 --- a/php-pecl-apfd.spec +++ b/php-pecl-apfd.spec @@ -3,9 +3,9 @@ # # Fedora spec file for php-pecl-apfd # -# Copyright (c) 2015-2023 Remi Collet -# License: CC-BY-SA-4.0 -# http://creativecommons.org/licenses/by-sa/4.0/ +# SPDX-FileCopyrightText: Copyright 2015-2025 Remi Collet +# SPDX-License-Identifier: CECILL-2.1 +# http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt # # Please, preserve the changelog entries # @@ -14,19 +14,11 @@ %bcond_without tests -# For PHP < 5.6 and EPEL-9 -%{!?__phpize: %global __phpize %{_bindir}/phpize} -%{!?__ztsphpize: %global __ztsphpize %{_bindir}/zts-phpize} -%{!?__phpconfig: %global __phpconfig %{_bindir}/php-config} -%{!?__ztsphpconfig:%global __ztsphpconfig %{_bindir}/zts-php-config} - -%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} %global pecl_name apfd -%if "%{php_version}" < "5.6" -%global ini_name %{pecl_name}.ini -%else +%global pie_vend m6w6 +%global pie_proj ext-apfd +%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} %global ini_name 40-%{pecl_name}.ini -%endif #global prever RC1 %global sources %{pecl_name}-%{version} %global _configure ../%{sources}/configure @@ -34,7 +26,7 @@ Summary: Always Populate Form Data Name: %{?scl_prefix}php-pecl-%{pecl_name} Version: 1.0.3 -Release: 4%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 6%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} License: BSD-2-Clause URL: https://pecl.php.net/package/%{pecl_name} Source0: https://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz @@ -50,10 +42,15 @@ BuildRequires: %{?scl_prefix}php-pecl-json-post Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} +# Extension Provides: %{?scl_prefix}php-%{pecl_name} = %{version} Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version} +# PECL Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version} Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version} +# PIE +Provides: %{?scl_prefix}php-pie(%{pie_vend}/%{pie_proj}) = %{version} +Provides: %{?scl_prefix}php-%{pie_vend}-%{pie_proj} = %{version} # Split off pecl/http Conflicts: %{?scl_prefix}php-pecl(http) < 2.4 @@ -73,7 +70,7 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO # Don't install/register tests sed -e 's/role="test"/role="src"/' \ - %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \ + -e '/LICENSE/s/role="doc"/role="src"/' \ -i package.xml cd %{sources} @@ -102,26 +99,30 @@ EOF cd %{sources} %{__phpize} +[ -f Makefile.global ] && GLOBAL=Makefile.global || GLOBAL=build/Makefile.global +sed -e 's/INSTALL_ROOT/DESTDIR/' -i $GLOBAL cd ../NTS %configure \ --enable-apfd \ --with-php-config=%{__phpconfig} -make %{?_smp_mflags} + +%make_build %if %{with_zts} cd ../ZTS %configure \ --enable-apfd \ --with-php-config=%{__ztsphpconfig} -make %{?_smp_mflags} + +%make_build %endif %install %{?dtsenable} -make -C NTS install INSTALL_ROOT=%{buildroot} +%make_install -C NTS # install config file install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} @@ -130,7 +131,7 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml %if %{with_zts} -make -C ZTS install INSTALL_ROOT=%{buildroot} +%make_install -C ZTS install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} %endif @@ -141,33 +142,13 @@ do install -Dpm 644 %{sources}/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i done -%if 0%{?fedora} < 24 && 0%{?rhel} < 8 -# when pear installed alone, after us -%triggerin -- %{?scl_prefix}php-pear -if [ -x %{__pecl} ] ; then - %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : -fi - -# posttrans as pear can be installed after us -%posttrans -if [ -x %{__pecl} ] ; then - %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : -fi - -%postun -if [ $1 -eq 0 -a -x %{__pecl} ] ; then - %{pecl_uninstall} %{pecl_name} >/dev/null || : -fi -%endif - - %check cd %{sources} : Minimal load test for NTS extension %{__php} --no-php-ini \ --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ - --modules | grep %{pecl_name} + --modules | grep '^%{pecl_name}$' %if %{with tests} : Upstream test suite for NTS extension @@ -186,17 +167,13 @@ cd ../ZTS : Minimal load test for ZTS extension %{__ztsphp} --no-php-ini \ --define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \ - --modules | grep %{pecl_name} - -%if %{with tests} -: Upstream test suite skipped as zts-php-cgi not available -%endif + --modules | grep '^%{pecl_name}$' %endif %files +%license %{sources}/LICENSE %doc %{pecl_docdir}/%{pecl_name} -%{?_licensedir:%license %{sources}/LICENSE} %{pecl_xmldir}/%{name}.xml %config(noreplace) %{php_inidir}/%{ini_name} @@ -209,6 +186,12 @@ cd ../ZTS %changelog +* Thu Sep 25 2025 Remi Collet <remi@remirepo.net> - 1.0.3-6 +- rebuild for PHP 8.5.0RC1 + +* Wed Jul 30 2025 Remi Collet <remi@remirepo.net> - 1.0.3-5 +- rebuild for 8.5.0alpha3 + * Wed Aug 30 2023 Remi Collet <remi@remirepo.net> - 1.0.3-4 - rebuild for PHP 8.3.0RC1 |
