summaryrefslogtreecommitdiffstats
path: root/php-pecl-memprof.spec
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2014-04-10 18:55:14 +0200
committerRemi Collet <fedora@famillecollet.com>2014-04-10 18:55:14 +0200
commit9b583adcac72730c6acd4d1957bb5899a36c4948 (patch)
treefa25f5d39570374a125761bd26fae26d3a92450a /php-pecl-memprof.spec
parent496635344e6c2292efbbe7175758f2700ebbfa5c (diff)
php-pecl: add numerical prefix to extension configuration file (5)
Diffstat (limited to 'php-pecl-memprof.spec')
-rw-r--r--php-pecl-memprof.spec35
1 files changed, 28 insertions, 7 deletions
diff --git a/php-pecl-memprof.spec b/php-pecl-memprof.spec
index a2436c0..7d26b77 100644
--- a/php-pecl-memprof.spec
+++ b/php-pecl-memprof.spec
@@ -14,11 +14,16 @@
# https://github.com/arnaud-lb/php-memory-profiler/pull/7
%global with_zts 0
%global pecl_name memprof
+%if "%{php_version}" < "5.6"
+%global ini_name %{pecl_name}.ini
+%else
+%global ini_name 40-%{pecl_name}.ini
+%endif
Summary: Memory usage profiler
Name: %{?scl_prefix}php-pecl-%{pecl_name}
Version: 1.0.0
-Release: 3%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
+Release: 4%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
License: BSD
Group: Development/Languages
URL: http://pecl.php.net/package/%{pecl_name}
@@ -43,6 +48,19 @@ Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version}
Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
+%if "%{?vendor}" == "Remi Collet"
+# Other third party repo stuff
+Obsoletes: php53-pecl-%{pecl_name}
+Obsoletes: php53u-pecl-%{pecl_name}
+Obsoletes: php54-pecl-%{pecl_name}
+%if "%{php_version}" > "5.5"
+Obsoletes: php55u-pecl-%{pecl_name}
+%endif
+%if "%{php_version}" > "5.6"
+Obsoletes: php56u-pecl-%{pecl_name}
+%endif
+%endif
+
%if 0%{?fedora} < 20 && 0%{?rhel} < 7
# Filter shared private
%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$}
@@ -76,7 +94,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
@@ -108,7 +126,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
@@ -116,7 +134,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
@@ -156,16 +174,19 @@ 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
+* Thu Apr 10 2014 Remi Collet <remi@fedoraproject.org> - 1.0.0-4
+- add numerical prefix to extension configuration file
+
* Tue Oct 22 2013 Remi Collet <remi@fedoraproject.org> - 1.0.0-3
- install doc in pecl doc_dir
@@ -175,4 +196,4 @@ rm -rf %{buildroot}
* Sun Oct 6 2013 Remi Collet <remi@fedoraproject.org> - 1.0.0-1
- initial package, version 1.0.0 (stable)
- open https://github.com/arnaud-lb/php-memory-profiler/pull/6
-- open https://github.com/arnaud-lb/php-memory-profiler/pull/7
+- open https://github.com/arnaud-lb/php-memory-profiler/pull/7 \ No newline at end of file