From 313b3091ebf58a41beb48bc48c1aa7c8bffba819 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 16 Apr 2014 16:18:29 +0200 Subject: php-pecl: add numerical prefix to extension configuration file (more) --- php-pecl-rar.spec | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/php-pecl-rar.spec b/php-pecl-rar.spec index e284ad6..89aabc6 100644 --- a/php-pecl-rar.spec +++ b/php-pecl-rar.spec @@ -6,16 +6,22 @@ # # Please, preserve the changelog entries # -%{!?php_inidir: %{expand: %%global php_inidir %{_sysconfdir}/php.d}} -%{!?__pecl: %{expand: %%global __pecl %{_bindir}/pecl}} +%{!?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 rar +%if "%{php_version}" < "5.6" +%global ini_name %{pecl_name}.ini +%else +%global ini_name 40-%{pecl_name}.ini +%endif Summary: PHP extension for reading RAR archives Name: php-pecl-%{pecl_name} Version: 3.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 and Freeware with further limitations Group: Development/Languages URL: http://pecl.php.net/package/%{pecl_name} @@ -72,7 +78,7 @@ cp -pr NTS ZTS %endif # Create configuration file -cat > %{pecl_name}.ini << 'EOF' +cat > %{ini_name} << 'EOF' ; Enable %{pecl_name} extension module extension=%{pecl_name}.so EOF @@ -104,7 +110,7 @@ rm -rf %{buildroot} make -C NTS install INSTALL_ROOT=%{buildroot} # install config file -install -D -m 644 %{pecl_name}.ini %{buildroot}%{php_inidir}/%{pecl_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 @@ -112,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 %{pecl_name}.ini %{buildroot}%{php_ztsinidir}/%{pecl_name}.ini +install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} %endif # Documentation @@ -171,17 +177,20 @@ rm -rf %{buildroot} %defattr(-,root,root,-) %doc %{pecl_docdir}/%{pecl_name} %{pecl_xmldir}/%{name}.xml -%config(noreplace) %{php_inidir}/%{pecl_name}.ini +%config(noreplace) %{php_inidir}/%{ini_name} %{php_extdir}/%{pecl_name}.so %if %{with_zts} -%config(noreplace) %{php_ztsinidir}/%{pecl_name}.ini +%config(noreplace) %{php_ztsinidir}/%{ini_name} %{php_ztsextdir}/%{pecl_name}.so %endif %changelog +* Wed Apr 16 2014 Remi Collet - 3.0.2-2 +- add numerical prefix to extension configuration file (php 5.6) + * Mon Oct 14 2013 Remi Collet - 3.0.2-1 - initial package, version 3.0.2 (stable) - bundled unrar to version 4.2.4 -- doc in pecl doc_dir +- doc in pecl doc_dir \ No newline at end of file -- cgit