Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
ac072d6cb8 | ||
|
aca7dc9f1a | ||
|
11b0a31dd1 | ||
|
90fbabb5a5 | ||
|
f169b80a7b | ||
|
46e2b84d58 |
7
.gitignore
vendored
7
.gitignore
vendored
@ -16,3 +16,10 @@ php-pecl-http.spec~
|
|||||||
/pecl_http-2.0.3.tgz
|
/pecl_http-2.0.3.tgz
|
||||||
/pecl_http-2.0.4.tgz
|
/pecl_http-2.0.4.tgz
|
||||||
/pecl_http-2.0.5.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
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
# spec file for php-pecl-http
|
# spec file for php-pecl-http
|
||||||
#
|
#
|
||||||
# Copyright (c) 2012-2014 Remi Collet
|
# Copyright (c) 2012-2015 Remi Collet
|
||||||
# License: CC-BY-SA
|
# 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
|
# Please, preserve the changelog entries
|
||||||
#
|
#
|
||||||
@ -15,9 +15,17 @@
|
|||||||
%global proj_name pecl_http
|
%global proj_name pecl_http
|
||||||
%global pecl_name http
|
%global pecl_name http
|
||||||
%global with_zts 0%{?__ztsphp:1}
|
%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
|
Name: php-pecl-http
|
||||||
Version: 2.0.5
|
Version: 2.2.1
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Extended HTTP support
|
Summary: Extended HTTP support
|
||||||
|
|
||||||
@ -38,6 +46,7 @@ BuildRequires: php-pear
|
|||||||
BuildRequires: pcre-devel
|
BuildRequires: pcre-devel
|
||||||
BuildRequires: zlib-devel >= 1.2.0.4
|
BuildRequires: zlib-devel >= 1.2.0.4
|
||||||
BuildRequires: curl-devel >= 7.18.2
|
BuildRequires: curl-devel >= 7.18.2
|
||||||
|
BuildRequires: libidn-devel
|
||||||
BuildRequires: php-pecl-propro-devel
|
BuildRequires: php-pecl-propro-devel
|
||||||
BuildRequires: php-pecl-raphf-devel
|
BuildRequires: php-pecl-raphf-devel
|
||||||
BuildRequires: libevent-devel >= 1.4
|
BuildRequires: libevent-devel >= 1.4
|
||||||
@ -58,8 +67,13 @@ Requires: php-spl%{?_isa}
|
|||||||
%endif
|
%endif
|
||||||
Requires: php-pecl(propro)%{?_isa}
|
Requires: php-pecl(propro)%{?_isa}
|
||||||
Requires: php-pecl(raphf)%{?_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
|
Conflicts: php-pecl-http1
|
||||||
|
%endif
|
||||||
|
|
||||||
Provides: php-pecl(%{proj_name}) = %{version}%{?prever}
|
Provides: php-pecl(%{proj_name}) = %{version}%{?prever}
|
||||||
Provides: php-pecl(%{proj_name})%{?_isa} = %{version}%{?prever}
|
Provides: php-pecl(%{proj_name})%{?_isa} = %{version}%{?prever}
|
||||||
@ -101,6 +115,11 @@ Summary: Extended HTTP support developer files (header)
|
|||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
Requires: php-pecl-http%{?_isa} = %{version}-%{release}
|
Requires: php-pecl-http%{?_isa} = %{version}-%{release}
|
||||||
Requires: php-devel%{?_isa} >= 5.3.0
|
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
|
%description devel
|
||||||
These are the files needed to compile programs using HTTP extension.
|
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
|
mv %{proj_name}-%{version}%{?prever} NTS
|
||||||
cd NTS
|
cd NTS
|
||||||
|
|
||||||
extver=$(sed -n '/#define PHP_PECL_HTTP_VERSION/{s/.* "//;s/".*$//;p}' php_http.h)
|
extver=$(sed -n '/#define PHP_PECL_HTTP_VERSION/{s/.* "//;s/".*$//;p}' php_http.h)
|
||||||
if test "x${extver}" != "x%{version}%{?prever}"; then
|
if test "x${extver}" != "x%{version}%{?prever}"; then
|
||||||
: Error: Upstream HTTP version is now ${extver}, expecting %{version}%{?prever}.
|
: Error: Upstream HTTP version is now ${extver}, expecting %{version}%{?prever}.
|
||||||
@ -119,7 +139,7 @@ if test "x${extver}" != "x%{version}%{?prever}"; then
|
|||||||
fi
|
fi
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
cp %{SOURCE1} %{pecl_name}.ini
|
cp %{SOURCE1} %{ini_name}
|
||||||
|
|
||||||
%if %{with_zts}
|
%if %{with_zts}
|
||||||
# Duplicate source tree for NTS / ZTS build
|
# Duplicate source tree for NTS / ZTS build
|
||||||
@ -133,6 +153,7 @@ peclconf() {
|
|||||||
--with-http \
|
--with-http \
|
||||||
--with-http-zlib-dir=%{_prefix} \
|
--with-http-zlib-dir=%{_prefix} \
|
||||||
--with-http-libcurl-dir=%{_prefix} \
|
--with-http-libcurl-dir=%{_prefix} \
|
||||||
|
--with-http-libidn-dir=%{_prefix} \
|
||||||
--with-http-libevent-dir=%{_prefix} \
|
--with-http-libevent-dir=%{_prefix} \
|
||||||
--with-libdir=%{_lib} \
|
--with-libdir=%{_lib} \
|
||||||
--with-php-config=$1
|
--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 -Dpm 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
|
||||||
|
|
||||||
# install config file (z-http.ini to be loaded after json)
|
# 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}
|
%if %{with_zts}
|
||||||
make -C ZTS install INSTALL_ROOT=%{buildroot}
|
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
|
%endif
|
||||||
|
|
||||||
# Test & Documentation
|
# Test & Documentation
|
||||||
@ -175,26 +196,53 @@ done
|
|||||||
|
|
||||||
|
|
||||||
%check
|
%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
|
# Shared needed extensions
|
||||||
modules=""
|
modules=""
|
||||||
for mod in json hash iconv propro raphf; do
|
for mod in json hash iconv propro raphf; do
|
||||||
if [ -f %{php_extdir}/${mod}.so ]; then
|
if [ -f %{php_extdir}/${mod}.so ]; then
|
||||||
modules="$modules --define extension=${mod}.so"
|
modules="$modules -d extension=${mod}.so"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
: Minimal load test for NTS extension
|
: Minimal load test for NTS extension
|
||||||
%{__php} --no-php-ini \
|
%{__php} --no-php-ini \
|
||||||
$modules \
|
$modules \
|
||||||
--define extension=$PWD/NTS/modules/%{pecl_name}.so \
|
--define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
|
||||||
--modules | grep %{pecl_name}
|
--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}
|
%if %{with_zts}
|
||||||
: Minimal load test for ZTS extension
|
: Minimal load test for ZTS extension
|
||||||
%{__ztsphp} --no-php-ini \
|
%{__ztsphp} --no-php-ini \
|
||||||
$modules \
|
$modules \
|
||||||
--define extension=$PWD/ZTS/modules/%{pecl_name}.so \
|
--define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
|
||||||
--modules | grep %{pecl_name}
|
--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
|
%endif
|
||||||
|
|
||||||
|
|
||||||
@ -209,13 +257,14 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
|
%{?_licensedir:%license NTS/LICENSE}
|
||||||
%doc %{pecl_docdir}/%{proj_name}
|
%doc %{pecl_docdir}/%{proj_name}
|
||||||
%config(noreplace) %{php_inidir}/z-%{pecl_name}.ini
|
%config(noreplace) %{php_inidir}/%{ini_name}
|
||||||
%{php_extdir}/%{pecl_name}.so
|
%{php_extdir}/%{pecl_name}.so
|
||||||
%{pecl_xmldir}/%{name}.xml
|
%{pecl_xmldir}/%{name}.xml
|
||||||
|
|
||||||
%if %{with_zts}
|
%if %{with_zts}
|
||||||
%config(noreplace) %{php_ztsinidir}/z-%{pecl_name}.ini
|
%config(noreplace) %{php_ztsinidir}/%{ini_name}
|
||||||
%{php_ztsextdir}/%{pecl_name}.so
|
%{php_ztsextdir}/%{pecl_name}.so
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -229,6 +278,27 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%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
|
* Fri Apr 04 2014 Remi Collet <remi@fedoraproject.org> - 2.0.5-1
|
||||||
- Update to 2.0.5
|
- Update to 2.0.5
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user