From 6769bd6cdd711c93c7ba44083a57b9cd7b565b7b Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 9 Mar 2016 11:01:47 +0100 Subject: php-pecl-yaz: F24 --- php-pecl-yaz.spec | 47 ++++++++++++++++++++++++++++++----------------- 1 file changed, 30 insertions(+), 17 deletions(-) diff --git a/php-pecl-yaz.spec b/php-pecl-yaz.spec index 21e0fa6..f454ac4 100644 --- a/php-pecl-yaz.spec +++ b/php-pecl-yaz.spec @@ -1,4 +1,4 @@ -# spec file for php-pecl-yaz +# remirepo spec file for php-pecl-yaz # # Copyright (c) 2014-2016 Remi Collet # License: CC-BY-SA @@ -7,9 +7,6 @@ # Please, preserve the changelog entries # %{?scl: %scl_package php-pecl-yaz} -%{!?php_inidir: %global php_inidir %{_sysconfdir}/php.d} -%{!?__pecl: %global __pecl %{_bindir}/pecl} -%{!?__php: %global __php %{_bindir}/php} %global with_zts 0%{?__ztsphp:1} %global pecl_name yaz @@ -24,7 +21,7 @@ Summary: Z39.50/SRU client Name: %{?scl_prefix}php-pecl-%{pecl_name} Version: 1.1.9 -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: BSD Group: Development/Languages URL: http://pecl.php.net/package/%{pecl_name} @@ -40,16 +37,16 @@ BuildRequires: tcp_wrappers-devel %endif -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-%{pecl_name} = %{version} -Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version} -Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version} +Provides: %{?scl_prefix}php-%{pecl_name} = %{version} +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} +Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release} +Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release} %if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} # Other third party repo stuff @@ -82,7 +79,7 @@ Find more information at: - http://www.indexdata.com/phpyaz - http://www.indexdata.com/yaz -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 @@ -90,7 +87,9 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO mv %{pecl_name}-%{version} NTS # Don't install/register tests -sed -e 's/role="test"/role="src"/' -i package.xml +sed -e 's/role="test"/role="src"/' \ + %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \ + -i package.xml cd NTS # Sanity check, really often broken @@ -158,14 +157,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 @@ -208,8 +217,8 @@ rm -rf %{buildroot} %files %defattr(-,root,root,-) -%doc %{pecl_docdir}/%{pecl_name} %{?_licensedir:%license NTS/LICENSE} +%doc %{pecl_docdir}/%{pecl_name} %{pecl_xmldir}/%{name}.xml %config(noreplace) %{php_inidir}/%{ini_name} @@ -222,6 +231,10 @@ rm -rf %{buildroot} %changelog +* Wed Mar 9 2016 Remi Collet - 1.1.9-2 +- adapt for F24 +- drop runtime dependency on pear, new scriptlets + * Wed Dec 24 2014 Remi Collet - 1.1.9-1.1 - Fedora 21 SCL mass rebuild @@ -230,4 +243,4 @@ rm -rf %{buildroot} - allow to run upstream test when build --with tests * Fri Oct 31 2014 Remi Collet - 1.1.8-1 -- initial package, version 1.1.8 (stable) \ No newline at end of file +- initial package, version 1.1.8 (stable) -- cgit