diff options
| author | Remi Collet <fedora@famillecollet.com> | 2016-03-08 15:13:04 +0100 | 
|---|---|---|
| committer | Remi Collet <fedora@famillecollet.com> | 2016-03-08 15:13:04 +0100 | 
| commit | 5c758bc5bde231445cc1e7251a3b3b03988bbb95 (patch) | |
| tree | e8210b1f31c285a368d9090b22398effdbd2d1fb | |
| parent | 99aa0cca5236434e521c7286d9b43ff777e3ce17 (diff) | |
php-pecl-protocolbuffers: F24
| -rw-r--r-- | php-pecl-protocolbuffers.spec | 55 | 
1 files changed, 36 insertions, 19 deletions
| diff --git a/php-pecl-protocolbuffers.spec b/php-pecl-protocolbuffers.spec index dd6337a..f31b63c 100644 --- a/php-pecl-protocolbuffers.spec +++ b/php-pecl-protocolbuffers.spec @@ -1,4 +1,4 @@ -# spec file for php-pecl-protocolbuffers +# remirepo spec file for php-pecl-protocolbuffers  #  # Copyright (c) 2014-2016 Remi Collet  # License: CC-BY-SA @@ -7,9 +7,6 @@  # Please, preserve the changelog entries  #  %{?scl:          %scl_package        php-pecl-protocolbuffers} -%{!?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 protocolbuffers @@ -22,7 +19,7 @@  Summary:        Protocol buffers in PHP  Name:           %{?scl_prefix}php-pecl-%{pecl_name}  Version:        0.2.6 -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:        BSD  Group:          Development/Languages  URL:            http://pecl.php.net/package/%{pecl_name} @@ -32,16 +29,16 @@ BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)  BuildRequires:  %{?scl_prefix}php-devel > 5.2  BuildRequires:  %{?scl_prefix}php-pear -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 @@ -75,11 +72,18 @@ to and from a variety of data streams and using a variety of languages.  You can even update your data structure without breaking deployed programs that  are compiled against the "old" format. +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  sed -e '/PHP_PROTOCOLBUFFERS_VERSION/s/0.2.5/0.2.6/' -i php_protocolbuffers.h @@ -140,23 +144,30 @@ make -C ZTS install INSTALL_ROOT=%{buildroot}  install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}  %endif -# Test & Documentation -for i in $(grep 'role="test"' package.xml | sed -e 's/^.*name="//;s/".*$//') -do install -Dpm 644 NTS/$i %{buildroot}%{pecl_testdir}/%{pecl_name}/$i -done +# Documentation  for i in $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//')  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 @@ -195,8 +206,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}  %{php_extdir}/%{pecl_name}.so @@ -208,6 +219,12 @@ rm -rf %{buildroot}  %changelog +* Tue Mar  8 2016 Remi Collet <remi@fedoraproject.org> - 0.2.6-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> - 0.2.6-2.1  - Fedora 21 SCL mass rebuild @@ -232,4 +249,4 @@ rm -rf %{buildroot}  - Update to 0.2.1 (alpha)  * Sun Jan 26 2014 Remi Collet <remi@fedoraproject.org> - 0.2.0-1 -- initial package, version 0.2.0 (alpha)
\ No newline at end of file +- initial package, version 0.2.0 (alpha) | 
