From 0e72a15d82b59cd96a294e86b29e5dc0eab263e4 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sun, 6 Mar 2016 08:19:41 +0100 Subject: php-pecl-weakref: F24 --- php-pecl-weakref-php7.spec | 41 +++++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/php-pecl-weakref-php7.spec b/php-pecl-weakref-php7.spec index 88add04..def83c7 100644 --- a/php-pecl-weakref-php7.spec +++ b/php-pecl-weakref-php7.spec @@ -7,10 +7,6 @@ # Please, preserve the changelog entries # %{?scl: %scl_package php-pecl-weakref} -%{!?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 gh_commit faa99eef4c7333ec563e7c22afa152753d1bf3d5 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) @@ -31,7 +27,7 @@ Version: 0.3.2 Release: 0.1.%{gh_date}git%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{pecl_name}-%{version}-%{gh_short}.tar.gz %else -Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} +Release: 2%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz %endif License: PHP @@ -45,18 +41,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} +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 @@ -164,14 +158,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 @@ -232,6 +236,10 @@ rm -rf %{buildroot} %changelog +* Sun Mar 6 2016 Remi Collet - 0.3.2-2 +- adapt for F24 +- drop runtime dependency on pear, new scriptlets + * Sun Jan 24 2016 Remi Collet - 0.3.2-1 - update to 0.3.2 @@ -260,4 +268,5 @@ 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