summaryrefslogtreecommitdiffstats
path: root/php-pecl-event.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2024-10-22 15:29:04 +0200
committerRemi Collet <remi@php.net>2024-10-22 15:29:04 +0200
commit8b0f2925aa456d6a67ee6a0d0ce716c3dc9e01d6 (patch)
treeae0fb5901b12adec53661664158d3557d5d7924e /php-pecl-event.spec
parent9f7f79c598a228ed9c1ea7d9b2801456e7bc45eb (diff)
modernizeHEADmaster
Diffstat (limited to 'php-pecl-event.spec')
-rw-r--r--php-pecl-event.spec38
1 files changed, 14 insertions, 24 deletions
diff --git a/php-pecl-event.spec b/php-pecl-event.spec
index a4bc9ef..63858bc 100644
--- a/php-pecl-event.spec
+++ b/php-pecl-event.spec
@@ -11,22 +11,17 @@
#
%if 0%{?scl:1}
-%scl_package php-pecl-event
+%scl_package php-pecl-event
%else
-%global _root_prefix %{_prefix}
+%global _root_prefix %{_prefix}
%endif
-%bcond_without tests
+%bcond_without tests
-%global pecl_name event
-%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
-%if "%{php_version}" < "5.6"
-# After sockets.so
-%global ini_name z-%{pecl_name}.ini
-%else
+%global pecl_name event
+%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
# After 20-sockets.so
-%global ini_name 40-%{pecl_name}.ini
-%endif
+%global ini_name 40-%{pecl_name}.ini
%global upstream_version 3.1.4
#global upstream_prever RC1
#global upstream_postver r1
@@ -115,6 +110,8 @@ EOF
cd %{sources}
%{__phpize}
+[ -f Makefile.global ] && GLOBAL=Makefile.global || GLOBAL=build/Makefile.global
+sed -e 's/INSTALL_ROOT/DESTDIR/' -i $GLOBAL
cd ../NTS
%configure \
@@ -125,7 +122,8 @@ cd ../NTS
--with-event-extra \
--with-event-openssl \
--with-php-config=%{__phpconfig}
-make %{?_smp_mflags}
+
+%make_build
%if %{with_zts}
cd ../ZTS
@@ -138,7 +136,8 @@ cd ../ZTS
--with-event-openssl \
--with-event-pthreads \
--with-php-config=%{__ztsphpconfig}
-make %{?_smp_mflags}
+
+%make_build
%endif
@@ -147,12 +146,12 @@ make %{?_smp_mflags}
# use z-event.ini to ensure event.so load "after" sockets.so
: Install the NTS stuff
-make -C NTS install INSTALL_ROOT=%{buildroot}
+%make_install -C NTS
install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
%if %{with_zts}
: Install the ZTS stuff
-make -C ZTS install INSTALL_ROOT=%{buildroot}
+%make_install -C ZTS
install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
%endif
@@ -197,15 +196,6 @@ TEST_PHP_EXECUTABLE=%{__php} \
TEST_PHP_ARGS="-n $OPTS -d extension=$PWD/../NTS/modules/%{pecl_name}.so" \
REPORT_EXIT_STATUS=1 \
%{__php} -n run-tests.php -q --show-diff
-
-%if %{with_zts}
-: Upstream test suite for ZTS extension
-SKIP_ONLINE_TESTS=1 \
-TEST_PHP_EXECUTABLE=%{__ztsphp} \
-TEST_PHP_ARGS="-n $OPTS -d extension=$PWD/../ZTS/modules/%{pecl_name}.so" \
-REPORT_EXIT_STATUS=1 \
-%{__ztsphp} -n run-tests.php -q --show-diff
-%endif
%endif