From 6af8b95932f54f4bd1a53d507d5932682ba1aebd Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 25 Mar 2014 18:04:04 +0100 Subject: php-pecl-leveldb: allow SCL build --- php-pecl-leveldb.spec | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) (limited to 'php-pecl-leveldb.spec') diff --git a/php-pecl-leveldb.spec b/php-pecl-leveldb.spec index 3bb2102..4f66da6 100644 --- a/php-pecl-leveldb.spec +++ b/php-pecl-leveldb.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-ssdeep} +%{!?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 leveldb Summary: LevelDB PHP bindings -Name: php-pecl-%{pecl_name} +Name: %{?scl_prefix}php-pecl-%{pecl_name} Version: 0.1.4 -Release: 2%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} +Release: 3%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} License: BSD Group: Development/Languages URL: http://pecl.php.net/package/%{pecl_name} @@ -31,19 +33,19 @@ Patch0: %{pecl_name}-config.patch # See : leveldb bug (assert enabeld in prod) # https://bugzilla.redhat.com/show_bug.cgi?id=1000777 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 BuildRequires: leveldb-devel Requires(post): %{__pecl} Requires(postun): %{__pecl} -Requires: php(zend-abi) = %{php_zend_api} -Requires: php(api) = %{php_core_api} +Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} +Requires: %{?scl_prefix}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} +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 @@ -154,16 +156,16 @@ fi %check : Minimal load test for NTS extension cd NTS -php --no-php-ini \ +%{__php} --no-php-ini \ --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ --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_dir=$PWD/modules -d extension=%{pecl_name}.so" \ NO_INTERACTION=1 \ REPORT_EXIT_STATUS=0 \ -%{_bindir}/php -n run-tests.php +%{__php} -n run-tests.php %if %{with_zts} : Minimal load test for ZTS extension @@ -201,6 +203,9 @@ rm -rf %{buildroot} %changelog +* Tue Mar 25 2014 Remi Collet - 0.1.4-3 +- allow SCL build + * Mon Mar 17 2014 Remi Collet - 0.1.4-2 - install doc in pecl_docdir - install tests in pecl_testdir -- cgit