diff options
Diffstat (limited to 'php-pecl-zookeeper.spec')
-rw-r--r-- | php-pecl-zookeeper.spec | 41 |
1 files changed, 35 insertions, 6 deletions
diff --git a/php-pecl-zookeeper.spec b/php-pecl-zookeeper.spec index eee3cee..4b2e354 100644 --- a/php-pecl-zookeeper.spec +++ b/php-pecl-zookeeper.spec @@ -6,16 +6,17 @@ # # 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 zookeeper +%global with_zts 0%{?__ztsphp:1} Summary: PHP extension for interfacing with Apache ZooKeeper Name: php-pecl-%{pecl_name} Version: 0.2.2 -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://github.com/andreiz/php-zookeeper @@ -36,9 +37,24 @@ 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 +Obsoletes: php53-pecl-%{pecl_name} +Obsoletes: php53u-pecl-%{pecl_name} +Obsoletes: php54-pecl-%{pecl_name} +%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 @@ -49,6 +65,9 @@ This extension provides API for communicating with ZooKeeper service. %setup -q -c mv %{pecl_name}-%{version} NTS +# https://github.com/andreiz/php-zookeeper/issues/31 +sed -e '/examples/s/role="php"/role="doc"/' -i package.xml + cd NTS # https://github.com/andreiz/php-zookeeper/issues/27 sed -e 's:/lib:/$PHP_LIBDIR:' -i config.m4 @@ -118,6 +137,12 @@ 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="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 || : @@ -151,8 +176,9 @@ rm -rf %{buildroot} %files %defattr(-,root,root,-) -%doc NTS/{LICENSE,CREDITS,README.markdown,examples} +%doc %{pecl_docdir}/%{pecl_name} %{pecl_xmldir}/%{name}.xml + %config(noreplace) %{php_inidir}/%{pecl_name}.ini %{php_extdir}/%{pecl_name}.so @@ -163,5 +189,8 @@ rm -rf %{buildroot} %changelog +* Sat Mar 15 2014 Remi Collet <remi@fedoraproject.org> - 0.2.2-2 +- install doc in pecl_docdir + * Sun Oct 6 2013 Remi Collet <remi@fedoraproject.org> - 0.2.2-1 - initial package, version 0.2.2 (beta) |