diff options
author | Remi Collet <fedora@famillecollet.com> | 2014-03-23 08:03:25 +0100 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2014-03-23 08:03:25 +0100 |
commit | 3643932583abe188e0ed4a299742f35f6941a489 (patch) | |
tree | 7ad0abc5e2dddc9906fdb02c4c8e82650bb1f962 | |
parent | 24f8b84abdcca76e1c5736cec41f6c02ff4c61b6 (diff) |
php-pecl-dio: allow SCL + move doc, tests
-rw-r--r-- | php-pecl-dio.spec | 66 |
1 files changed, 48 insertions, 18 deletions
diff --git a/php-pecl-dio.spec b/php-pecl-dio.spec index 5012966..ab726ba 100644 --- a/php-pecl-dio.spec +++ b/php-pecl-dio.spec @@ -6,16 +6,18 @@ # # Please, preserve the changelog entries # -%{!?php_inidir: %{expand: %%global php_inidir %{_sysconfdir}/php.d}} -%{!?__pecl: %{expand: %%global __pecl %{_bindir}/pecl}} +%{?scl: %scl_package php-pecl-dio} +%{!?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 dio +%global with_zts 0%{?__ztsphp:1} Summary: Direct I/O functions -Name: php-pecl-%{pecl_name} +Name: %{?scl_prefix}php-pecl-%{pecl_name} Version: 0.0.7 -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} @@ -32,18 +34,31 @@ Source1: http://www.php.net/license/3_01.txt Patch0: %{pecl_name}-svn.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: php-devel -BuildRequires: php-pear +BuildRequires: %{?scl_prefix}php-devel +BuildRequires: %{?scl_prefix}php-pear Requires(post): %{__pecl} Requires(postun): %{__pecl} -Requires: php(zend-abi) = %{php_zend_api} -Requires: php(api) = %{php_core_api} - -Provides: php-%{pecl_name} = %{version} -Provides: php-%{pecl_name}%{?_isa} = %{version} -Provides: php-pecl(%{pecl_name}) = %{version} -Provides: php-pecl(%{pecl_name})%{?_isa} = %{version} +Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} +Requires: %{?scl_prefix}php(api) = %{php_core_api} + +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} + +%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 && 0%{?rhel} < 7 # Filter shared private @@ -129,10 +144,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 || : @@ -152,11 +175,11 @@ cd NTS --modules | grep %{pecl_name} : Upstream test suite for NTS extension -TEST_PHP_EXECUTABLE=%{_bindir}/php \ +TEST_PHP_EXECUTABLE=%{__php} \ TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" \ NO_INTERACTION=1 \ REPORT_EXIT_STATUS=1 \ -%{_bindir}/php -n run-tests.php +%{__php} -n run-tests.php %if %{with_zts} @@ -181,8 +204,10 @@ rm -rf %{buildroot} %files %defattr(-,root,root,-) -%doc NTS/LICENSE +%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 @@ -193,5 +218,10 @@ rm -rf %{buildroot} %changelog +* Sun Mar 23 2014 Remi Collet <remi@fedoraproject.org> - 0.0.7-2 +- allow SCL build +- install doc in pecl_docdir +- install tests in pecl_testdir + * Sun Oct 6 2013 Remi Collet <remi@fedoraproject.org> - 0.0.7-1 - initial package, version 0.0.7 (beta) |