From 24e6a767e12b4d4d09a24e1be48e98f022ea3e2a Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 8 Mar 2016 17:33:28 +0100 Subject: php-pecl-weakref: F24 --- php-pecl-weakref.spec | 42 +++++++++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/php-pecl-weakref.spec b/php-pecl-weakref.spec index f137af5..d48edf4 100644 --- a/php-pecl-weakref.spec +++ b/php-pecl-weakref.spec @@ -7,10 +7,6 @@ # Please, preserve the changelog entries # %{?scl: %scl_package php-pecl-judy} -%{!?php_inidir: %global php_inidir %{_sysconfdir}/php.d} -%{!?php_incldir: %global php_incldir %{_includedir}/php} -%{!?__pecl: %global __pecl %{_bindir}/pecl} -%{!?__php: %global __php %{_bindir}/php} %global with_zts 0%{?__ztsphp:1} %global pecl_name Weakref @@ -25,7 +21,7 @@ Summary: Implementation of weak references Name: %{?scl_prefix}php-pecl-weakref Version: 0.2.6 -Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}.1 +Release: 2%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} License: PHP Group: Development/Languages URL: http://pecl.php.net/package/%{pecl_name} @@ -37,16 +33,16 @@ BuildRequires: %{?scl_prefix}php-pear BuildRequires: Judy-devel BuildRequires: pcre-devel -Requires(post): %{__pecl} -Requires(postun): %{__pecl} Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} %{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}} -Provides: %{?scl_prefix}php-%{ext_name} = %{version} -Provides: %{?scl_prefix}php-%{ext_name}%{?_isa} = %{version} -Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version} +Provides: %{?scl_prefix}php-%{ext_name} = %{version} +Provides: %{?scl_prefix}php-%{ext_name}%{?_isa} = %{version} +Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version} Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version} +Provides: %{?scl_prefix}php-pecl-%{ext_name} = %{version}-%{release} +Provides: %{?scl_prefix}php-pecl-%{ext_name}%{?_isa} = %{version}-%{release} %if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} # Other third party repo stuff @@ -75,13 +71,15 @@ Obsoletes: php56w-pecl-%{pecl_name} <= %{version} A weak reference provides a gateway to an object without preventing that object from being collected by the garbage collector (GC). -Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection}. +Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection (%{scl} by %{?scl_vendor}%{!?scl_vendor:rh})}. %prep %setup -q -c mv %{pecl_name}-%{version} NTS +%{?_licensedir:sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml} + cd NTS # Sanity check, really often broken @@ -147,14 +145,24 @@ do install -Dpm 644 NTS/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i done -%post -%{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : +%if 0%{?fedora} < 24 +# 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 ] ; then +if [ $1 -eq 0 -a -x %{__pecl} ] ; then %{pecl_uninstall} %{pecl_name} >/dev/null || : fi +%endif %check @@ -191,6 +199,10 @@ rm -rf %{buildroot} %changelog +* Tue Mar 8 2016 Remi Collet - 0.2.6-2 +- adapt for F24 +- drop runtime dependency on pear, new scriptlets + * Wed Dec 24 2014 Remi Collet - 0.2.6-1.1 - Fedora 21 SCL mass rebuild @@ -209,4 +221,4 @@ rm -rf %{buildroot} * Sun May 4 2014 Remi Collet - 0.2.3-1 - initial package, version 0.2.3 (beta) - open https://github.com/colder/php-weakref/issues/11 License -- open https://github.com/colder/php-weakref/issues/12 Version \ No newline at end of file +- open https://github.com/colder/php-weakref/issues/12 Version -- cgit