summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2014-04-16 09:58:41 +0200
committerRemi Collet <fedora@famillecollet.com>2014-04-16 09:58:41 +0200
commitc8528afbcd4878be57d9fa7eed70c30da6a43bc3 (patch)
treecca74be2a05939795d6752b51bd04783f51225b6
parent06c9659d6058a17a6bc4dcc108b51e343c49a0f3 (diff)
php-pecl: add numerical prefix to extension configuration file (more)
-rw-r--r--php-pecl-jsond.spec24
1 files changed, 16 insertions, 8 deletions
diff --git a/php-pecl-jsond.spec b/php-pecl-jsond.spec
index ddc0b0a..14f6a3f 100644
--- a/php-pecl-jsond.spec
+++ b/php-pecl-jsond.spec
@@ -12,13 +12,18 @@
%{!?__pecl: %global __pecl %{_bindir}/pecl}
%{!?__php: %global __php %{_bindir}/php}
-%global pecl_name jsond
-%global with_zts 0%{?__ztsphp:1}
+%global pecl_name jsond
+%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
Summary: JavaScript Object Notation
Name: %{?scl_prefix}php-pecl-%{pecl_name}
Version: 1.3.0
-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}
@@ -91,7 +96,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
@@ -120,7 +125,7 @@ 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
@@ -129,7 +134,7 @@ install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
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
# Test & Documentation
@@ -190,11 +195,11 @@ rm -rf %{buildroot}
%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
@@ -210,5 +215,8 @@ rm -rf %{buildroot}
%changelog
+* Wed Apr 16 2014 Remi Collet <remi@fedoraproject.org> - 1.3.0-2
+- add numerical prefix to extension configuration file
+
* Fri Sep 27 2013 Remi Collet <remi@fedoraproject.org> - 1.3.0-1
- initial package, version 1.3.0 (beta) \ No newline at end of file