Compare commits
12 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
814349f6db | ||
|
389d2fb1b6 | ||
|
81bdcf925d | ||
|
63e16c48cf | ||
|
91bf1f888a | ||
|
0782c28540 | ||
|
e3843726f6 | ||
|
5a6574f988 | ||
|
efcba088d7 | ||
|
53a4373607 | ||
|
ba71621f6e | ||
|
8664b2e3e4 |
11
.gitignore
vendored
11
.gitignore
vendored
@ -12,3 +12,14 @@ php-pecl-http.spec~
|
||||
/pecl_http-2.0.0beta4.tgz
|
||||
/pecl_http-2.0.0beta5.tgz
|
||||
/pecl_http-2.0.0.tgz
|
||||
/pecl_http-2.0.1.tgz
|
||||
/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
|
||||
|
@ -1,13 +1,9 @@
|
||||
; Enable HTTP extension module
|
||||
extension=http.so
|
||||
|
||||
; http://www.php.net/manual/en/http.configuration.php
|
||||
; http://devel-m6w6.rhcloud.com/mdref/http
|
||||
|
||||
; The hashing algorithm used to generate the ETag. MD5, SHA1, and CRC32 are always
|
||||
; available. If the hash extension is enabled, any hashing algorithms this extension
|
||||
; provides are available, too.
|
||||
;http.etag.mode = "md5"
|
||||
|
||||
; The maximum amount of persistent handles to keep alive.
|
||||
;http.persistent_handle.limit = -1
|
||||
|
||||
;http.etag.mode = "crc32b"
|
||||
|
@ -1,8 +1,8 @@
|
||||
# spec file for php-pecl-http
|
||||
#
|
||||
# Copyright (c) 2012-2013 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.0
|
||||
Version: 2.2.1
|
||||
Release: 1%{?dist}
|
||||
Summary: Extended HTTP support
|
||||
|
||||
@ -37,10 +45,11 @@ BuildRequires: php-spl
|
||||
BuildRequires: php-pear
|
||||
BuildRequires: pcre-devel
|
||||
BuildRequires: zlib-devel >= 1.2.0.4
|
||||
BuildRequires: libevent-devel >= 1.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
|
||||
|
||||
Requires(post): %{__pecl}
|
||||
Requires(postun): %{__pecl}
|
||||
@ -58,7 +67,13 @@ Requires: php-spl%{?_isa}
|
||||
%endif
|
||||
Requires: php-pecl(propro)%{?_isa}
|
||||
Requires: php-pecl(raphf)%{?_isa}
|
||||
Conflicts: php-event
|
||||
%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}
|
||||
@ -67,11 +82,11 @@ Provides: php-pecl(%{pecl_name})%{?_isa} = %{version}%{?prever}
|
||||
Provides: php-%{pecl_name} = %{version}%{?prever}
|
||||
Provides: php-%{pecl_name}%{?_isa} = %{version}%{?prever}
|
||||
|
||||
%if 0%{?fedora} < 20
|
||||
%if 0%{?fedora} < 20 && 0%{?rhel} < 7
|
||||
# Filter shared private
|
||||
%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$}
|
||||
%{?filter_setup}
|
||||
%endif
|
||||
%{?filter_setup}
|
||||
|
||||
|
||||
%description
|
||||
@ -88,7 +103,11 @@ Also provided is a powerful request and parallel interface.
|
||||
|
||||
Version 2 is completely incompatible to previous version.
|
||||
|
||||
Documentation : http://php.net/http
|
||||
Note:
|
||||
. php-pecl-http1 provides API version 1
|
||||
. php-pecl-http provides API version 2
|
||||
|
||||
Documentation : http://devel-m6w6.rhcloud.com/mdref/http
|
||||
|
||||
|
||||
%package devel
|
||||
@ -96,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.
|
||||
@ -115,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
|
||||
@ -124,15 +148,25 @@ cp -pr NTS ZTS
|
||||
|
||||
|
||||
%build
|
||||
peclconf() {
|
||||
%configure \
|
||||
--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
|
||||
}
|
||||
cd NTS
|
||||
%{_bindir}/phpize
|
||||
%configure --with-php-config=%{_bindir}/php-config
|
||||
peclconf %{_bindir}/php-config
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%if %{with_zts}
|
||||
cd ../ZTS
|
||||
%{_bindir}/zts-phpize
|
||||
%configure --with-php-config=%{_bindir}/zts-php-config
|
||||
peclconf %{_bindir}/zts-php-config
|
||||
make %{?_smp_mflags}
|
||||
%endif
|
||||
|
||||
@ -144,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
|
||||
@ -162,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
|
||||
|
||||
|
||||
@ -196,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
|
||||
|
||||
@ -216,6 +278,43 @@ 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
|
||||
|
||||
* Thu Jan 02 2014 Remi Collet <remi@fedoraproject.org> - 2.0.4-1
|
||||
- Update to 2.0.4
|
||||
- fix link to documentation
|
||||
- update provided configuration
|
||||
- add upstream patch for -Werror=format-security
|
||||
|
||||
* Tue Dec 10 2013 Remi Collet <remi@fedoraproject.org> - 2.0.3-1
|
||||
- Update to 2.0.3 (stable)
|
||||
- drop Conflicts with pecl/event
|
||||
|
||||
* Tue Nov 26 2013 Remi Collet <remi@fedoraproject.org> - 2.0.1-1
|
||||
- Update to 2.0.1 (stable)
|
||||
|
||||
* Fri Nov 22 2013 Remi Collet <remi@fedoraproject.org> - 2.0.0-1
|
||||
- update to 2.0.0 (stable)
|
||||
- install doc in pecl doc_dir
|
||||
|
Loading…
Reference in New Issue
Block a user