diff options
| -rw-r--r-- | php-pecl-stats.spec | 36 | 
1 files changed, 24 insertions, 12 deletions
diff --git a/php-pecl-stats.spec b/php-pecl-stats.spec index f4d2c6a..e2573f3 100644 --- a/php-pecl-stats.spec +++ b/php-pecl-stats.spec @@ -1,6 +1,6 @@  # spec file for php-pecl-stats  # -# Copyright (c) 2013-2015 Remi Collet +# Copyright (c) 2013-2016 Remi Collet  # License: CC-BY-SA  # http://creativecommons.org/licenses/by-sa/4.0/  # @@ -22,7 +22,7 @@  Summary:        Routines for statistical computation  Name:           %{?scl_prefix}php-pecl-%{pecl_name}  Version:        1.0.3 -Release:        4%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}.1 +Release:        5%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}  License:        PHP  Group:          Development/Languages  URL:            http://pecl.php.net/package/%{pecl_name} @@ -36,8 +36,6 @@ BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)  BuildRequires:  %{?scl_prefix}php-devel  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}} @@ -73,11 +71,16 @@ Obsoletes:     php56w-pecl-%{pecl_name} <= %{version}  %description  Extension that provides few dozens routines for statistical computation. +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"/' -i package.xml +  cd NTS  # empty this file which try to dl("stats.so") @@ -145,22 +148,27 @@ make -C ZTS install INSTALL_ROOT=%{buildroot}  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 LICENSE $(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 || : +# 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 @@ -202,8 +210,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 @@ -215,6 +223,10 @@ rm -rf %{buildroot}  %changelog +* Sat Jan  2 2016 Remi Collet <remi@fedoraproject.org> - 1.0.3-5 +- don't install/register tests +- drop runtime dependency on pear, new scriptlets +  * Wed Dec 24 2014 Remi Collet <remi@fedoraproject.org> - 1.0.3-4.1  - Fedora 21 SCL mass rebuild  | 
