Compare commits

...

6 Commits
master ... f20

Author SHA1 Message Date
Remi Collet ac072d6cb8 update to 2.2.1
(cherry picked from commit 8b782d74ee)
2015-02-09 10:05:50 +01:00
Remi Collet aca7dc9f1a update to 2.2.0
(cherry picked from commit 94e1809f75)
2015-01-29 11:04:56 +01:00
Remi Collet 11b0a31dd1 update to 2.1.4
(cherry picked from commit 8f1ebdc78d)
2014-11-07 07:10:01 +01:00
Remi Collet 90fbabb5a5 update to 2.1.1 2014-09-09 12:13:12 +02:00
Remi Collet f169b80a7b update to 2.0.7 2014-07-11 16:11:03 +02:00
Remi Collet 46e2b84d58 update to 2.0.6 2014-04-24 16:38:34 +02:00
3 changed files with 90 additions and 13 deletions

7
.gitignore vendored
View File

@ -16,3 +16,10 @@ php-pecl-http.spec~
/pecl_http-2.0.3.tgz
/pecl_http-2.0.4.tgz
/pecl_http-2.0.5.tgz
/pecl_http-2.0.6.tgz
/pecl_http-2.0.7.tgz
/pecl_http-2.1.0.tgz
/pecl_http-2.1.1.tgz
/pecl_http-2.1.4.tgz
/pecl_http-2.2.0.tgz
/pecl_http-2.2.1.tgz

View File

@ -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

View File

@ -1 +1 @@
14715aedd483c0ebdd08b56c00c4c5bf pecl_http-2.0.5.tgz
806281757a6d3bcdc1396d89b380c922 pecl_http-2.2.1.tgz