summaryrefslogtreecommitdiffstats
path: root/php-pecl-zmq.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2023-07-20 11:57:07 +0200
committerRemi Collet <remi@php.net>2023-07-20 11:57:07 +0200
commit9ba083c6792be9d1b69a5bac1745ad5b55899447 (patch)
treef64aaf273f4b219d311cbafa6605ec327fb9484a /php-pecl-zmq.spec
parent62f772af1386cf85030174303b8de7ebc976e63a (diff)
build out of sources tree
Diffstat (limited to 'php-pecl-zmq.spec')
-rw-r--r--php-pecl-zmq.spec78
1 files changed, 30 insertions, 48 deletions
diff --git a/php-pecl-zmq.spec b/php-pecl-zmq.spec
index e89a618..fac79c2 100644
--- a/php-pecl-zmq.spec
+++ b/php-pecl-zmq.spec
@@ -3,15 +3,13 @@
#
# Fedora spec file for php-pecl-zmq
#
-# 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
#
-%if 0%{?scl:1}
-%scl_package php-pecl-zmq
-%endif
+%{?scl:%scl_package php-pecl-zmq}
%bcond_without tests
@@ -22,12 +20,14 @@
%else
%global ini_name 40-%{pecl_name}.ini
%endif
+%global sources %{pecl_name}-%{version}
+%global _configure ../%{sources}/configure
Summary: ZeroMQ messaging
Name: %{?scl_prefix}php-pecl-%{pecl_name}
Version: 1.1.3
-Release: 16%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
-License: BSD
+Release: 17%{?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
@@ -45,7 +45,6 @@ BuildRequires: pkgconfig
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
@@ -55,25 +54,6 @@ 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 "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
-# Other third party repo stuff
-%if "%{php_version}" > "7.2"
-Obsoletes: php72u-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.3"
-Obsoletes: php73-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.4"
-Obsoletes: php74-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
-
%description
ZeroMQ is a software library that lets you quickly design and implement
@@ -90,12 +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 .pr216
-%patch1 -p1 -b .pr222
-%patch2 -p1 -b .pr228
+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
@@ -113,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
@@ -128,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
@@ -168,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
@@ -193,30 +172,30 @@ fi
%check
-cd NTS
+cd %{sources}
+
: Minimal load test for NTS extension
%{__php} --no-php-ini \
- --define extension=%{buildroot}/%{php_extdir}/%{pecl_name}.so \
+ --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
--modules | grep '^%{pecl_name}$'
%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 TEST_PHP_EXECUTABLE=%{__php}
%{__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 \
+ --define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
--modules | grep '^%{pecl_name}$'
%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 -q --show-diff
%endif
@@ -224,7 +203,7 @@ export TEST_PHP_EXECUTABLE=%{__ztsphp}
%files
-%{?_licensedir:%license NTS/LICENSE}
+%{?_licensedir:%license %{sources}/LICENSE}
%doc %{pecl_docdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml
@@ -238,6 +217,9 @@ export TEST_PHP_EXECUTABLE=%{__ztsphp}
%changelog
+* 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