|
|
|
@ -1,8 +1,8 @@
|
|
|
|
|
# spec file for php-pecl-http
|
|
|
|
|
#
|
|
|
|
|
# Copyright (c) 2012-2014 Remi Collet
|
|
|
|
|
# Copyright (c) 2012-2015 Remi Collet
|
|
|
|
|
# License: CC-BY-SA
|
|
|
|
|
# http://creativecommons.org/licenses/by-sa/3.0/
|
|
|
|
|
# http://creativecommons.org/licenses/by-sa/4.0/
|
|
|
|
|
#
|
|
|
|
|
# Please, preserve the changelog entries
|
|
|
|
|
#
|
|
|
|
@ -15,9 +15,17 @@
|
|
|
|
|
%global proj_name pecl_http
|
|
|
|
|
%global pecl_name http
|
|
|
|
|
%global with_zts 0%{?__ztsphp:1}
|
|
|
|
|
%if "%{php_version}" < "5.6"
|
|
|
|
|
# after json hash iconv propro raphf
|
|
|
|
|
%global ini_name z-%{pecl_name}.ini
|
|
|
|
|
%else
|
|
|
|
|
# after 40-json 20-iconv 40-propro 40-raphf
|
|
|
|
|
%global ini_name 50-%{pecl_name}.ini
|
|
|
|
|
%endif
|
|
|
|
|
%global with_tests %{?_without_tests:0}%{!?_without_tests:1}
|
|
|
|
|
|
|
|
|
|
Name: php-pecl-http
|
|
|
|
|
Version: 2.0.5
|
|
|
|
|
Version: 2.2.1
|
|
|
|
|
Release: 1%{?dist}
|
|
|
|
|
Summary: Extended HTTP support
|
|
|
|
|
|
|
|
|
@ -38,6 +46,7 @@ BuildRequires: php-pear
|
|
|
|
|
BuildRequires: pcre-devel
|
|
|
|
|
BuildRequires: zlib-devel >= 1.2.0.4
|
|
|
|
|
BuildRequires: curl-devel >= 7.18.2
|
|
|
|
|
BuildRequires: libidn-devel
|
|
|
|
|
BuildRequires: php-pecl-propro-devel
|
|
|
|
|
BuildRequires: php-pecl-raphf-devel
|
|
|
|
|
BuildRequires: libevent-devel >= 1.4
|
|
|
|
@ -58,8 +67,13 @@ Requires: php-spl%{?_isa}
|
|
|
|
|
%endif
|
|
|
|
|
Requires: php-pecl(propro)%{?_isa}
|
|
|
|
|
Requires: php-pecl(raphf)%{?_isa}
|
|
|
|
|
# Can't install both version of the same extension
|
|
|
|
|
%if "%{php_version}" > "5.6"
|
|
|
|
|
# V1 don't support PHP 5.6 https://bugs.php.net/66879
|
|
|
|
|
Obsoletes: php-pecl-http1 < 2
|
|
|
|
|
%else
|
|
|
|
|
# Can't install both versions of the same extension
|
|
|
|
|
Conflicts: php-pecl-http1
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
Provides: php-pecl(%{proj_name}) = %{version}%{?prever}
|
|
|
|
|
Provides: php-pecl(%{proj_name})%{?_isa} = %{version}%{?prever}
|
|
|
|
@ -101,6 +115,11 @@ Summary: Extended HTTP support developer files (header)
|
|
|
|
|
Group: Development/Libraries
|
|
|
|
|
Requires: php-pecl-http%{?_isa} = %{version}-%{release}
|
|
|
|
|
Requires: php-devel%{?_isa} >= 5.3.0
|
|
|
|
|
%if "%{php_version}" > "5.6"
|
|
|
|
|
Obsoletes: php-pecl-http1-devel < 2
|
|
|
|
|
%else
|
|
|
|
|
Conflicts: php-pecl-http1-devel
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
|
These are the files needed to compile programs using HTTP extension.
|
|
|
|
@ -111,6 +130,7 @@ These are the files needed to compile programs using HTTP extension.
|
|
|
|
|
|
|
|
|
|
mv %{proj_name}-%{version}%{?prever} NTS
|
|
|
|
|
cd NTS
|
|
|
|
|
|
|
|
|
|
extver=$(sed -n '/#define PHP_PECL_HTTP_VERSION/{s/.* "//;s/".*$//;p}' php_http.h)
|
|
|
|
|
if test "x${extver}" != "x%{version}%{?prever}"; then
|
|
|
|
|
: Error: Upstream HTTP version is now ${extver}, expecting %{version}%{?prever}.
|
|
|
|
@ -119,7 +139,7 @@ if test "x${extver}" != "x%{version}%{?prever}"; then
|
|
|
|
|
fi
|
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
|
|
cp %{SOURCE1} %{pecl_name}.ini
|
|
|
|
|
cp %{SOURCE1} %{ini_name}
|
|
|
|
|
|
|
|
|
|
%if %{with_zts}
|
|
|
|
|
# Duplicate source tree for NTS / ZTS build
|
|
|
|
@ -133,6 +153,7 @@ peclconf() {
|
|
|
|
|
--with-http \
|
|
|
|
|
--with-http-zlib-dir=%{_prefix} \
|
|
|
|
|
--with-http-libcurl-dir=%{_prefix} \
|
|
|
|
|
--with-http-libidn-dir=%{_prefix} \
|
|
|
|
|
--with-http-libevent-dir=%{_prefix} \
|
|
|
|
|
--with-libdir=%{_lib} \
|
|
|
|
|
--with-php-config=$1
|
|
|
|
@ -157,11 +178,11 @@ make -C NTS install INSTALL_ROOT=%{buildroot}
|
|
|
|
|
install -Dpm 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
|
|
|
|
|
|
|
|
|
|
# install config file (z-http.ini to be loaded after json)
|
|
|
|
|
install -Dpm644 %{pecl_name}.ini %{buildroot}%{php_inidir}/z-%{pecl_name}.ini
|
|
|
|
|
install -Dpm644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
|
|
|
|
|
|
|
|
|
|
%if %{with_zts}
|
|
|
|
|
make -C ZTS install INSTALL_ROOT=%{buildroot}
|
|
|
|
|
install -Dpm644 %{pecl_name}.ini %{buildroot}%{php_ztsinidir}/z-%{pecl_name}.ini
|
|
|
|
|
install -Dpm644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
# Test & Documentation
|
|
|
|
@ -175,26 +196,53 @@ done
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
%if "%{php_version}" < "5.4"
|
|
|
|
|
# Known failed test with 5.3.3 (need investigations)
|
|
|
|
|
export REPORT_EXIT_STATUS=0
|
|
|
|
|
%else
|
|
|
|
|
export REPORT_EXIT_STATUS=1
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
# Shared needed extensions
|
|
|
|
|
modules=""
|
|
|
|
|
for mod in json hash iconv propro raphf; do
|
|
|
|
|
if [ -f %{php_extdir}/${mod}.so ]; then
|
|
|
|
|
modules="$modules --define extension=${mod}.so"
|
|
|
|
|
modules="$modules -d extension=${mod}.so"
|
|
|
|
|
fi
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
: Minimal load test for NTS extension
|
|
|
|
|
%{__php} --no-php-ini \
|
|
|
|
|
$modules \
|
|
|
|
|
--define extension=$PWD/NTS/modules/%{pecl_name}.so \
|
|
|
|
|
--define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
|
|
|
|
|
--modules | grep %{pecl_name}
|
|
|
|
|
|
|
|
|
|
%if %{with_tests}
|
|
|
|
|
: Upstream test suite NTS extension
|
|
|
|
|
cd NTS
|
|
|
|
|
SKIP_ONLINE_TESTS=1 \
|
|
|
|
|
TEST_PHP_EXECUTABLE=%{__php} \
|
|
|
|
|
TEST_PHP_ARGS="-n $modules -d extension=$PWD/modules/%{pecl_name}.so" \
|
|
|
|
|
NO_INTERACTION=1 \
|
|
|
|
|
%{__php} -n run-tests.php --show-diff
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if %{with_zts}
|
|
|
|
|
: Minimal load test for ZTS extension
|
|
|
|
|
%{__ztsphp} --no-php-ini \
|
|
|
|
|
$modules \
|
|
|
|
|
--define extension=$PWD/ZTS/modules/%{pecl_name}.so \
|
|
|
|
|
--define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
|
|
|
|
|
--modules | grep %{pecl_name}
|
|
|
|
|
|
|
|
|
|
%if %{with_tests}
|
|
|
|
|
: Upstream test suite ZTS extension
|
|
|
|
|
cd ../ZTS
|
|
|
|
|
SKIP_ONLINE_TESTS=1 \
|
|
|
|
|
TEST_PHP_EXECUTABLE=%{__ztsphp} \
|
|
|
|
|
TEST_PHP_ARGS="-n $modules -d extension=$PWD/modules/%{pecl_name}.so" \
|
|
|
|
|
NO_INTERACTION=1 \
|
|
|
|
|
%{__ztsphp} -n run-tests.php --show-diff
|
|
|
|
|
%endif
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -209,13 +257,14 @@ fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%{?_licensedir:%license NTS/LICENSE}
|
|
|
|
|
%doc %{pecl_docdir}/%{proj_name}
|
|
|
|
|
%config(noreplace) %{php_inidir}/z-%{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}/z-%{pecl_name}.ini
|
|
|
|
|
%config(noreplace) %{php_ztsinidir}/%{ini_name}
|
|
|
|
|
%{php_ztsextdir}/%{pecl_name}.so
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
@ -229,6 +278,27 @@ fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Mon Feb 9 2015 Remi Collet <remi@fedoraproject.org> - 2.2.1-1
|
|
|
|
|
- Update to 2.2.1 (stable)
|
|
|
|
|
|
|
|
|
|
* Tue Jan 27 2015 Remi Collet <remi@fedoraproject.org> - 2.2.0-1
|
|
|
|
|
- Update to 2.2.0 (stable)
|
|
|
|
|
- add dependency on libidn
|
|
|
|
|
|
|
|
|
|
* Thu Nov 06 2014 Remi Collet <remi@fedoraproject.org> - 2.1.4-1
|
|
|
|
|
- Update to 2.1.4
|
|
|
|
|
|
|
|
|
|
* Tue Sep 9 2014 Remi Collet <remi@fedoraproject.org> - 2.1.1-1
|
|
|
|
|
- Update to 2.1.1
|
|
|
|
|
- run test suite during build
|
|
|
|
|
- ignore known failed tests with PHP 5.3.3
|
|
|
|
|
|
|
|
|
|
* Fri Jul 11 2014 Remi Collet <remi@fedoraproject.org> - 2.0.7-1
|
|
|
|
|
- Update to 2.0.7
|
|
|
|
|
|
|
|
|
|
* Thu Apr 24 2014 Remi Collet <remi@fedoraproject.org> - 2.0.6-1
|
|
|
|
|
- Update to 2.0.6
|
|
|
|
|
|
|
|
|
|
* Fri Apr 04 2014 Remi Collet <remi@fedoraproject.org> - 2.0.5-1
|
|
|
|
|
- Update to 2.0.5
|
|
|
|
|
|
|
|
|
|