From ffd730cd0be591a8f489b7691e0da1637d0d95cf Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 16 Apr 2014 13:36:55 +0200 Subject: php-pecl-judy: use %ini_name --- php-pecl-judy-dev.spec | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) (limited to 'php-pecl-judy-dev.spec') diff --git a/php-pecl-judy-dev.spec b/php-pecl-judy-dev.spec index 9b66dd2..ce9299c 100644 --- a/php-pecl-judy-dev.spec +++ b/php-pecl-judy-dev.spec @@ -12,14 +12,19 @@ %{!?__pecl: %global __pecl %{_bindir}/pecl} %{!?__php: %global __php %{_bindir}/php} -%global with_zts 0%{?__ztsphp:1} -%global pecl_name Judy -%global ext_name judy +%global with_zts 0%{?__ztsphp:1} +%global pecl_name Judy +%global ext_name judy +%if "%{php_version}" < "5.6" +%global ini_name %{ext_name}.ini +%else +%global ini_name 40-%{ext_name}.ini +%endif Summary: PHP Judy implements sparse dynamic arrays Name: %{?scl_prefix}php-pecl-judy Version: 1.0.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://pecl.php.net/package/%{pecl_name} @@ -114,7 +119,7 @@ cp -pr NTS ZTS %endif # Create configuration file -cat > %{pecl_name}.ini << 'EOF' +cat << 'EOF' | tee %{ini_name} ; Enable %{pecl_name} extension module extension=%{ext_name}.so EOF @@ -146,7 +151,7 @@ rm -rf %{buildroot} make -C NTS install INSTALL_ROOT=%{buildroot} # install config file -install -D -m 644 %{pecl_name}.ini %{buildroot}%{php_inidir}/%{ext_name}.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 @@ -154,7 +159,7 @@ 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}/%{ext_name}.ini +install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} %endif # Test & Documentation @@ -216,11 +221,11 @@ rm -rf %{buildroot} %doc %{pecl_docdir}/%{pecl_name} %exclude %{pecl_docdir}/%{pecl_name}/examples %{pecl_xmldir}/%{name}.xml -%config(noreplace) %{php_inidir}/%{ext_name}.ini +%config(noreplace) %{php_inidir}/%{ini_name} %{php_extdir}/%{ext_name}.so %if %{with_zts} -%config(noreplace) %{php_ztsinidir}/%{ext_name}.ini +%config(noreplace) %{php_ztsinidir}/%{ini_name} %{php_ztsextdir}/%{ext_name}.so %endif @@ -237,6 +242,10 @@ rm -rf %{buildroot} %changelog +* Wed Apr 16 2014 Remi Collet - 1.0.2-2 +- use %%{ini_name} macro +- add numerical prefix to extension configuration file + * Fri Nov 29 2013 Remi Collet - 1.0.2-1 - adapt for SCL -- cgit