summaryrefslogtreecommitdiffstats
path: root/php-pecl-stomp.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-pecl-stomp.spec')
-rw-r--r--php-pecl-stomp.spec45
1 files changed, 24 insertions, 21 deletions
diff --git a/php-pecl-stomp.spec b/php-pecl-stomp.spec
index b479a2a..d5b6356 100644
--- a/php-pecl-stomp.spec
+++ b/php-pecl-stomp.spec
@@ -1,7 +1,7 @@
# remimrepo/fedora spec file for php-pecl-stomp
#
-# Copyright (c) 2014-2022 Remi Collet
-# License: CC-BY-SA
+# Copyright (c) 2014-2023 Remi Collet
+# License: CC-BY-SA-4.0
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
@@ -15,14 +15,16 @@
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%global pecl_name stomp
%global ini_name 40-%{pecl_name}.ini
+%global sources %{pecl_name}-%{version}
+%global _configure ../%{sources}/configure
Summary: Stomp client extension
Name: %{?scl_prefix}php-pecl-%{pecl_name}
Version: 2.0.3
-Release: 2%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
-License: PHP
+Release: 3%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
+License: PHP-3.01
URL: https://pecl.php.net/package/%{pecl_name}
-Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz
+Source0: https://pecl.php.net/get/%{sources}.tgz
BuildRequires: %{?dtsprefix}gcc
BuildRequires: make
@@ -35,7 +37,6 @@ BuildRequires: rabbitmq-server
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_name} = %{version}
Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
@@ -75,14 +76,13 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
%setup -q -c
-mv %{pecl_name}-%{version} 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_STOMP_VERSION/{s/.* "//;s/".*$//;p}' php_stomp.h)
if test "x${extver}" != "x%{version}%{?versuf}"; then
@@ -91,10 +91,9 @@ if test "x${extver}" != "x%{version}%{?versuf}"; 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
@@ -126,14 +125,15 @@ peclbuild() {
make %{?_smp_mflags}
}
-cd NTS
-%{_bindir}/phpize
-peclbuild %{_bindir}/php-config
+cd %{sources}
+%{__phpize}
+
+cd ../NTS
+peclbuild %{__phpconfig}
%if %{with_zts}
cd ../ZTS
-%{_bindir}/zts-phpize
-peclbuild %{_bindir}/zts-php-config
+peclbuild %{__ztsphpconfig}
%endif
@@ -156,7 +156,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
@@ -186,16 +186,16 @@ fi
: Minimal load test for NTS extension
%{__php} --no-php-ini \
--define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
- --modules | grep -i %{pecl_name}
+ --modules | grep -i '^%{pecl_name}$'
%if %{with_zts}
: Minimal load test for ZTS extension
%{__ztsphp} --no-php-ini \
--define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
- --modules | grep -i %{pecl_name}
+ --modules | grep -i '^%{pecl_name}$'
%endif
-cd NTS
+cd %{sources}
%if %{with tests}
mkdir log run base
: Launch the RabbitMQ service
@@ -223,7 +223,7 @@ exit $ret
%files
-%{?_licensedir:%license NTS/LICENSE}
+%{?_licensedir:%license %{sources}/LICENSE}
%doc %{pecl_docdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml
@@ -237,6 +237,9 @@ exit $ret
%changelog
+* Mon Sep 4 2023 Remi Collet <remi@remirepo.net> - 2.0.3-3
+- build out of sources tree
+
* Thu Sep 1 2022 Remi Collet <remi@remirepo.net> - 2.0.3-2
- rebuild for PHP 8.2.0RC1