php-pecl-http/php-pecl-http.spec

484 lines
15 KiB
RPMSpec
Raw Normal View History

2015-07-15 12:55:25 +00:00
# Fedora spec file for php-pecl-http
#
2018-01-29 09:07:58 +00:00
# Copyright (c) 2012-2018 Remi Collet
# License: CC-BY-SA
2015-02-09 08:41:07 +00:00
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
#
2018-01-29 09:07:58 +00:00
# we don't want -z defs linker flag
%undefine _strict_symbol_defs_build
2012-03-02 18:03:26 +00:00
# The project is pecl_http but the extension is only http
%global proj_name pecl_http
%global pecl_name http
%global with_zts 0%{?__ztsphp:1}
# after 20-iconv 40-propro 40-raphf
%global ini_name 50-%{pecl_name}.ini
%ifarch %{arm}
# Test suite disabled because of erratic results on slow ARM (timeout)
2015-07-15 12:55:25 +00:00
%global with_tests 0%{?_with_tests:1}
%else
2015-07-15 12:55:25 +00:00
%global with_tests 0%{!?_without_tests:1}
%endif
2012-03-02 18:03:26 +00:00
%global upstream_version 3.2.0
2017-10-03 08:14:59 +00:00
%global upstream_prever RC1
2012-03-02 18:03:26 +00:00
Name: php-pecl-http
2017-10-03 08:14:59 +00:00
Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
Release: 5%{?dist}
2012-03-02 18:03:26 +00:00
Summary: Extended HTTP support
License: BSD
URL: http://pecl.php.net/package/pecl_http
2017-10-03 08:14:59 +00:00
Source0: http://pecl.php.net/get/%{proj_name}-%{upstream_version}%{?upstream_prever}.tgz
2012-03-02 18:03:26 +00:00
# From http://www.php.net/manual/en/http.configuration.php
Source1: %{proj_name}.ini
2018-02-15 11:39:57 +00:00
BuildRequires: gcc
2016-06-27 15:51:00 +00:00
BuildRequires: php-devel >= 7
2012-12-13 18:43:51 +00:00
BuildRequires: php-hash
BuildRequires: php-iconv
BuildRequires: php-spl
2012-03-02 18:03:26 +00:00
BuildRequires: php-pear
BuildRequires: pcre-devel
BuildRequires: zlib-devel >= 1.2.0.4
BuildRequires: curl-devel >= 7.18.2
2016-12-12 12:52:38 +00:00
BuildRequires: libicu-devel
BuildRequires: php-pecl-propro-devel >= 1.0.0
BuildRequires: php-pecl-raphf-devel >= 1.1.0
2014-04-04 14:34:34 +00:00
BuildRequires: libevent-devel >= 1.4
BuildRequires: brotli-devel >= 1.0
2015-04-26 16:49:26 +00:00
BuildRequires: pkgconfig
# only needed in F27+
BuildRequires: openssl-devel
2012-03-02 18:03:26 +00:00
Requires: php(zend-abi) = %{php_zend_api}
Requires: php(api) = %{php_core_api}
Requires: php-hash%{?_isa}
Requires: php-iconv%{?_isa}
Requires: php-spl%{?_isa}
Requires: php-pecl(propro)%{?_isa} >= 1.0.0
Requires: php-pecl(raphf)%{?_isa} >= 1.1.0
# V1 don't support PHP 5.6 https://bugs.php.net/66879
Obsoletes: php-pecl-http1 < 2
2012-03-02 18:03:26 +00:00
2017-10-03 08:14:59 +00:00
Provides: php-pecl(%{proj_name}) = %{version}
Provides: php-pecl(%{proj_name})%{?_isa} = %{version}
Provides: php-pecl(%{pecl_name}) = %{version}
Provides: php-pecl(%{pecl_name})%{?_isa} = %{version}
Provides: php-%{pecl_name} = %{version}
Provides: php-%{pecl_name}%{?_isa} = %{version}
2012-03-02 18:03:26 +00:00
%description
The HTTP extension aims to provide a convenient and powerful set of
functionality for major applications.
The HTTP extension eases handling of HTTP URLs, dates, redirects, headers
and messages in a HTTP context (both incoming and outgoing). It also provides
means for client negotiation of preferred language and charset, as well as
a convenient way to exchange arbitrary data with caching and resuming
capabilities.
Also provided is a powerful request and parallel interface.
Version 2 is completely incompatible to previous version.
2016-02-10 10:21:04 +00:00
Documentation : https://mdref.m6w6.name/http
2012-03-02 18:03:26 +00:00
%package devel
Summary: Extended HTTP support developer files (header)
Requires: php-pecl-http%{?_isa} = %{version}-%{release}
Requires: php-devel%{?_isa} >= 5.3.0
Obsoletes: php-pecl-http1-devel < 2
2012-03-02 18:03:26 +00:00
%description devel
These are the files needed to compile programs using HTTP extension.
%prep
%setup -c -q
sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml
2017-10-03 08:14:59 +00:00
mv %{proj_name}-%{upstream_version}%{?upstream_prever} NTS
cd NTS
2016-12-12 12:52:38 +00:00
sed -e '/WORDS_BIGENDIAN/s/if /ifdef /' -i src/php_http_etag.c
2014-09-01 11:54:14 +00:00
extver=$(sed -n '/#define PHP_PECL_HTTP_VERSION/{s/.* "//;s/".*$//;p}' php_http.h)
2017-10-03 08:14:59 +00:00
if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}%{?gh_date:dev}"; then
: Error: Upstream HTTP version is now ${extver}, expecting %{upstream_version}%{?upstream_prever}%{?gh_date:dev}.
2012-03-02 18:03:26 +00:00
: Update the pdover macro and rebuild.
exit 1
fi
2012-12-13 18:43:51 +00:00
cd ..
2012-03-02 18:03:26 +00:00
cp %{SOURCE1} %{ini_name}
2012-03-02 18:03:26 +00:00
%if %{with_zts}
# Duplicate source tree for NTS / ZTS build
cp -pr NTS ZTS
%endif
2012-03-02 18:03:26 +00:00
%build
2014-04-04 14:34:34 +00:00
peclconf() {
%configure \
--with-http \
--with-http-zlib-dir=%{_prefix} \
--with-http-libcurl-dir=%{_prefix} \
--without-http-libidn-dir \
--without-http-libidn2-dir \
--without-http-libidnkit-dir \
--without-http-libidnkit2-dir \
2016-12-12 12:52:38 +00:00
--with-http-libicu-dir=%{_prefix} \
2014-04-04 14:34:34 +00:00
--with-http-libevent-dir=%{_prefix} \
--with-http-libbrotli-dir=%{_prefix} \
2014-04-04 14:34:34 +00:00
--with-libdir=%{_lib} \
--with-php-config=$1
grep IDNA config.h
2014-04-04 14:34:34 +00:00
}
cd NTS
2012-03-02 18:03:26 +00:00
%{_bindir}/phpize
2014-04-04 14:34:34 +00:00
peclconf %{_bindir}/php-config
2012-03-02 18:03:26 +00:00
make %{?_smp_mflags}
%if %{with_zts}
cd ../ZTS
2012-03-02 18:03:26 +00:00
%{_bindir}/zts-phpize
2014-04-04 14:34:34 +00:00
peclconf %{_bindir}/zts-php-config
2012-03-02 18:03:26 +00:00
make %{?_smp_mflags}
%endif
2012-03-02 18:03:26 +00:00
%install
make -C NTS install INSTALL_ROOT=%{buildroot}
2012-03-02 18:03:26 +00:00
# Install XML package description
install -Dpm 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
# install config file
install -Dpm644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
%if %{with_zts}
make -C ZTS install INSTALL_ROOT=%{buildroot}
install -Dpm644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
%endif
# 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
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
done
2012-03-02 18:03:26 +00:00
%check
export REPORT_EXIT_STATUS=1
2016-06-27 15:51:00 +00:00
export SKIP_ONLINE_TESTS=1
# Shared needed extensions
2012-12-13 18:43:51 +00:00
modules=""
for mod in hash iconv propro raphf; do
2012-12-13 18:43:51 +00:00
if [ -f %{php_extdir}/${mod}.so ]; then
modules="$modules -d extension=${mod}.so"
2012-12-13 18:43:51 +00:00
fi
done
: Minimal load test for NTS extension
2012-03-02 18:03:26 +00:00
%{__php} --no-php-ini \
2012-12-13 18:43:51 +00:00
$modules \
--define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
2012-03-02 18:03:26 +00:00
--modules | grep %{pecl_name}
%if %{with_tests}
: Upstream test suite NTS extension
cd NTS
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
2012-03-02 18:03:26 +00:00
%{__ztsphp} --no-php-ini \
2012-12-13 18:43:51 +00:00
$modules \
--define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
2012-03-02 18:03:26 +00:00
--modules | grep %{pecl_name}
%if %{with_tests}
: Upstream test suite ZTS extension
cd ../ZTS
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
2012-03-02 18:03:26 +00:00
%files
%license NTS/LICENSE
%doc %{pecl_docdir}/%{proj_name}
%config(noreplace) %{php_inidir}/%{ini_name}
2012-03-02 18:03:26 +00:00
%{php_extdir}/%{pecl_name}.so
%{pecl_xmldir}/%{name}.xml
%if %{with_zts}
%config(noreplace) %{php_ztsinidir}/%{ini_name}
%{php_ztsextdir}/%{pecl_name}.so
%endif
2012-03-02 18:03:26 +00:00
%files devel
%doc %{pecl_testdir}/%{proj_name}
2012-03-02 18:03:26 +00:00
%{php_incldir}/ext/%{pecl_name}
%if %{with_zts}
2012-03-02 18:03:26 +00:00
%{php_ztsincldir}/ext/%{pecl_name}
%endif
2012-03-02 18:03:26 +00:00
%changelog
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.0~RC1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
2018-07-10 17:38:53 +00:00
* Tue Jul 10 2018 Pete Walter <pwalter@fedoraproject.org> - 3.2.0~RC1-4
- Rebuild for ICU 62
2018-04-30 19:37:29 +00:00
* Mon Apr 30 2018 Pete Walter <pwalter@fedoraproject.org> - 3.2.0~RC1-3
- Rebuild for ICU 61.1
2018-04-30 08:54:34 +00:00
* Mon Apr 30 2018 Pete Walter <pwalter@fedoraproject.org> - 3.2.0~RC1-2
- Rebuild for ICU 61.1
* Tue Apr 10 2018 Remi Collet <remi@remirepo.net> - 3.2.0~RC1-1
- update to 3.2.0RC1
- enable brotli compression support
2018-02-15 11:39:57 +00:00
* Thu Feb 15 2018 Remi Collet <remi@remirepo.net> - 3.1.1~RC1-5
- rebuild for libevent
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.1~RC1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
2018-01-29 09:07:58 +00:00
* Mon Jan 29 2018 Remi Collet <remi@remirepo.net> - 3.1.1~RC1-3
- undefine _strict_symbol_defs_build
2017-11-30 20:42:38 +00:00
* Thu Nov 30 2017 Pete Walter <pwalter@fedoraproject.org> - 3.1.1~RC1-2
- Rebuild for ICU 60.1
2017-10-03 08:14:59 +00:00
* Tue Oct 03 2017 Remi Collet <remi@fedoraproject.org> - 3.1.1~RC1-1
- update to 3.1.1RC1
- rebuild for https://fedoraproject.org/wiki/Changes/php72
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Tue May 9 2017 Remi Collet <remi@remirepo.net> - 3.1.0-4
- drop dependency on libidn, only use libicu
* Fri Apr 28 2017 Remi Collet <remi@fedoraproject.org> - 3.1.0-3
- add missing BR on openssl-devel for new libcurl (FTBFS from Koschei)
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
2016-12-12 12:52:38 +00:00
* Mon Dec 12 2016 Remi Collet <remi@fedoraproject.org> - 3.1.0-1
- Update to 3.1.0 (php 7, stable)
* Mon Nov 14 2016 Remi Collet <remi@fedoraproject.org> - 3.0.1-2
- rebuild for https://fedoraproject.org/wiki/Changes/php71
2016-06-27 15:51:00 +00:00
* Mon Jun 27 2016 Remi Collet <remi@fedoraproject.org> - 3.0.1-1
- Update to 3.0.1 (php 7, stable)
* Sat Mar 26 2016 Remi Collet <remi@fedoraproject.org> - 2.5.6-2
- add upstream patch to skip a online test
fix FTBFS detected by Koschei
2016-03-09 12:55:23 +00:00
* Wed Mar 9 2016 Remi Collet <remi@fedoraproject.org> - 2.5.6-1
- Update to 2.5.6 (stable)
2016-03-09 12:55:23 +00:00
2016-02-10 10:21:04 +00:00
* Wed Feb 10 2016 Remi Collet <remi@fedoraproject.org> - 2.5.5-3
- drop scriptlets (replaced by file triggers in php-pear)
- cleanup
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
2015-12-07 15:26:14 +00:00
* Mon Dec 7 2015 Remi Collet <remi@fedoraproject.org> - 2.5.5-1
- Update to 2.5.5 (stable)
2015-09-28 05:09:51 +00:00
* Fri Sep 25 2015 Remi Collet <remi@fedoraproject.org> - 2.5.3-1
- Update to 2.5.3 (stable)
2015-09-10 07:55:47 +00:00
* Thu Sep 10 2015 Remi Collet <remi@fedoraproject.org> - 2.5.2-1
- Update to 2.5.2 (stable)
* Tue Jul 28 2015 Remi Collet <remi@fedoraproject.org> - 2.5.1-1
- Update to 2.5.1 (stable)
- raise dependency on raphf 1.1.0
2015-07-15 12:55:25 +00:00
* Wed Jul 15 2015 Remi Collet <remi@fedoraproject.org> - 2.5.0-1
- update to 2.5.0
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.0-0.2.RC1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
2015-05-22 06:43:51 +00:00
* Fri May 22 2015 Remi Collet <remi@fedoraproject.org> - 2.5.0-0.1.RC1
- update to 2.5.0RC1 (beta)
* Wed Apr 08 2015 Remi Collet <remi@fedoraproject.org> - 2.4.3-1
- Update to 2.4.3
- add dependencies on pecl/json_post and pecl/apfd (fedora < 22)
- drop dependency on json
- temporarily disable 2 tests broken by new libcurl (Koschei)
* Thu Mar 12 2015 Remi Collet <remi@fedoraproject.org> - 2.3.2-1
- Update to 2.3.2
- disable test suite on slow ARM builder
2015-03-03 11:24:18 +00:00
* Mon Mar 2 2015 Remi Collet <remi@fedoraproject.org> - 2.3.1-1
- Update to 2.3.1 (stable)
2015-02-09 08:41:07 +00:00
* Mon Feb 9 2015 Remi Collet <remi@fedoraproject.org> - 2.2.1-1
- Update to 2.2.1 (stable)
2015-01-29 09:44:16 +00:00
* Tue Jan 27 2015 Remi Collet <remi@fedoraproject.org> - 2.2.0-1
- Update to 2.2.0 (stable)
- add dependency on libidn
2014-11-07 06:00:21 +00:00
* Thu Nov 06 2014 Remi Collet <remi@fedoraproject.org> - 2.1.4-1
- Update to 2.1.4
2014-09-09 09:25:48 +00:00
* Tue Sep 9 2014 Remi Collet <remi@fedoraproject.org> - 2.1.1-1
- Update to 2.1.1
- drop upstream patches
2014-09-03 13:58:33 +00:00
* Wed Sep 3 2014 Remi Collet <remi@fedoraproject.org> - 2.1.0-2
- more upstream patch, fix for arm/ppc64
* Mon Sep 1 2014 Remi Collet <remi@fedoraproject.org> - 2.1.0-1
- Update to 2.1.0
- ignore known failed tests with PHP 5.3.3
- run test suite during build
2014-09-01 11:54:14 +00:00
- add upstream patch to skip online test
- temporarily ignore test suite result on arm
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.7-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
2014-07-11 13:57:50 +00:00
* Fri Jul 11 2014 Remi Collet <remi@fedoraproject.org> - 2.0.7-1
- Update to 2.0.7
* Thu Jun 19 2014 Remi Collet <rcollet@redhat.com> - 2.0.6-4
- rebuild for https://fedoraproject.org/wiki/Changes/Php56
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.6-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Wed May 14 2014 Remi Collet <remi@fedoraproject.org> - 2.0.6-2
- obsoletes php-pecl-http1 (dropped in fedora 21)
2014-04-24 14:36:07 +00:00
* Thu Apr 24 2014 Remi Collet <remi@fedoraproject.org> - 2.0.6-1
- Update to 2.0.6
* Thu Apr 24 2014 Remi Collet <rcollet@redhat.com> - 2.0.5-2
- add numerical prefix to extension configuration file
2014-04-04 14:34:34 +00:00
* 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
2013-12-11 15:17:08 +00:00
* Tue Dec 10 2013 Remi Collet <remi@fedoraproject.org> - 2.0.3-1
- Update to 2.0.3 (stable)
- drop Conflicts with pecl/event
2013-11-26 13:00:40 +00:00
* 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
- install tests in pecl test_dir (in devel)
- spec cleanups, and EPEL-6 compatibility
* Tue Aug 20 2013 Remi Collet <remi@fedoraproject.org> - 2.0.0-0.18.beta5
- update to 2.0.0 beta5
- requires propro and raphf extensions
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.0-0.17.beta4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Fri Mar 22 2013 Remi Collet <rcollet@redhat.com> - 2.0.0-0.16.beta4
- rebuild for http://fedoraproject.org/wiki/Features/Php55
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.0-0.15.beta4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Sun Dec 30 2012 Remi Collet <remi@fedoraproject.org> - 2.0.0-0.14.beta4
2012-12-31 14:22:45 +00:00
- update to 2.0.0beta4
2012-12-13 18:43:51 +00:00
* Thu Dec 13 2012 Remi Collet <remi@fedoraproject.org> - 2.0.0-0.13.beta3
- update to 2.0.0beta3
- fix requires
* Thu Nov 29 2012 Remi Collet <remi@fedoraproject.org> - 2.0.0-0.12.beta2
- update to 2.0.0beta2
- also provides php-http
- remove old directives from configuration file
* Fri Oct 12 2012 Remi Collet <remi@fedoraproject.org> - 2.0.0-0.11.beta1
- update to 2.0.0beta1
- must be load after json, to rename config to z-http.ini
- spec cleanups
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.0-0.10.alpha1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
2012-04-21 06:30:01 +00:00
* Sat Apr 21 2012 Remi Collet <remi@fedoraproject.org> - 2.0.0-0.9.alpha1
- update to 2.0.0alpha1
2012-03-31 15:14:55 +00:00
* Sat Mar 31 2012 Remi Collet <remi@fedoraproject.org> - 2.0.0-0.8.dev10
- update to 2.0.0dev10
2012-03-16 18:22:30 +00:00
* Fri Mar 16 2012 Remi Collet <remi@fedoraproject.org> - 2.0.0-0.7.dev8
- update to 2.0.0dev8
2012-03-09 15:16:15 +00:00
* Fri Mar 09 2012 Remi Collet <remi@fedoraproject.org> - 2.0.0-0.6.dev7
- update to 2.0.0dev7
2012-03-02 18:07:01 +00:00
* Fri Mar 02 2012 Remi Collet <remi@fedoraproject.org> - 2.0.0-0.5.dev6
- update to 2.0.0dev6
2012-03-02 18:03:26 +00:00
* Sat Feb 18 2012 Remi Collet <remi@fedoraproject.org> - 2.0.0-0.4.dev5
- update to 2.0.0dev5
- fix filters
* Wed Jan 25 2012 Remi Collet <remi@fedoraproject.org> - 2.0.0-0.3.dev4
- zts binary in /usr/bin with zts prefix
* Mon Jan 23 2012 Remi Collet <remi@fedoraproject.org> - 2.0.0-0.2.dev4
- update to 2.0.0dev4
- fix missing file https://bugs.php.net/60839
* Sun Jan 22 2012 Remi Collet <remi@fedoraproject.org> - 2.0.0-0.1.dev3
- initial package