diff options
| -rw-r--r-- | php-pecl-stats.spec | 46 | 
1 files changed, 41 insertions, 5 deletions
diff --git a/php-pecl-stats.spec b/php-pecl-stats.spec index 384aa49..9e5c751 100644 --- a/php-pecl-stats.spec +++ b/php-pecl-stats.spec @@ -6,8 +6,9 @@  #  # Please, preserve the changelog entries  # -%{!?php_inidir:  %{expand: %%global php_inidir  %{_sysconfdir}/php.d}} -%{!?__pecl:      %{expand: %%global __pecl      %{_bindir}/pecl}} +%{!?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 stats @@ -15,7 +16,7 @@  Summary:        Routines for statistical computation  Name:           php-pecl-%{pecl_name}  Version:        1.0.3 -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;')}  License:        PHP  Group:          Development/Languages  URL:            http://pecl.php.net/package/%{pecl_name} @@ -39,9 +40,26 @@ Provides:       php-%{pecl_name}%{?_isa} = %{version}  Provides:       php-pecl(%{pecl_name}) = %{version}  Provides:       php-pecl(%{pecl_name})%{?_isa} = %{version} -# Filter shared private +%if "%{?vendor}" == "Remi Collet" +# Other third party repo stuff +%if "%{php_version}" > "5.4" +Obsoletes:     php53-pecl-%{pecl_name} +Obsoletes:     php53u-pecl-%{pecl_name} +Obsoletes:     php54-pecl-%{pecl_name} +%endif +%if "%{php_version}" > "5.5" +Obsoletes:     php55u-pecl-%{pecl_name} +%endif +%if "%{php_version}" > "5.6" +Obsoletes:     php56u-pecl-%{pecl_name} +%endif +%endif + +%if 0%{?fedora} < 20 +# Filter private shared object  %{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$}  %{?filter_setup} +%endif  %description @@ -53,6 +71,10 @@ Extension that provides few dozens routines for statistical computation.  mv %{pecl_name}-%{version} NTS  cd NTS + +# empty this file which try to dl("stats.so") +> tests/common.php +  cp %{SOURCE1} LICENSE  # Fix version @@ -115,6 +137,15 @@ make -C ZTS install INSTALL_ROOT=%{buildroot}  install -D -m 644 %{pecl_name}.ini %{buildroot}%{php_ztsinidir}/%{pecl_name}.ini  %endif +# Test & 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 || : @@ -163,7 +194,8 @@ rm -rf %{buildroot}  %files  %defattr(-,root,root,-) -%doc NTS/{LICENSE,CREDITS} +%doc %{pecl_docdir}/%{pecl_name} +%doc %{pecl_testdir}/%{pecl_name}  %{pecl_xmldir}/%{name}.xml  %config(noreplace) %{php_inidir}/%{pecl_name}.ini  %{php_extdir}/%{pecl_name}.so @@ -175,5 +207,9 @@ rm -rf %{buildroot}  %changelog +* Fri Mar 14 2014 Remi Collet <remi@fedoraproject.org> - 1.0.3-2 +- install doc in pecl_docdir +- install tests in pecl_testdir +  * Fri Oct 11 2013 Remi Collet <remi@fedoraproject.org> - 1.0.3-1  - initial package, version 1.0.3 (stable)  | 
