summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2014-04-09 10:08:10 +0200
committerRemi Collet <fedora@famillecollet.com>2014-04-09 10:08:10 +0200
commitbe38b80aea0e45f75de5f3ebc4baa9affaca2a27 (patch)
tree838a246aeac4769460274c634bd78c57c87ffa91
parentded66bf375938927a21a5cecb08a4ca40af100b8 (diff)
php-pecl: add numerical prefix to extension configuration file
-rw-r--r--php-pecl-zip.spec22
1 files changed, 16 insertions, 6 deletions
diff --git a/php-pecl-zip.spec b/php-pecl-zip.spec
index 14e2434..34abdad 100644
--- a/php-pecl-zip.spec
+++ b/php-pecl-zip.spec
@@ -7,17 +7,24 @@
# Please, preserve the changelog entries
#
%global pecl_name zip
+
%if 0%{?fedora} >= 20
%global with_libzip 1
%else
%global with_libzip 0
%endif
+%if "%{php_version}" < "5.6"
+%global ini_name %{pecl_name}.ini
+%else
+%global ini_name 40-%{pecl_name}.ini
+%endif
+
Summary: A ZIP archive management extension
Summary(fr): Une extension de gestion des ZIP
Name: php-pecl-zip
Version: 1.12.4
-Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}.1
+Release: 2%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
%if %{with_libzip}
License: PHP
%else
@@ -84,7 +91,7 @@ rm -r lib
cd ..
: Create the configuration file
-cat >%{pecl_name}.ini << 'EOF'
+cat >%{ini_name} << 'EOF'
; Enable ZIP extension module
extension=%{pecl_name}.so
EOF
@@ -121,13 +128,13 @@ make %{?_smp_mflags}
rm -rf %{buildroot}
make -C %{pecl_name}-%{version} install INSTALL_ROOT=%{buildroot}
-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
make -C %{pecl_name}-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}
# Test & Documentation
cd %{pecl_name}-%{version}
@@ -190,13 +197,16 @@ fi
%doc %{pecl_docdir}/%{pecl_name}
%doc %{pecl_testdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml
-%config(noreplace) %{php_inidir}/%{pecl_name}.ini
+%config(noreplace) %{php_inidir}/%{ini_name}
%{php_extdir}/%{pecl_name}.so
-%config(noreplace) %{php_ztsinidir}/%{pecl_name}.ini
+%config(noreplace) %{php_ztsinidir}/%{ini_name}
%{php_ztsextdir}/%{pecl_name}.so
%changelog
+* Wed Apr 9 2014 Remi Collet <remi@fedoraproject.org> - 1.12.4-2
+- add numerical prefix to extension configuration file
+
* Wed Jan 29 2014 Remi Collet <remi@fedoraproject.org> - 1.12.4-1
- Update to 1.12.4 (stable) for libzip 0.11.2