summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2024-10-29 14:54:27 +0100
committerRemi Collet <remi@php.net>2024-10-29 14:54:27 +0100
commitaddd67cd419659a780e036b628471b8a399add32 (patch)
tree0651e365a84b423bf7f1e30293f790030d9b6844
parentef0620d6b092485b96601daa79de34cc70363bce (diff)
modernizeHEADmaster
-rw-r--r--php-pecl-uopz.spec33
1 files changed, 7 insertions, 26 deletions
diff --git a/php-pecl-uopz.spec b/php-pecl-uopz.spec
index 5cd8100..a8854a8 100644
--- a/php-pecl-uopz.spec
+++ b/php-pecl-uopz.spec
@@ -96,7 +96,7 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
# Don't install/register tests
sed -e 's/role="test"/role="src"/' \
- %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \
+ -e '/LICENSE/s/role="doc"/role="src"/' \
-i package.xml
cd %{sources}
@@ -137,24 +137,25 @@ mkdir ZTS
cd %{sources}
%{__phpize}
+sed -e 's/INSTALL_ROOT/DESTDIR/' -i build/Makefile.global
cd ../NTS
%configure \
--with-php-config=%{__phpconfig}
-make %{?_smp_mflags}
+%make_build
%if %{with_zts}
cd ../ZTS
%configure \
--with-php-config=%{__ztsphpconfig}
-make %{?_smp_mflags}
+%make_build
%endif
%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}
@@ -163,7 +164,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
@@ -173,26 +174,6 @@ do install -Dpm 644 %{sources}/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
done
-%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
cd %{sources}
%if "%{php_version}" >= "8.1"
@@ -235,7 +216,7 @@ REPORT_EXIT_STATUS=1 \
%files
-%{?_licensedir:%license %{sources}/LICENSE}
+%license %{sources}/LICENSE
%doc %{pecl_docdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml