From 7e1495e5b9124861a848906a53cf7114a0b69f83 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 26 Aug 2020 09:03:27 +0200 Subject: update to 0.48.0 drop patch merged upstream install PHP library raise dependency on PHP 5.6 --- php-pecl-datadog-trace.spec | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) (limited to 'php-pecl-datadog-trace.spec') diff --git a/php-pecl-datadog-trace.spec b/php-pecl-datadog-trace.spec index 8877f9b..9056d41 100644 --- a/php-pecl-datadog-trace.spec +++ b/php-pecl-datadog-trace.spec @@ -34,7 +34,7 @@ Summary: APM and distributed tracing for PHP Name: %{?sub_prefix}php-pecl-datadog-trace -Version: 0.47.1 +Version: 0.48.0 Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} # extension is dual-licensed under Apache 2.0 or BSD3. # mpack is MIT @@ -42,12 +42,6 @@ License: (ASL 2.0 or BSD) and MIT URL: https://pecl.php.net/package/%{proj_name} Source0: https://pecl.php.net/get/%{proj_name}-%{version}.tgz -Source1: https://raw.githubusercontent.com/DataDog/dd-trace-php/%{version}/src/ext/php5/engine_api.c -Source2: https://raw.githubusercontent.com/DataDog/dd-trace-php/%{version}/src/ext/php5/engine_api.h -Source3: https://raw.githubusercontent.com/DataDog/dd-trace-php/%{version}/src/ext/php5/handlers_curl.c - -Patch0: https://patch-diff.githubusercontent.com/raw/DataDog/dd-trace-php/pull/952.patch - # ddtrace only supports 64-bit platforms ExcludeArch: %{ix86} %{arm} @@ -56,7 +50,7 @@ BuildRequires: devtoolset-6-toolchain %else BuildRequires: %{?dtsprefix}gcc %endif -BuildRequires: %{?scl_prefix}php-devel +BuildRequires: %{?scl_prefix}php-devel > 5.6 BuildRequires: %{?scl_prefix}php-pear BuildRequires: curl-devel # For tests @@ -84,15 +78,12 @@ Provides: %{?scl_prefix}php-pecl-%{safe_name}%{?_isa} = %{version}-%{rele # Other third party repo stuff %if "%{php_version}" > "7.2" Obsoletes: php72u-pecl-%{safe_name} <= %{version} -Obsoletes: php72w-pecl-%{safe_name} <= %{version} %endif %if "%{php_version}" > "7.3" Obsoletes: php73-pecl-%{safe_name} <= %{version} -Obsoletes: php73w-pecl-%{safe_name} <= %{version} %endif %if "%{php_version}" > "7.4" Obsoletes: php74-pecl-%{safe_name} <= %{version} -Obsoletes: php74w-pecl-%{safe_name} <= %{version} %endif %endif @@ -119,8 +110,11 @@ sed -e 's/role="test"/role="src"/' \ -i package.xml cd NTS -%patch0 -p1 -cp %{SOURCE1} %{SOURCE2} %{SOURCE3} src/ext/php5/ +: PEAR installer stuff +sed -e 's:@php_dir@:%{pear_phpdir}:' \ + -e 's:_BUILD_FROM_PECL_:1:' \ + -i src/ext/ddtrace.c + cp src/ext/mpack/LICENSE LICENSE.mpack : Sanity check, really often broken extver=$(sed -n '/#define PHP_DDTRACE_VERSION /{s/.* "//;s/".*$//;p}' src/ext/version.h) @@ -142,8 +136,7 @@ extension=%{pecl_name}.so ; Configuration ;ddtrace.disable = Off -;ddtrace.request_init_hook = '' -;ddtrace.strict_mode = Off +;ddtrace.request_init_hook = '%{pear_phpdir}/datadog_trace/bridge/dd_wrap_autoloader.php' EOF @@ -190,6 +183,10 @@ make -C ZTS install INSTALL_ROOT=%{buildroot} install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} %endif +# PEAR stuff +mkdir -p %{buildroot}%{pear_phpdir}/datadog_trace/ +cp -pr NTS/bridge %{buildroot}%{pear_phpdir}/datadog_trace/bridge + # 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 @@ -201,7 +198,7 @@ done rm ?TS/tests/ext/segfault_backtrace_*.phpt rm ?TS/tests/ext/sandbox/memory_limit_graceful_bailout.phpt -MOD="-n" +MOD="-n -d ddtrace.request_init_hook=" [ -f %{php_extdir}/curl.so ] && MOD="$MOD -d extension=curl.so" [ -f %{php_extdir}/json.so ] && MOD="$MOD -d extension=json.so" [ -f %{php_extdir}/posix.so ] && MOD="$MOD -d extension=posix.so" @@ -256,6 +253,8 @@ fi %files %doc %{pecl_docdir}/%{pecl_name} %{?_licensedir:%license NTS/LICENSE*} +%dir %{pear_phpdir}/datadog_trace + %{pear_phpdir}/datadog_trace/bridge %{pecl_xmldir}/%{name}.xml %config(noreplace) %{php_inidir}/%{ini_name} @@ -268,6 +267,12 @@ fi %changelog +* Wed Aug 26 2020 Remi Collet - 0.48.0-1 +- update to 0.48.0 +- drop patch merged upstream +- install PHP library +- raise dependency on PHP 5.6 + * Sat Aug 1 2020 Remi Collet - 0.47.1-1 - update to 0.47.1 -- cgit