summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-03-09 14:51:53 +0100
committerRemi Collet <fedora@famillecollet.com>2016-03-09 14:51:53 +0100
commit980b4453416f290f16fe04899812d0df39036faa (patch)
tree94bdabade49ab958d98cc8b9bba1c5d3db7ff82e
parent91064b8984923e8235966a70ef6a65d38bc4f5e7 (diff)
php-pecl-ncurses: F24
-rw-r--r--php-pecl-ncurses.spec33
1 files changed, 20 insertions, 13 deletions
diff --git a/php-pecl-ncurses.spec b/php-pecl-ncurses.spec
index f4ef8e1..bad742f 100644
--- a/php-pecl-ncurses.spec
+++ b/php-pecl-ncurses.spec
@@ -18,9 +18,6 @@
%endif
%{?scl: %scl_package php-pecl-ncurses}
-%{!?php_inidir: %global php_inidir %{_sysconfdir}/php.d}
-%{!?__pecl: %global __pecl %{_bindir}/pecl}
-%{!?__php: %global __php %{_bindir}/php}
%global pecl_name ncurses
%global with_zts 0%{?__ztsphp:1}
@@ -33,7 +30,7 @@
Summary: Terminal screen handling and optimization package
Name: %{?sub_prefix}php-pecl-ncurses
Version: 1.0.2
-Release: 9%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 10%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: PHP
Group: Development/Languages
URL: http://pecl.php.net/package/ncurses
@@ -54,11 +51,13 @@ Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}}
-Obsoletes: %{?scl_prefix}php-ncurses < 5.3.0
-Provides: %{?scl_prefix}php-ncurses = 5.3.0
-Provides: %{?scl_prefix}php-ncurses%{?_isa} = 5.3.0
-Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version}
+Obsoletes: %{?scl_prefix}php-%{pecl_name} < 5.3.0
+Provides: %{?scl_prefix}php-%{pecl_name} = 1:%{version}
+Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = 1:%{version}
+Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version}
Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
+Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release}
+Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release}
%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1}
# Other third party repo stuff
@@ -96,7 +95,7 @@ it will be of little use for writing Web applications, but may
be useful when writing scripts meant using PHP from the command
line.
-Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection (%{scl})}.
+Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection (%{scl} by %{?scl_vendor}%{!?scl_vendor:rh})}.
@@ -104,7 +103,9 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%setup -c -q
# Don't install/register tests
-sed -e 's/role="test"/role="src"/' -i package.xml
+sed -e 's/role="test"/role="src"/' \
+ %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \
+ -i package.xml
cat >%{ini_name} << 'EOF'
; Enable %{pecl_name} extension module
@@ -153,9 +154,10 @@ install -Dpm 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
%endif
# Documentation
-for i in LICENSE $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//')
+for i in $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//')
do install -Dpm 644 NTS/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
done
+%{!?_licensedir:install -Dpm 644 NTS/LICENSE %{buildroot}%{pecl_docdir}/%{pecl_name}/LICENSE}
%check
@@ -168,7 +170,7 @@ cd NTS
TEST_PHP_EXECUTABLE=%{__php} \
REPORT_EXIT_STATUS=1 \
NO_INTERACTION=1 \
-%{__php} run-tests.php \
+%{__php} -n run-tests.php \
-n -q \
-d extension_dir=modules \
-d extension=%{pecl_name}.so \
@@ -183,7 +185,7 @@ cd ../ZTS
TEST_PHP_EXECUTABLE=%{__ztsphp} \
REPORT_EXIT_STATUS=1 \
NO_INTERACTION=1 \
-%{__ztsphp} run-tests.php \
+%{__ztsphp} -n run-tests.php \
-n -q \
-d extension_dir=modules \
-d extension=%{pecl_name}.so \
@@ -194,6 +196,7 @@ NO_INTERACTION=1 \
rm -rf %{buildroot}
+%if 0%{?fedora} < 24
# when pear installed alone, after us
%triggerin -- %{?scl_prefix}php-pear
if [ -x %{__pecl} ] ; then
@@ -210,6 +213,7 @@ fi
if [ $1 -eq 0 -a -x %{__pecl} ] ; then
%{pecl_uninstall} %{pecl_name} >/dev/null || :
fi
+%endif
%files
@@ -228,6 +232,9 @@ fi
%changelog
+* Wed Mar 9 2016 Remi Collet <remi@fedoraproject.org> - 1.0.2-10
+- adapt for F24
+
* Tue Jun 23 2015 Remi Collet <rcollet@redhat.com> - 1.0.2-9
- allow build against rh-php56 (as more-php56)
- drop runtime dependency on pear, new scriptlets