From 70b204480253f7d17529b3d23e373ad91e87f812 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 17 Apr 2014 15:56:52 +0200 Subject: php-pecl: add numerical prefix to extension configuration file (more) --- php-twig-ctwig.spec | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/php-twig-ctwig.spec b/php-twig-ctwig.spec index 0befd54..78ec09a 100644 --- a/php-twig-ctwig.spec +++ b/php-twig-ctwig.spec @@ -15,11 +15,16 @@ %global pecl_name CTwig %global ext_name twig %global pecl_channel pear.twig-project.org +%if "%{php_version}" < "5.6" +%global ini_name %{ext_name}.ini +%else +%global ini_name 40-%{ext_name}.ini +%endif Summary: Extension to improve performance of Twig Name: %{?scl_prefix}php-twig-ctwig Version: 1.15.1 -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: BSD Group: Development/Languages URL: http://twig.sensiolabs.org @@ -77,7 +82,7 @@ cp -pr NTS ZTS %endif # Create configuration file -cat > %{ext_name}.ini << 'EOF' +cat > %{ini_name} << 'EOF' ; Enable %{pecl_name} extension module extension=%{ext_name}.so EOF @@ -105,7 +110,7 @@ rm -rf %{buildroot} make -C NTS install INSTALL_ROOT=%{buildroot} # install config file -install -D -m 644 %{ext_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 @@ -113,7 +118,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 %{ext_name}.ini %{buildroot}%{php_ztsinidir}/%{ext_name}.ini +install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} %endif # Documentation @@ -154,16 +159,19 @@ rm -rf %{buildroot} %defattr(-,root,root,-) %doc %{pear_docdir}/%{pecl_name} %{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 %changelog +* Thu Apr 17 2014 Remi Collet - 1.15.1-2 +- add numerical prefix to extension configuration file (php 5.6) + * Fri Feb 14 2014 Remi Collet - 1.15.1-1 - Update to 1.15.1 -- cgit