summaryrefslogtreecommitdiffstats
path: root/php-pecl-scoutapm.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2023-12-04 07:18:20 +0100
committerRemi Collet <remi@php.net>2023-12-04 07:18:20 +0100
commita978c548eb730d5b3fe7db9125ad256ba0b4520e (patch)
tree5cfa4e4019b11b968e6f244e3c82a533875cc19d /php-pecl-scoutapm.spec
parent7d8fff2a78ac78ca23daddd0ae08ca276642fc03 (diff)
update to 1.10.0HEADmaster
build out of sources tree
Diffstat (limited to 'php-pecl-scoutapm.spec')
-rw-r--r--php-pecl-scoutapm.spec49
1 files changed, 26 insertions, 23 deletions
diff --git a/php-pecl-scoutapm.spec b/php-pecl-scoutapm.spec
index ba3fc86..4013c31 100644
--- a/php-pecl-scoutapm.spec
+++ b/php-pecl-scoutapm.spec
@@ -6,28 +6,28 @@
#
# Please, preserve the changelog entries
#
-%if 0%{?scl:1}
-%scl_package php-pecl-scoutapm
-%endif
+%{?scl:%scl_package php-pecl-scoutapm}
-%bcond_without tests
+%bcond_without tests
-%global pecl_name scoutapm
-%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
-%global ini_name 15-%{pecl_name}.ini
+%global pecl_name scoutapm
+%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
+%global ini_name 15-%{pecl_name}.ini
+%global sources %{pecl_name}-%{version}
+%global _configure ../%{sources}/configure
Summary: Native Extension Component for ScoutAPM's PHP Agent
Name: %{?scl_prefix}php-pecl-%{pecl_name}
-Version: 1.9.1
+Version: 1.10.0
Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
-Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz
+Source0: https://pecl.php.net/get/%{sources}.tgz
License: MIT
URL: https://pecl.php.net/package/%{pecl_name}
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel >= 7.1
-BuildRequires: %{?scl_prefix}php-devel < 8.3
+BuildRequires: %{?scl_prefix}php-devel < 8.4
BuildRequires: %{?scl_prefix}php-pear
BuildRequires: %{?scl_prefix}php-json
# Only for tests
@@ -40,7 +40,6 @@ BuildRequires: /bin/ps
Requires: %{?scl_prefix}php-json%{?_isa}
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}
@@ -57,14 +56,12 @@ 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
-pushd NTS
+pushd %{sources}
: Check version
extver=$(sed -n '/#define PHP_SCOUTAPM_VERSION /{s/.* "//;s/".*$//;p}' zend_scoutapm.h)
if test "x${extver}" != "x%{version}%{?prever}"; then
@@ -73,9 +70,10 @@ if test "x${extver}" != "x%{version}%{?prever}"; then
fi
popd
+mkdir NTS
%if %{with_zts}
# Duplicate source tree for NTS / ZTS build
-cp -pr NTS ZTS
+mkdir ZTS
%endif
# Create configuration file
@@ -88,19 +86,20 @@ EOF
%build
%{?dtsenable}
-cd NTS
-%{_bindir}/phpize
+cd %{sources}
+%{__phpize}
+
+cd ../NTS
%configure \
--enable-scoutapm \
- --with-php-config=%{_bindir}/php-config
+ --with-php-config=%{__phpconfig}
make %{?_smp_mflags}
%if %{with_zts}
cd ../ZTS
-%{_bindir}/zts-phpize
%configure \
--enable-scoutapm \
- --with-php-config=%{_bindir}/zts-php-config
+ --with-php-config=%{__ztsphpconfig}
make %{?_smp_mflags}
%endif
@@ -123,7 +122,7 @@ 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
@@ -170,7 +169,7 @@ DEPS="$DEPS -d extension=curl.so -d extension=pdo.so -d extension=pdo_sqlite.so"
%if %{with tests}
: Upstream test suite for NTS extension
-cd NTS
+cd %{sources}
rm tests/*elastic*.phpt
TEST_PHP_ARGS="$DEPS -d zend_extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \
@@ -180,7 +179,7 @@ REPORT_EXIT_STATUS=1 \
%files
-%{?_licensedir:%license NTS/LICENSE}
+%{?_licensedir:%license %{sources}/LICENSE}
%doc %{pecl_docdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml
@@ -194,6 +193,10 @@ REPORT_EXIT_STATUS=1 \
%changelog
+* Mon Dec 4 2023 Remi Collet <remi@remirepo.net> - 1.10.0-1
+- update to 1.10.0
+- build out of sources tree
+
* Wed Dec 14 2022 Remi Collet <remi@remirepo.net> - 1.9.1-1
- update to 1.9.1 (no change)