diff options
Diffstat (limited to 'php-pecl-zmq.spec')
-rw-r--r-- | php-pecl-zmq.spec | 159 |
1 files changed, 70 insertions, 89 deletions
diff --git a/php-pecl-zmq.spec b/php-pecl-zmq.spec index 752ddf3..b06f407 100644 --- a/php-pecl-zmq.spec +++ b/php-pecl-zmq.spec @@ -3,98 +3,56 @@ # # Fedora spec file for php-pecl-zmq # -# Copyright (c) 2013-2019 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 # -%if 0%{?scl:1} -%global sub_prefix %{scl_prefix} -%scl_package php-pecl-zmq -%endif +%{?scl:%scl_package php-pecl-zmq} + +%bcond_without tests %global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} %global pecl_name zmq -%global with_tests %{?_without_tests:0}%{!?_without_tests:1} %if "%{php_version}" < "5.6" %global ini_name %{pecl_name}.ini %else %global ini_name 40-%{pecl_name}.ini %endif +%global sources %{pecl_name}-%{version} +%global _configure ../%{sources}/configure Summary: ZeroMQ messaging -Name: %{?sub_prefix}php-pecl-%{pecl_name} +Name: %{?scl_prefix}php-pecl-%{pecl_name} Version: 1.1.3 -Release: 10%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} -License: BSD -URL: http://pecl.php.net/package/%{pecl_name} -Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz +Release: 18%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +License: BSD-3-Clause +URL: https://pecl.php.net/package/%{pecl_name} +Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz -Patch0: https://patch-diff.githubusercontent.com/raw/mkoppanen/php-zmq/pull/170.patch -Patch1: https://patch-diff.githubusercontent.com/raw/mkoppanen/php-zmq/pull/195.patch +Patch0: https://patch-diff.githubusercontent.com/raw/zeromq/php-zmq/pull/216.patch +Patch1: https://patch-diff.githubusercontent.com/raw/zeromq/php-zmq/pull/222.patch +Patch2: https://patch-diff.githubusercontent.com/raw/zeromq/php-zmq/pull/228.patch +BuildRequires: make BuildRequires: %{?dtsprefix}gcc -# see https://github.com/mkoppanen/php-zmq/pull/190 build ok bug segfaults BuildRequires: %{?scl_prefix}php-devel BuildRequires: %{?scl_prefix}php-pear -%if 0%{?fedora} >= 22 || 0%{?rhel} >= 7 -# v4 in Fedora22+, EPEL-7 BuildRequires: zeromq-devel >= 2.0.7 -%else -BuildRequires: zeromq3-devel -%endif BuildRequires: pkgconfig +# BuildRequires: gdb php-debuginfo php-cli-debuginfo php-debugsource Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} -%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}} # Version 1.0.7 is the first pecl release # Fedora/EPEL still provides php-zmq, not php-pecl-zmq -Obsoletes: %{?scl_prefix}php-%{pecl_name} < %{version} -Provides: %{?scl_prefix}php-%{pecl_name} = %{version} -Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version} +Obsoletes: %{?scl_prefix}php-%{pecl_name} < %{version}-99 +Provides: %{?scl_prefix}php-%{pecl_name} = %{version}-99 +Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}-99 Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version} Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version} -%if "%{?scl_prefix}" != "%{?sub_prefix}" -Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release} -Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release} -%endif - -%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} -# Other third party repo stuff -%if "%{php_version}" > "5.6" -Obsoletes: php56u-pecl-%{pecl_name} <= %{version} -Obsoletes: php56w-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.0" -Obsoletes: php70u-pecl-%{pecl_name} <= %{version} -Obsoletes: php70w-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.1" -Obsoletes: php71u-pecl-%{pecl_name} <= %{version} -Obsoletes: php71w-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.2" -Obsoletes: php72u-pecl-%{pecl_name} <= %{version} -Obsoletes: php72w-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.3" -Obsoletes: php73-pecl-%{pecl_name} <= %{version} -Obsoletes: php73w-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.4" -Obsoletes: php74-pecl-%{pecl_name} <= %{version} -Obsoletes: php74w-pecl-%{pecl_name} <= %{version} -%endif -%endif - -%if 0%{?fedora} < 20 && 0%{?rhel} < 7 -# Filter shared private -%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$} -%{?filter_setup} -%endif %description @@ -112,11 +70,10 @@ sed -e 's/role="test"/role="src"/' \ %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \ -i package.xml -mv %{pecl_name}-%{version} NTS - -cd NTS -%patch0 -p1 -b .pr170 -%patch1 -p1 -b .pr195 +cd %{sources} +%patch -P0 -p1 -b .pr216 +%patch -P1 -p1 -b .pr222 +%patch -P2 -p1 -b .pr228 if pkg-config libzmq --atleast-version=4 then @@ -134,9 +91,9 @@ if test "x${extver}" != "x%{version}"; then fi cd .. +mkdir NTS %if %{with_zts} -# Duplicate source tree for NTS / ZTS build -cp -pr NTS ZTS +mkdir ZTS %endif # Create configuration file @@ -149,21 +106,22 @@ EOF %build %{?dtsenable} -cd NTS -%{_bindir}/phpize +cd %{sources} +%{__phpize} + +cd ../NTS %configure \ --with-zmq \ --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-zmq \ --with-libdir=%{_lib} \ - --with-php-config=%{_bindir}/zts-php-config + --with-php-config=%{__ztsphpconfig} make %{?_smp_mflags} %endif @@ -189,7 +147,7 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} # Documentation for i in $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//') -do install -Dpm 644 NTS/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i +do install -Dpm 644 %{sources}/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i done @@ -214,39 +172,38 @@ fi %check -cd NTS +cd %{sources} + : Minimal load test for NTS extension %{__php} --no-php-ini \ - --define extension=%{buildroot}/%{php_extdir}/%{pecl_name}.so \ - --modules | grep %{pecl_name} + --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ + --modules | grep '^%{pecl_name}$' -%if %{with_tests} +%if %{with tests} : upstream test suite for NTS extension -export TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" +export TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" export REPORT_EXIT_STATUS=1 -export NO_INTERACTION=1 export TEST_PHP_EXECUTABLE=%{__php} -%{__php} -n run-tests.php --show-diff +%{__php} -n run-tests.php -q --show-diff %endif %if %{with_zts} -cd ../ZTS : Minimal load test for ZTS extension %{__ztsphp} --no-php-ini \ - --define extension=%{buildroot}/%{php_ztsextdir}/%{pecl_name}.so \ - --modules | grep %{pecl_name} + --define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \ + --modules | grep '^%{pecl_name}$' -%if %{with_tests} +%if %{with tests} : upstream test suite for ZTS extension -export TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" +export TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so" export TEST_PHP_EXECUTABLE=%{__ztsphp} -%{__ztsphp} -n run-tests.php --show-diff +%{__ztsphp} -n run-tests.php -q --show-diff %endif %endif %files -%{?_licensedir:%license NTS/LICENSE} +%{?_licensedir:%license %{sources}/LICENSE} %doc %{pecl_docdir}/%{pecl_name} %{pecl_xmldir}/%{name}.xml @@ -260,6 +217,30 @@ export TEST_PHP_EXECUTABLE=%{__ztsphp} %changelog +* Wed Aug 30 2023 Remi Collet <remi@remirepo.net> - 1.1.3-18 +- rebuild for PHP 8.3.0RC1 + +* Thu Jul 20 2023 Remi Collet <remi@remirepo.net> - 1.1.3-17 +- build out of sources tree + +* Fri Jun 17 2022 Remi Collet <remi@remirepo.net> - 1.1.3-16 +- add patch for PHP 8.2 from https://github.com/zeromq/php-zmq/pull/228 + +* Wed Nov 3 2021 Remi Collet <remi@remirepo.net> - 1.1.3-15 +- add patch for PHP 8.1 from https://github.com/zeromq/php-zmq/pull/222 + +* Wed Sep 30 2020 Remi Collet <remi@remirepo.net> - 1.1.3-14 +- rebuild for PHP 8.0.0RC1 + +* Wed Sep 2 2020 Remi Collet <remi@remirepo.net> - 1.1.3-13 +- rebuild for PHP 8.0.0beta3 + +* Mon Aug 24 2020 Remi Collet <remi@remirepo.net> - 1.1.3-12 +- add patch for PHP 8 from https://github.com/zeromq/php-zmq/pull/216 + +* Wed Nov 27 2019 Remi Collet <remi@remirepo.net> - 1.1.3-11 +- EL-8 rebuild + * Tue Sep 03 2019 Remi Collet <remi@remirepo.net> - 1.1.3-10 - rebuild for 7.4.0RC1 |