summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2014-04-16 14:10:03 +0200
committerRemi Collet <fedora@famillecollet.com>2014-04-16 14:10:03 +0200
commitc744c554ab2c0b1f418544937f99281d67ba12e0 (patch)
tree8338ea48431898a16dd940087cf23aff9c7da704
parent43fcc15820bfc8debc5168c491fc5aece46cf228 (diff)
php-pecl: add numerical prefix to extension configuration file (more)
-rw-r--r--php-pecl-mosquitto.spec22
1 files changed, 15 insertions, 7 deletions
diff --git a/php-pecl-mosquitto.spec b/php-pecl-mosquitto.spec
index 9196e47..974794d 100644
--- a/php-pecl-mosquitto.spec
+++ b/php-pecl-mosquitto.spec
@@ -14,11 +14,16 @@
%global with_zts 0%{?__ztsphp:1}
%global pecl_name mosquitto
%global proj_name Mosquitto
+%if "%{php_version}" < "5.6"
+%global ini_name %{pecl_name}.ini
+%else
+%global ini_name 40-%{pecl_name}.ini
+%endif
Summary: Extension for libmosquitto
Name: %{?scl_prefix}php-pecl-%{pecl_name}
Version: 0.2.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://pecl.php.net/package/%{proj_name}
@@ -85,7 +90,7 @@ cp -pr NTS ZTS
%endif
# Create configuration file
-cat << 'EOF' | tee %{pecl_name}.ini
+cat << 'EOF' | tee %{ini_name}
; Enable %{summary}
extension=%{pecl_name}.so
@@ -116,7 +121,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
@@ -124,7 +129,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
# Test & Documentation
@@ -167,15 +172,18 @@ 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 <remi@fedoraproject.org> - 0.2.1-2
+- add numerical prefix to extension configuration file
+
* Wed Dec 11 2013 Remi Collet <remi@fedoraproject.org> - 0.2.1-1
-- initial package, version 0.2.1 (alpha)
+- initial package, version 0.2.1 (alpha) \ No newline at end of file