diff options
Diffstat (limited to 'php-pecl-riak.spec')
-rw-r--r-- | php-pecl-riak.spec | 59 |
1 files changed, 35 insertions, 24 deletions
diff --git a/php-pecl-riak.spec b/php-pecl-riak.spec index cc61054..b77273e 100644 --- a/php-pecl-riak.spec +++ b/php-pecl-riak.spec @@ -1,4 +1,4 @@ -# spec file for php-pecl-riak +# remirepo spec file for php-pecl-riak # # Copyright (c) 2013-2016 Remi Collet # License: CC-BY-SA @@ -7,9 +7,6 @@ # Please, preserve the changelog entries # %{?scl: %scl_package php-pecl-riak} -%{!?php_inidir: %global php_inidir %{_sysconfdir}/php.d} -%{!?__pecl: %global __pecl %{_bindir}/pecl} -%{!?__php: %global __php %{_bindir}/php} ############################# ## TODO ## @@ -31,7 +28,7 @@ Summary: Riak database PHP extension Name: %{?scl_prefix}php-pecl-%{pecl_name} Version: 1.2.0 -Release: 2%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}.1 +Release: 3%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} License: ASL 2.0 and BSD Group: Development/Languages URL: http://pecl.php.net/package/%{pecl_name} @@ -42,23 +39,17 @@ BuildRequires: %{?scl_prefix}php-devel > 5.3 BuildRequires: %{?scl_prefix}php-pear 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} -%if "%{php_version}" < "5.4" -# php 5.3.3 in EL-6 don't use arched virtual provides -# so only requires real packages instead -Requires: %{?scl_prefix}php-common%{?_isa} -%else Requires: %{?scl_prefix}php-json%{?_isa} -%endif %{?_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 @@ -86,11 +77,18 @@ Obsoletes: php56w-pecl-%{pecl_name} <= %{version} %description Fast protocol buffers client for Riak database and session module. +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 +# Don't install/register tests +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 @@ -164,24 +162,31 @@ make -C ZTS \ install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} %endif -# Test & Documentation +# Documentation cd NTS -for i in $(grep 'role="test"' ../package.xml | sed -e 's/^.*name="//;s/".*$//') -do install -Dpm 644 $i %{buildroot}%{pecl_testdir}/%{pecl_name}/$i -done for i in $(grep 'role="doc"' ../package.xml | sed -e 's/^.*name="//;s/".*$//') do install -Dpm 644 $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 @@ -217,8 +222,8 @@ rm -rf %{buildroot} %files %defattr(-,root,root,-) +%{?_licensedir:%license NTS/LICENSE} %doc %{pecl_docdir}/%{pecl_name} -%doc %{pecl_testdir}/%{pecl_name} %{pecl_xmldir}/%{name}.xml %config(noreplace) %{php_inidir}/%{ini_name} @@ -231,6 +236,12 @@ rm -rf %{buildroot} %changelog +* Tue Mar 8 2016 Remi Collet <remi@fedoraproject.org> - 1.2.0-3 +- adapt for F24 +- drop runtime dependency on pear, new scriptlets +- fix license management +- don't install/register tests + * Wed Dec 24 2014 Remi Collet <remi@fedoraproject.org> - 1.2.0-2.1 - Fedora 21 SCL mass rebuild |