diff options
-rw-r--r-- | php-pecl-openswoole22.spec | 53 |
1 files changed, 12 insertions, 41 deletions
diff --git a/php-pecl-openswoole22.spec b/php-pecl-openswoole22.spec index 1e1454d..92b3a46 100644 --- a/php-pecl-openswoole22.spec +++ b/php-pecl-openswoole22.spec @@ -17,11 +17,7 @@ %bcond_without cares %bcond_without nghttpd2 -%if 0%{?fedora} >= 25 || 0%{?rhel} >= 8 %bcond_without brotli -%else -%bcond_with brotli -%endif %bcond_without pgsql %global upstream_version 22.1.2 @@ -33,7 +29,7 @@ Summary: High Performance Programmatic Server for PHP with Async IO, Coroutines and Fibers Name: %{?scl_prefix}php-pecl-%{pecl_name}22 Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}} -Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 3%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} # SPDX: extension is Apache-2.0 # hiredis is BSD-3-Clause License: Apache-2.0 AND BSD-3-Clause @@ -48,7 +44,6 @@ BuildRequires: %{?scl_prefix}php-pear BuildRequires: %{?scl_prefix}php-curl BuildRequires: %{?scl_prefix}php-sockets BuildRequires: %{?scl_prefix}php-mysqlnd -BuildRequires: pcre-devel BuildRequires: openssl-devel >= 1.0.2 BuildRequires: zlib-devel BuildRequires: libcurl-devel @@ -59,11 +54,7 @@ BuildRequires: c-ares-devel BuildRequires: brotli-devel %endif %if %{with pgsql} -%if 0%{?fedora} >= 29 || 0%{?rhel} >= 8 BuildRequires: libpq-devel > 9 -%else -BuildRequires: postgresql-devel > 9 -%endif %endif Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} @@ -120,8 +111,8 @@ sed \ -e '/Makefile/s/role="doc"/role="src"/' \ -e '/samples/s/role="doc"/role="src"/' \ -e '/name="library/s/role="doc"/role="src"/' \ - %{?_licensedir: -e '/LICENSE/s/role="doc"/role="src"/' } \ - %{?_licensedir: -e '/COPYING/s/role="doc"/role="src"/' } \ + -e '/LICENSE/s/role="doc"/role="src"/' \ + -e '/COPYING/s/role="doc"/role="src"/' \ -i package.xml @@ -176,11 +167,12 @@ peclbuild() { --with-libdir=%{_lib} \ --with-php-config=$1 -make %{?_smp_mflags} +%make_build } cd %{sources} %{__phpize} +sed -e 's/INSTALL_ROOT/DESTDIR/' -i build/Makefile.global cd ../NTS peclbuild %{__phpconfig} @@ -194,8 +186,7 @@ peclbuild %{__ztsphpconfig} %install %{?dtsenable} -make -C NTS \ - install INSTALL_ROOT=%{buildroot} +%make_install -C NTS # install config file install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} @@ -204,8 +195,7 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml %if %{with_zts} -make -C ZTS \ - install INSTALL_ROOT=%{buildroot} +%make_install -C ZTS install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} %endif @@ -222,26 +212,6 @@ done rm %{buildroot}%{pecl_testdir}/%{pecl_name}/tests/swoole_process/echo.py -%if 0%{?fedora} < 24 && 0%{?rhel} < 8 -# when pear installed alone, after us -%triggerin -- %{?scl_prefix}php-pear -if [ -x %{__pecl} ] ; then - %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : -fi - -# posttrans as pear can be installed after us -%posttrans -if [ -x %{__pecl} ] ; then - %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : -fi - -%postun -if [ $1 -eq 0 -a -x %{__pecl} ] ; then - %{pecl_uninstall} %{pecl_name} >/dev/null || : -fi -%endif - - %check OPT="--no-php-ini" [ -f %{php_extdir}/curl.so ] && OPT="$OPT -d extension=curl.so" @@ -262,10 +232,8 @@ OPT="--no-php-ini" %files -%{?_licensedir:%license %{sources}/LICENSE*} -%{?_licensedir:%license %{sources}/*-COPYING} -%{!?_licensedir:%{pecl_docdir}/%{pecl_name}/LICENSE} -%{!?_licensedir:%{pecl_docdir}/%{pecl_name}/thirdparty/*/COPYING} +%license %{sources}/LICENSE* +%license %{sources}/*-COPYING %{pecl_xmldir}/%{name}.xml %config(noreplace) %{php_inidir}/%{ini_name} @@ -293,6 +261,9 @@ OPT="--no-php-ini" %changelog +* Mon Nov 25 2024 Remi Collet <remi@remirepo.net> - 22.1.2-3 +- drop BuildRequires pcre-devel + * Mon Feb 19 2024 Remi Collet <remi@remirepo.net> - 22.1.2-2 - fix BuildRequires for libpq-devel |