From c2d753cbbd52cdbbf4a1d62075d0a368ec1480e2 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 18 Oct 2024 10:13:07 +0200 Subject: modernize --- php-pecl-memcache.spec | 56 ++++++++------------------------------------------ 1 file changed, 8 insertions(+), 48 deletions(-) diff --git a/php-pecl-memcache.spec b/php-pecl-memcache.spec index 0a21c38..77fccc5 100644 --- a/php-pecl-memcache.spec +++ b/php-pecl-memcache.spec @@ -1,6 +1,6 @@ # spec file for php-pecl-memcache # -# Copyright (c) 2007-2023 Remi Collet +# Copyright (c) 2007-2024 Remi Collet # License: CC-BY-SA-4.0 # http://creativecommons.org/licenses/by-sa/4.0/ # @@ -42,27 +42,6 @@ Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version} Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version} Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version} -%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} == 7 -# Other third party repo stuff -Obsoletes: php53-pecl-%{pecl_name} <= %{version} -Obsoletes: php53u-pecl-%{pecl_name} <= %{version} -Obsoletes: php54-pecl-%{pecl_name} <= %{version} -Obsoletes: php54w-pecl-%{pecl_name} <= %{version} -Obsoletes: php55u-pecl-%{pecl_name} <= %{version} -Obsoletes: php55w-pecl-%{pecl_name} <= %{version} -Obsoletes: php56u-pecl-%{pecl_name} <= %{version} -Obsoletes: php56w-pecl-%{pecl_name} <= %{version} -Obsoletes: php70u-pecl-%{pecl_name} <= %{version} -Obsoletes: php70w-pecl-%{pecl_name} <= %{version} -Obsoletes: php71u-pecl-%{pecl_name} <= %{version} -Obsoletes: php71w-pecl-%{pecl_name} <= %{version} -Obsoletes: php72u-pecl-%{pecl_name} <= %{version} -Obsoletes: php72w-pecl-%{pecl_name} <= %{version} -Obsoletes: php73-pecl-%{pecl_name} <= %{version} -Obsoletes: php73w-pecl-%{pecl_name} <= %{version} -Obsoletes: php74-pecl-%{pecl_name} <= %{version} -%endif - %description Memcached is a caching daemon designed especially for @@ -82,7 +61,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 pushd %{sources} @@ -159,27 +138,28 @@ 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 # Drop in the bit of configuration install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} %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 @@ -238,28 +218,8 @@ exit $ret %endif -%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 - - %files -%{?_licensedir:%license %{sources}/LICENSE} +%license %{sources}/LICENSE %doc %{pecl_docdir}/%{pecl_name} %{pecl_xmldir}/%{name}.xml -- cgit