diff options
| author | Remi Collet <fedora@famillecollet.com> | 2014-04-16 14:10:03 +0200 | 
|---|---|---|
| committer | Remi Collet <fedora@famillecollet.com> | 2014-04-16 14:10:03 +0200 | 
| commit | e04ddd4ae347a3ee0a2ab6105e97d209a17d1da3 (patch) | |
| tree | 5d72e773f5b8078f115b82210a883445bd50f44d | |
| parent | 03472599040ffd01f774ac2788c58bd2fa905b62 (diff) | |
php-pecl: add numerical prefix to extension configuration file (more)
| -rw-r--r-- | php-pecl-lzf.spec | 51 | 
1 files changed, 34 insertions, 17 deletions
diff --git a/php-pecl-lzf.spec b/php-pecl-lzf.spec index b6b93a8..8dac8cb 100644 --- a/php-pecl-lzf.spec +++ b/php-pecl-lzf.spec @@ -4,11 +4,17 @@  %{!?__php:       %global __php       %{_bindir}/php}  %define pecl_name   LZF +%define  ext_name   lzf  %global with_zts    0%{?__ztsphp:1} +%if "%{php_version}" < "5.6" +%global ini_name    %{ext_name}.ini +%else +%global ini_name    40-%{ext_name}.ini +%endif  Name:           %{?scl_prefix}php-pecl-lzf  Version:        1.6.2 -Release:        8%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} +Release:        9%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}  Summary:        Extension to handle LZF de/compression  Group:          Development/Languages  License:        PHP @@ -33,21 +39,21 @@ Requires:       %{?scl_prefix}php(api) = %{php_core_api}  Requires(post): %{__pecl}  Requires(postun): %{__pecl} -Provides:       %{?scl_prefix}php-lzf = %{version} -Provides:       %{?scl_prefix}php-lzf%{?_isa} = %{version} +Provides:       %{?scl_prefix}php-%{ext_name} = %{version} +Provides:       %{?scl_prefix}php-%{ext_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-lzf -Obsoletes:      php53u-pecl-lzf -Obsoletes:      php54-pecl-lzf +Obsoletes:      php53-pecl-%{ext_name} +Obsoletes:      php53u-pecl-%{ext_name} +Obsoletes:      php54-pecl-%{ext_name}  %if "%{php_version}" > "5.5" -Obsoletes:      php55u-pecl-lzf +Obsoletes:      php55u-pecl-%{ext_name}  %endif  %if "%{php_version}" > "5.6" -Obsoletes:      php56u-pecl-lzf +Obsoletes:      php56u-pecl-%{ext_name}  %endif  %endif @@ -87,7 +93,7 @@ cd ..  cp -r NTS ZTS  %endif -cat >lzf.ini << 'EOF' +cat >%{ini_name} << 'EOF'  ; Enable %{pecl_name} extension module  extension=lzf.so  EOF @@ -114,14 +120,14 @@ rm -rf %{buildroot}  make install -C NTS INSTALL_ROOT=%{buildroot}  # Drop in the bit of configuration -install -D -m 644 lzf.ini %{buildroot}%{php_inidir}/lzf.ini +install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}  # Install XML package description  install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml  %if %{with_zts}  make install -C ZTS INSTALL_ROOT=%{buildroot} -install -D -m 644 lzf.ini %{buildroot}%{php_ztsinidir}/lzf.ini +install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}  %endif  # Test & Documentation @@ -136,16 +142,24 @@ done  %check  cd NTS +: Minimal load test for NTS extension +%{__php} --no-php-ini \ +    --define extension=%{buildroot}/%{php_extdir}/%{ext_name}.so \ +    --modules | grep -i %{ext_name}  TEST_PHP_EXECUTABLE=%{__php} \  REPORT_EXIT_STATUS=1 \  NO_INTERACTION=1 \  %{__php} run-tests.php \      -n -q \ -    -d extension=%{buildroot}%{php_extdir}/lzf.so +    -d extension=%{buildroot}%{php_extdir}/%{ext_name}.so  %if %{with_zts}  cd ../ZTS +: Minimal load test for ZTS extension +%{__ztsphp} --no-php-ini \ +    --define extension=%{buildroot}/%{php_ztsextdir}/%{ext_name}.so \ +    --modules | grep %{ext_name}  TEST_PHP_EXECUTABLE=%{__ztsphp} \  REPORT_EXIT_STATUS=1 \ @@ -153,7 +167,7 @@ NO_INTERACTION=1 \  %{__ztsphp} run-tests.php \      -n -q \      -d extension_dir=modules \ -    -d extension=%{buildroot}%{php_ztsextdir}/lzf.so +    -d extension=%{buildroot}%{php_ztsextdir}/%{ext_name}.so  %endif  %clean @@ -174,16 +188,19 @@ fi  %defattr(-,root,root,-)  %doc %{pecl_docdir}/%{pecl_name}  %doc %{pecl_testdir}/%{pecl_name} -%config(noreplace) %{php_inidir}/lzf.ini -%{php_extdir}/lzf.so +%config(noreplace) %{php_inidir}/%{ini_name} +%{php_extdir}/%{ext_name}.so  %{pecl_xmldir}/%{name}.xml  %if %{with_zts} -%config(noreplace) %{php_ztsinidir}/lzf.ini -%{php_ztsextdir}/lzf.so +%config(noreplace) %{php_ztsinidir}/%{ini_name} +%{php_ztsextdir}/%{ext_name}.so  %endif  %changelog +* Wed Apr 16 2014 Remi Collet <remi@fedoraproject.org> - 1.6.2-9 +- add numerical prefix to extension configuration file +  * Wed Mar 19 2014 Remi Collet <remi@fedoraproject.org> - 1.6.2-8  - allow SCL build  | 
