[php-pecl-ncurses] add numerical prefix to extension configuration file
Remi Collet
remi at fedoraproject.org
Thu Apr 24 06:47:28 UTC 2014
commit 92c94e41a3f85635e0121d3dd31ea5243e4f0abe
Author: Remi Collet <remi at fedoraproject.org>
Date: Thu Apr 24 08:47:18 2014 +0200
add numerical prefix to extension configuration file
php-pecl-ncurses.spec | 34 +++++++++++++++++++++++++---------
1 files changed, 25 insertions(+), 9 deletions(-)
---
diff --git a/php-pecl-ncurses.spec b/php-pecl-ncurses.spec
index 782c6a5..4ec0c15 100644
--- a/php-pecl-ncurses.spec
+++ b/php-pecl-ncurses.spec
@@ -10,13 +10,18 @@
%{!?__pecl: %global __pecl %{_bindir}/pecl}
%{!?__php: %global __php %{_bindir}/php}
-%global pecl_name ncurses
-%global with_zts 0%{?__ztsphp:1}
+%global pecl_name ncurses
+%global with_zts 0%{?__ztsphp:1}
+%if 0%{?fedora} < 21
+%global ini_name %{pecl_name}.ini
+%else
+%global ini_name 40-%{pecl_name}.ini
+%endif
Summary: Terminal screen handling and optimization package
Name: php-pecl-ncurses
Version: 1.0.2
-Release: 6%{?dist}
+Release: 7%{?dist}
License: PHP
Group: Development/Languages
URL: http://pecl.php.net/package/ncurses
@@ -43,7 +48,7 @@ Provides: php-pecl(%{pecl_name}) = %{version}
Provides: php-pecl(%{pecl_name})%{?_isa} = %{version}
-%if 0%{?fedora} < 20
+%if 0%{?fedora} < 20 && 0%{?rhel} < 7
# Filter shared private
%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$}
%{?filter_setup}
@@ -64,7 +69,7 @@ line.
%prep
%setup -c -q
-cat >%{pecl_name}.ini << 'EOF'
+cat >%{ini_name} << 'EOF'
; Enable %{pecl_name} extension module
extension=%{pecl_name}.so
EOF
@@ -101,11 +106,11 @@ make -C NTS install INSTALL_ROOT=%{buildroot}
install -Dpm 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
# install config file
-install -Dpm 644 %{pecl_name}.ini %{buildroot}%{php_inidir}/%{pecl_name}.ini
+install -Dpm 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
%if %{with_zts}
make -C ZTS install INSTALL_ROOT=%{buildroot}
-install -Dpm 644 %{pecl_name}.ini %{buildroot}%{php_ztsinidir}/%{pecl_name}.ini
+install -Dpm 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
%endif
# Test & Documentation
@@ -119,6 +124,10 @@ done
%check
cd NTS
+: Minimal load test for NTS extension
+%{__php} --no-php-ini \
+ --define extension=%{buildroot}/%{php_extdir}/%{pecl_name}.so \
+ --modules | grep -i %{pecl_name}
TEST_PHP_EXECUTABLE=%{__php} \
REPORT_EXIT_STATUS=1 \
@@ -130,6 +139,10 @@ NO_INTERACTION=1 \
%if %{with_zts}
cd ../ZTS
+: Minimal load test for ZTS extension
+%{__ztsphp} --no-php-ini \
+ --define extension=%{buildroot}/%{php_ztsextdir}/%{pecl_name}.so \
+ --modules | grep -i %{pecl_name}
TEST_PHP_EXECUTABLE=%{__ztsphp} \
REPORT_EXIT_STATUS=1 \
@@ -154,16 +167,19 @@ fi
%files
%doc %{pecl_docdir}/%{pecl_name}
%doc %{pecl_testdir}/%{pecl_name}
-%config(noreplace) %{php_inidir}/%{pecl_name}.ini
+%config(noreplace) %{php_inidir}/%{ini_name}
%{php_extdir}/%{pecl_name}.so
%{pecl_xmldir}/%{name}.xml
%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 24 2014 Remi Collet <rcollet at redhat.com> - 1.2.0-7
+- add numerical prefix to extension configuration file
+
* Sat Mar 8 2014 Remi Collet <remi at fedoraproject.org> - 1.0.2-6
- cleanups
- install doc in pecl_docdir
More information about the scm-commits
mailing list