diff options
-rw-r--r-- | php-pecl-xattr.spec | 50 |
1 files changed, 43 insertions, 7 deletions
diff --git a/php-pecl-xattr.spec b/php-pecl-xattr.spec index 6491531..3befadb 100644 --- a/php-pecl-xattr.spec +++ b/php-pecl-xattr.spec @@ -6,22 +6,25 @@ # # 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 xattr +%global with_zts 0%{?__ztsphp:1} Summary: Extended attributes Name: php-pecl-%{pecl_name} Version: 1.2.0 -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} Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz # https://bugs.php.net/65842 Please Provides LICENSE file +# URL from xattr.c headers +Source1: http://www.php.net/license/3_0.txt BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: php-devel @@ -38,9 +41,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 +73,8 @@ support them. Requires libattr from Linux XFS project. mv %{pecl_name}-%{version} NTS cd NTS +cp %{SOURCE1} LICENSE + # http://svn.php.net/viewvc?view=revision&revision=331704 sed -e 's:/lib:/$PHP_LIBDIR:' -i config.m4 @@ -109,10 +131,18 @@ install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml %if %{with_zts} 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 || : @@ -144,7 +174,8 @@ rm -rf %{buildroot} %files %defattr(-,root,root,-) -%doc NTS/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 @@ -156,5 +187,10 @@ rm -rf %{buildroot} %changelog +* Fri Mar 14 2014 Remi Collet <remi@fedoraproject.org> - 1.2.0-2 +- install doc in pecl_docdir +- install tests in pecl_testdir +- add missing License file + * Sun Oct 6 2013 Remi Collet <remi@fedoraproject.org> - 1.2.0-1 - initial package |