diff options
Diffstat (limited to 'php-pecl-http.spec')
-rw-r--r-- | php-pecl-http.spec | 133 |
1 files changed, 75 insertions, 58 deletions
diff --git a/php-pecl-http.spec b/php-pecl-http.spec index 927a40a..23f1aa6 100644 --- a/php-pecl-http.spec +++ b/php-pecl-http.spec @@ -16,18 +16,19 @@ %global _root_prefix %{_prefix} %endif -#global prever RC1 + +%global gh_commit a84b499418ee7b8992fd9e7e2abc661735a869bd +%global gh_short %(c=%{gh_commit}; echo ${c:0:7}) +%global gh_owner m6w6 +%global gh_project ext-http +#global gh_date 20150928 +#global prever RC1 # The project is pecl_http but the extension is only http %global proj_name pecl_http %global pecl_name http %global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} -%if "%{php_version}" < "5.6" -# after hash iconv propro raphf -%global ini_name z-%{pecl_name}.ini -%else -# after 20-iconv 40-propro 40-raphf +# after 40-propro 40-raphf %global ini_name 50-%{pecl_name}.ini -%endif %ifarch %{arm} # Test suite disabled because of erratic results on slow ARM (timeout) %global with_tests 0%{?_with_tests:1} @@ -37,30 +38,35 @@ #global prever RC1 Name: %{?sub_prefix}php-pecl-http -Version: 2.6.0 +Version: 3.1.0 +%if 0%{?gh_date:1} +Release: 0.2.%{gh_date}git%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{pecl_name}-%{version}-%{gh_short}.tar.gz +%else Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Source0: http://pecl.php.net/get/%{proj_name}-%{version}%{?prever}.tgz +%endif Summary: Extended HTTP support License: BSD Group: Development/Languages URL: http://pecl.php.net/package/pecl_http -Source0: http://pecl.php.net/get/%{proj_name}-%{version}%{?prever}.tgz # From http://www.php.net/manual/en/http.configuration.php Source1: %{proj_name}.ini -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: %{?scl_prefix}php-devel < 7 +BuildRequires: %{?scl_prefix}php-devel >= 7 BuildRequires: %{?scl_prefix}php-hash -BuildRequires: %{?scl_prefix}php-iconv BuildRequires: %{?scl_prefix}php-spl BuildRequires: %{?scl_prefix}php-pear BuildRequires: pcre-devel BuildRequires: zlib-devel >= 1.2.0.4 BuildRequires: curl-devel >= 7.18.2 BuildRequires: libidn-devel -BuildRequires: %{?sub_prefix}php-pecl-propro-devel >= 1.0.0 -BuildRequires: %{?sub_prefix}php-pecl-raphf-devel >= 1.1.0 +# Use same version than PHP to ensure we use libicu-last (EL 6) +BuildRequires: libicu-devel >= 50 +BuildRequires: %{?scl_prefix}php-pecl-propro-devel >= 2 +BuildRequires: %{?scl_prefix}php-pecl-raphf-devel >= 2 BuildRequires: pkgconfig(libevent) >= 2 # only needed in F27+ BuildRequires: openssl-devel @@ -68,17 +74,10 @@ BuildRequires: openssl-devel Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} Requires: %{?scl_prefix}php-hash%{?_isa} -Requires: %{?scl_prefix}php-iconv%{?_isa} Requires: %{?scl_prefix}php-spl%{?_isa} Requires: %{?scl_prefix}php-pecl(propro)%{?_isa} >= 1.0.0 Requires: %{?scl_prefix}php-pecl(raphf)%{?_isa} >= 1.1.0 -%if "%{php_version}" > "5.6" -# V1 don't support PHP 5.6 https://bugs.php.net/66879 Obsoletes: %{?scl_prefix}php-pecl-http1 < 2 -%else -# Can't install both versions of the same extension -Conflicts: %{?scl_prefix}php-pecl-http1 -%endif %if 0%{?fedora} < 22 # new extensions split off this one. Requires: %{?scl_prefix}php-pecl(json_post)%{?_isa} @@ -88,12 +87,12 @@ Requires: %{?scl_prefix}php-pecl(apfd)%{?_isa} Provides: %{?scl_prefix}php-pecl(%{proj_name}) = %{version}%{?prever} Provides: %{?scl_prefix}php-pecl(%{proj_name})%{?_isa} = %{version}%{?prever} +%if "%{?scl_prefix}" != "%{?sub_prefix}" Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}%{?prever} Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}%{?prever} -%if "%{?scl_prefix}" != "%{?sub_prefix}" +%endif Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version}%{?prever} Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}%{?prever} -%endif Provides: %{?scl_prefix}php-%{pecl_name} = %{version}%{?prever} Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}%{?prever} @@ -103,13 +102,15 @@ Obsoletes: php53-pecl-http <= %{version} Obsoletes: php53u-pecl-http <= %{version} Obsoletes: php54-pecl-http <= %{version} Obsoletes: php54w-pecl-http <= %{version} -%if "%{php_version}" > "5.5" Obsoletes: php55u-pecl-http <= %{version} Obsoletes: php55w-pecl-http <= %{version} -%endif -%if "%{php_version}" > "5.6" Obsoletes: php56u-pecl-http <= %{version} Obsoletes: php56w-pecl-http <= %{version} +Obsoletes: php70u-pecl-http <= %{version} +Obsoletes: php70w-pecl-http <= %{version} +%if "%{php_version}" > "7.1" +Obsoletes: php71u-pecl-http <= %{version} +Obsoletes: php71w-pecl-http <= %{version} %endif %endif @@ -134,10 +135,6 @@ Also provided is a powerful request and parallel interface. Version 2 is completely incompatible to previous version. -Note: -. php-pecl-http1 provides API version 1 -. php-pecl-http provides API version 2 - Documentation : http://devel-m6w6.rhcloud.com/mdref/http Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection (%{scl} by %{?scl_vendor}%{!?scl_vendor:rh})}. @@ -166,14 +163,19 @@ These are the files needed to compile programs using HTTP extension. %prep %setup -c -q +%if 0%{?gh_date} +mv %{gh_project}-%{gh_commit} NTS +mv NTS/package.xml . +%else mv %{proj_name}-%{version}%{?prever} NTS +%endif %{?_licensedir:sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml} 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}. +if test "x${extver}" != "x%{version}%{?prever}%{?gh_date:dev}"; then + : Error: Upstream HTTP version is now ${extver}, expecting %{version}%{?prever}%{?gh_date:dev}. : Update the pdover macro and rebuild. exit 1 fi @@ -194,6 +196,7 @@ peclconf() { --with-http-zlib-dir=%{_root_prefix} \ --with-http-libcurl-dir=%{_root_prefix} \ --with-http-libidn-dir=%{_root_prefix} \ + --with-http-libicu-dir=%{_root_prefix} \ --with-http-libevent-dir=%{_root_prefix} \ --with-libdir=%{_lib} \ --with-php-config=$1 @@ -212,8 +215,6 @@ make %{?_smp_mflags} %install -rm -rf %{buildroot} - make -C NTS install INSTALL_ROOT=%{buildroot} # Install XML package description @@ -230,7 +231,9 @@ install -Dpm644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} # Test & Documentation cd NTS for i in $(grep 'role="test"' ../package.xml | sed -e 's/^.*name="//;s/".*$//') -do install -Dpm 644 $i %{buildroot}%{pecl_testdir}/%{proj_name}/$i +do [ -f $i ] && install -Dpm 644 $i %{buildroot}%{pecl_testdir}/%{proj_name}/$i + [ -f tests/$i ] && install -Dpm 644 tests/$i %{buildroot}%{pecl_testdir}/%{proj_name}/tests/$i + [ -f tests/data/$i ] && install -Dpm 644 tests/data/$i %{buildroot}%{pecl_testdir}/%{proj_name}/tests/data/$i done for i in $(grep 'role="doc"' ../package.xml | sed -e 's/^.*name="//;s/".*$//') do install -Dpm 644 $i %{buildroot}%{pecl_docdir}/%{proj_name}/$i @@ -248,13 +251,10 @@ else : only local tests when mock is used export SKIP_ONLINE_TESTS=1 fi -if pkg-config --atleast-version=7.49 libcurl; then - rm ?TS/tests/client019.phpt -fi # Shared needed extensions modules="" -for mod in hash iconv propro raphf; do +for mod in hash propro raphf; do if [ -f %{php_extdir}/${mod}.so ]; then modules="$modules -d extension=${mod}.so" fi @@ -267,6 +267,11 @@ done --modules | grep %{pecl_name} %if %{with_tests} +rm ?TS/tests/client022.phpt +if pkg-config --atleast-version=7.49 libcurl; then + rm ?TS/tests/client019.phpt +fi + : Upstream test suite NTS extension cd NTS TEST_PHP_EXECUTABLE=%{__php} \ @@ -313,12 +318,7 @@ fi %endif -%clean -rm -rf %{buildroot} - - %files -%defattr(-,root,root,-) %{?_licensedir:%license NTS/LICENSE} %doc %{pecl_docdir}/%{proj_name} %config(noreplace) %{php_inidir}/%{ini_name} @@ -341,30 +341,47 @@ rm -rf %{buildroot} %changelog -* Fri Apr 28 2017 Remi Collet <remi@fedoraproject.org> - 2.6.0-2 +* Fri Apr 28 2017 Remi Collet <remi@fedoraproject.org> - 3.1.0-2 - add missing BR on openssl-devel for new libcurl (FTBFS from Koschei) - ensure we use libevent2 on EL-6 -* Mon Dec 12 2016 Remi Collet <remi@fedoraproject.org> - 2.6.0-1 -- update to 2.6.0 (php 5, stable) +* Mon Dec 12 2016 Remi Collet <remi@fedoraproject.org> - 3.1.0-1 +- update to 3.1.0 (php 7, stable) + +* Thu Dec 1 2016 Remi Collet <remi@fedoraproject.org> - 3.1.0-0.5.RC1 +- rebuild with PHP 7.1.0 GA -* Wed Oct 5 2016 Remi Collet <remi@fedoraproject.org> - 2.6.0-0.3.RC1 -- Update to 2.6.0RC1 (php 5, beta) +* Wed Oct 5 2016 Remi Collet <remi@fedoraproject.org> - 3.1.0-0.4.RC1 +- Update to 3.1.0beta2 (php 7, beta) +- drop dependency on iconv extension +- add dependency on libicu -* Sun Sep 11 2016 Remi Collet <remi@fedoraproject.org> - 2.6.0-0.2.beta2 -- F25 build +* Wed Sep 14 2016 Remi Collet <remi@fedoraproject.org> - 3.1.0-0.3.beta2 +- rebuild for PHP 7.1 new API version -* Wed Sep 7 2016 Remi Collet <remi@fedoraproject.org> - 2.6.0-0.1.beta2 -- Update to 2.6.0beta2 (php 5, beta) +* Sun Sep 11 2016 Remi Collet <remi@fedoraproject.org> - 3.1.0-0.2.beta2 +- ignore test with libcurl > 7.49 -* Wed Mar 9 2016 Remi Collet <remi@fedoraproject.org> - 2.5.6-1 -- Update to 2.5.6 (php 5, stable) +* Wed Sep 7 2016 Remi Collet <remi@fedoraproject.org> - 3.1.0-0.1.beta2 +- Update to 3.1.0beta2 (php 7, beta) -* Tue Mar 8 2016 Remi Collet <remi@fedoraproject.org> - 2.5.5-2 +* Wed Jun 8 2016 Remi Collet <remi@fedoraproject.org> - 3.0.1-2 +- add upstream patch, fix test suite with PHP 7.1 + +* Wed Mar 9 2016 Remi Collet <remi@fedoraproject.org> - 3.0.1-1 +- Update to 3.0.1 (php 7, stable) + +* Sat Mar 5 2016 Remi Collet <remi@fedoraproject.org> - 3.0.0-2 - adapt for F24 -* Mon Dec 7 2015 Remi Collet <remi@fedoraproject.org> - 2.5.5-1 -- Update to 2.5.5 (stable) +* Tue Jan 19 2016 Remi Collet <remi@fedoraproject.org> - 3.0.0-1 +- Update to 3.0.0 (stable) + +* Mon Dec 7 2015 Remi Collet <remi@fedoraproject.org> - 3.0.0-0.2.RC1 +- Update to 3.0.0RC1 (beta) + +* Wed Oct 28 2015 Remi Collet <remi@fedoraproject.org> - 3.0.0-0.1.20150928gita84b499 +- update to 3.0.0dev for PHP 7 * Fri Sep 25 2015 Remi Collet <remi@fedoraproject.org> - 2.5.3-1 - Update to 2.5.3 (stable) |