summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2014-04-15 15:45:17 +0200
committerRemi Collet <fedora@famillecollet.com>2014-04-15 15:45:17 +0200
commit10765a9ef87683ff246de85925a98a8808333329 (patch)
treef496bd63ec7eca0f34116f3e587533b62ffd2eeb
parent6fc06f780668614a3377d1d3696c55ecf8ccb8f3 (diff)
php-pecl: add numerical prefix to extension configuration file (more)
-rw-r--r--php-pecl-crypto.spec34
1 files changed, 18 insertions, 16 deletions
diff --git a/php-pecl-crypto.spec b/php-pecl-crypto.spec
index b19b791..c952272 100644
--- a/php-pecl-crypto.spec
+++ b/php-pecl-crypto.spec
@@ -14,11 +14,16 @@
%global with_zts 0%{?__ztsphp:1}
%global pecl_name crypto
%global with_tests %{!?_without_tests:1}%{?_without_tests:0}
+%if "%{php_version}" < "5.6"
+%global ini_name %{pecl_name}.ini
+%else
+%global ini_name 40-%{pecl_name}.ini
+%endif
Summary: Wrapper for OpenSSL Crypto Library
Name: %{?scl_prefix}php-pecl-%{pecl_name}
Version: 0.1.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/%{pecl_name}
@@ -86,7 +91,7 @@ cp -pr NTS ZTS
%endif
# Create configuration file
-cat << 'EOF' | tee %{pecl_name}.ini
+cat << 'EOF' | tee %{ini_name}
; Enable '%{summary}' extension module
extension=%{pecl_name}.so
EOF
@@ -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
@@ -150,19 +155,13 @@ fi
cd NTS
: Minimal load test for NTS extension
%{__php} --no-php-ini \
- --define extension=modules/%{pecl_name}.so \
+ --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
--modules | grep %{pecl_name}
%if %{with_tests}
-for mod in json hash iconv propro; do
- if [ -f %{php_extdir}/${mod}.so ]; then
- modules="$modules -d extension=${mod}.so"
- fi
-done
-
: Upstream test suite for NTS extension
TEST_PHP_EXECUTABLE=%{__php} \
-TEST_PHP_ARGS="-n $modules -d extension=$PWD/modules/%{pecl_name}.so" \
+TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" \
NO_INTERACTION=1 \
REPORT_EXIT_STATUS=1 \
%{__php} -n run-tests.php
@@ -172,13 +171,13 @@ REPORT_EXIT_STATUS=1 \
cd ../ZTS
: Minimal load test for ZTS extension
%{__ztsphp} --no-php-ini \
- --define extension=modules/%{pecl_name}.so \
+ --define extension=%{buildroot}%{php_ztsextdir}//%{pecl_name}.so \
--modules | grep %{pecl_name}
%if %{with_tests}
: Upstream test suite for ZTS extension
TEST_PHP_EXECUTABLE=%{__ztsphp} \
-TEST_PHP_ARGS="-n $modules -d extension=$PWD/modules/%{pecl_name}.so" \
+TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" \
NO_INTERACTION=1 \
REPORT_EXIT_STATUS=1 \
%{__ztsphp} -n run-tests.php
@@ -195,17 +194,20 @@ rm -rf %{buildroot}
%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
%if %{with_zts}
-%config(noreplace) %{php_ztsinidir}/%{pecl_name}.ini
+%config(noreplace) %{php_ztsinidir}/%{ini_name}
%{php_ztsextdir}/%{pecl_name}.so
%endif
%changelog
+* Tue Apr 15 2014 Remi Collet <remi@fedoraproject.org> - 0.1.1-2
+- add numerical prefix to extension configuration file
+
* Sat Jan 04 2014 Remi Collet <remi@fedoraproject.org> - 0.1.1-1
- Update to 0.1.1 (devel)
- drop patch merged upstream