diff options
Diffstat (limited to 'php-pecl-zip.spec')
-rw-r--r-- | php-pecl-zip.spec | 115 |
1 files changed, 73 insertions, 42 deletions
diff --git a/php-pecl-zip.spec b/php-pecl-zip.spec index 67d7a82..aa4658f 100644 --- a/php-pecl-zip.spec +++ b/php-pecl-zip.spec @@ -3,32 +3,39 @@ # # fedora spec file for php-pecl-zip # -# Copyright (c) 2013-2022 Remi Collet -# License: CC-BY-SA +# Copyright (c) 2013-2023 Remi Collet +# License: CC-BY-SA-4.0 # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # -# we don't want -z defs linker flag -%undefine _strict_symbol_defs_build +%{?scl:%scl_package php-pecl-zip} -%{?scl: %scl_package php-pecl-zip} +# 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} %if ( 0%{?scl:1} && 0%{?rhel} == 8 ) || 0%{?rhel} >= 9 -%bcond_without move_to_opt +%bcond_without move_to_opt %else -%bcond_with move_to_opt +%bcond_with move_to_opt %endif +%bcond_without tests + %global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} %global pecl_name zip -%global upstream_version 1.21.0 +%global upstream_version 1.22.3 #global upstream_prever dev #global upstream_lower DEV +%global sources %{pecl_name}-%{upstream_version}%{?upstream_prever} +%global _configure ../%{sources}/configure -%global libzip_version 1.9.2 +%global libzip_version 1.10.1 %if "%{php_version}" < "5.6" %global ini_name %{pecl_name}.ini @@ -40,12 +47,12 @@ Summary: A ZIP archive management extension Name: %{?scl_prefix}php-pecl-zip Version: %{upstream_version}%{?upstream_prever:~%{upstream_lower}} -Release: 3%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} -License: PHP +Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +License: PHP-3.01 Group: Development/Languages URL: https://pecl.php.net/package/zip -Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz +Source0: https://pecl.php.net/get/%{sources}.tgz BuildRequires: make BuildRequires: %{?dtsprefix}gcc @@ -70,14 +77,13 @@ Requires: libzip%{?_isa} >= %{libzip_version} Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} -%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}} Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version} Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version} Provides: %{?scl_prefix}php-%{pecl_name} = 1:%{version}-%{release} Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = 1:%{version}-%{release} -%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} +%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} == 7 # Other third party repo stuff Obsoletes: php53-pecl-%{pecl_name} <= %{version} Obsoletes: php53u-pecl-%{pecl_name} <= %{version} @@ -111,12 +117,6 @@ Obsoletes: php73w-pecl-%{pecl_name} <= %{version} Obsoletes: php74-pecl-%{pecl_name} <= %{version} Obsoletes: php74w-pecl-%{pecl_name} <= %{version} %endif -%if "%{php_version}" > "8.0" -Obsoletes: php80-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "8.1" -Obsoletes: php81-pecl-%{pecl_name} <= %{version} -%endif %endif %if "%{php_version}" > "7.0" @@ -134,31 +134,30 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO %prep %setup -c -q -mv %{pecl_name}-%{upstream_version}%{?upstream_prever} NTS # Don't install/register tests sed -e 's/role="test"/role="src"/' \ %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \ -i package.xml -cd NTS +cd %{sources} # Sanity check, really often broken extver=$(sed -n '/#define PHP_ZIP_VERSION/{s/.* "//;s/".*$//;p}' php7/php_zip.h) if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}" -a "x${extver}" != "x%{upstream_version}-%{?upstream_prever}"; then : Error: Upstream extension version is ${extver}, expecting %{upstream_version}%{?upstream_prever}. exit 1 fi - cd .. + : Create the configuration file cat >%{ini_name} << 'EOF' ; Enable ZIP extension module extension=%{pecl_name}.so EOF +mkdir NTS %if %{with_zts} -: Duplicate sources tree for ZTS build -cp -pr NTS ZTS +mkdir ZTS %endif @@ -169,22 +168,23 @@ cp -pr NTS ZTS export PKG_CONFIG_PATH=/opt/%{?vendeur:%{vendeur}/}libzip/%{_lib}/pkgconfig %endif -cd NTS -%{_bindir}/phpize +cd %{sources} +%{__phpize} + +cd ../NTS %configure \ --with-libzip \ --with-libdir=%{_lib} \ - --with-php-config=%{_bindir}/php-config + --with-php-config=%{__phpconfig} make %{?_smp_mflags} %if %{with_zts} cd ../ZTS -%{_bindir}/zts-phpize %configure \ --with-libzip \ --with-libdir=%{_lib} \ - --with-php-config=%{_bindir}/zts-php-config + --with-php-config=%{__ztsphpconfig} make %{?_smp_mflags} %endif @@ -205,42 +205,45 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} %endif # Documentation -cd NTS +cd %{sources} for i in $(grep 'role="doc"' ../package.xml | sed -e 's/^.*name="//;s/".*$//') do install -Dpm 644 $i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i done %check +cd %{sources} OPT="-q --show-diff" %if "%{php_version}" > "8.0" OPT="$OPT %{?_smp_mflags}" %endif -cd NTS : minimal load test of NTS extension -%{_bindir}/php --no-php-ini \ +%{__php} --no-php-ini \ --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ --modules | grep %{pecl_name} +%if %{with tests} : upstream test suite for NTS extension -TEST_PHP_ARGS="-n -d extension_dir=$PWD/modules -d extension=%{pecl_name}.so" \ +TEST_PHP_ARGS="-n -d extension_dir=$PWD/../NTS/modules -d extension=%{pecl_name}.so" \ REPORT_EXIT_STATUS=1 \ -TEST_PHP_EXECUTABLE=%{_bindir}/php \ -%{_bindir}/php -n run-tests.php $OPT +TEST_PHP_EXECUTABLE=%{__php} \ +%{__php} -n run-tests.php $OPT +%endif %if %{with_zts} -cd ../ZTS : minimal load test of ZTS extension -%{_bindir}/zts-php --no-php-ini \ +%{__ztsphp} --no-php-ini \ --define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \ --modules | grep %{pecl_name} +%if %{with tests} : upstream test suite for ZTS extension -TEST_PHP_ARGS="-n -d extension_dir=$PWD/modules -d extension=%{pecl_name}.so" \ +TEST_PHP_ARGS="-n -d extension_dir=$PWD/../ZTS/modules -d extension=%{pecl_name}.so" \ REPORT_EXIT_STATUS=1 \ -TEST_PHP_EXECUTABLE=%{_bindir}/zts-php \ -%{_bindir}/zts-php -n run-tests.php $OPT +TEST_PHP_EXECUTABLE=%{__ztsphp} \ +%{__ztsphp} -n run-tests.php $OPT +%endif %endif @@ -265,7 +268,7 @@ fi %files -%{?_licensedir:%license NTS/LICENSE} +%{?_licensedir:%license %{sources}/LICENSE} %doc %{pecl_docdir}/%{pecl_name} %{pecl_xmldir}/%{name}.xml @@ -279,6 +282,34 @@ fi %changelog +* Tue Nov 14 2023 Remi Collet <remi@remirepo.net> - 1.22.3-1 +- update to 1.22.3 +- build out of sources tree + +* Wed Aug 30 2023 Remi Collet <remi@remirepo.net> - 1.22.2-2 +- rebuild for PHP 8.3.0RC1 + +* Wed Aug 23 2023 Remi Collet <remi@remirepo.net> - 1.22.2-1 +- update to 1.22.2 + +* Thu Jun 29 2023 Remi Collet <remi@remirepo.net> - 1.22.1-1 +- update to 1.22.1 + +* Mon Jun 26 2023 Remi Collet <remi@remirepo.net> - 1.22.0-1 +- update to 1.22.0 + +* Mon Jun 5 2023 Remi Collet <remi@remirepo.net> - 1.21.1-2 +- add upstream patches for 8.3 + +* Fri Sep 16 2022 Remi Collet <remi@remirepo.net> - 1.21.1-1 +- update to 1.21.1 + +* Thu Sep 1 2022 Remi Collet <remi@remirepo.net> - 1.21.0-5 +- rebuild for PHP 8.2.0RC1 + +* Wed Jul 20 2022 Remi Collet <remi@remirepo.net> - 1.21.0-4 +- add upstream patch for 8.2.0beta1 + * Wed Jun 29 2022 Remi Collet <remi@remirepo.net> - 1.21.0-3 - require minimal libzip version - rebuild using libzip5 on EL-7 |