From 6adc3051b135345c5d09152183499a8d2b3b40a4 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 9 Apr 2014 19:33:42 +0200 Subject: php-pecl: add numerical prefix to extension configuration file (4) --- php-pecl-geoip.spec | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/php-pecl-geoip.spec b/php-pecl-geoip.spec index d332600..85818d1 100644 --- a/php-pecl-geoip.spec +++ b/php-pecl-geoip.spec @@ -5,10 +5,16 @@ %define pecl_name geoip %global with_zts 0%{?__ztsphp:1} +%if "%{php_version}" < "5.6" +%global ini_name %{pecl_name}.ini +%else +%global ini_name 40-%{pecl_name}.ini +%endif + Name: %{?scl_prefix}php-pecl-geoip Version: 1.0.8 -Release: 7%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} +Release: 8%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} Summary: Extension to map IP addresses to geographic places Group: Development/Languages License: PHP @@ -82,7 +88,7 @@ if test "x${extver}" != "x%{version}"; then fi cd .. -cat > %{pecl_name}.ini << 'EOF' +cat > %{ini_name} << 'EOF' ; Enable %{pecl_name} extension module extension=%{pecl_name}.so EOF @@ -113,14 +119,14 @@ make -C NTS install INSTALL_ROOT=%{buildroot} %if %{with_zts} make -C ZTS install INSTALL_ROOT=%{buildroot} -install -Dpm644 %{pecl_name}.ini %{buildroot}%{php_ztsinidir}/%{pecl_name}.ini +install -Dpm644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} %endif # Install XML package description install -Dpm 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml # install config file -install -Dpm644 %{pecl_name}.ini %{buildroot}%{php_inidir}/%{pecl_name}.ini +install -Dpm644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} # Test & Documentation for i in $(grep 'role="test"' package.xml | sed -e 's/^.*name="//;s/".*$//') @@ -171,16 +177,19 @@ fi %defattr(-,root,root,-) %doc %{pecl_docdir}/%{pecl_name} %doc %{pecl_testdir}/%{pecl_name} -%config(noreplace) %{php_inidir}/%{pecl_name}.ini +%config(noreplace) %{php_inidir}/%{ini_name} %{php_extdir}/%{pecl_name}.so %{pecl_xmldir}/%{name}.xml %if %{with_zts} %{php_ztsextdir}/%{pecl_name}.so -%config(noreplace) %{php_ztsinidir}/%{pecl_name}.ini +%config(noreplace) %{php_ztsinidir}/%{ini_name} %endif %changelog +* Wed Apr 9 2014 Remi Collet - 1.0.8-8 +- add numerical prefix to extension configuration file + * Wed Mar 19 2014 Remi Collet - 1.0.8-7 - allow SCL build -- cgit