|
|
|
@ -3,12 +3,11 @@
|
|
|
|
|
# The project is pecl_http but the extension is only http
|
|
|
|
|
%global proj_name pecl_http
|
|
|
|
|
%global pecl_name http
|
|
|
|
|
%global prever dev8
|
|
|
|
|
%global devver dev8
|
|
|
|
|
%global prever beta3
|
|
|
|
|
|
|
|
|
|
Name: php-pecl-http
|
|
|
|
|
Version: 2.0.0
|
|
|
|
|
Release: 0.7.%{prever}%{?dist}
|
|
|
|
|
Release: 0.13.%{prever}%{?dist}
|
|
|
|
|
Summary: Extended HTTP support
|
|
|
|
|
|
|
|
|
|
License: BSD
|
|
|
|
@ -19,8 +18,11 @@ 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: php-devel >= 5.4.0
|
|
|
|
|
BuildRequires: php-devel >= 5.3.0
|
|
|
|
|
BuildRequires: php-hash
|
|
|
|
|
BuildRequires: php-iconv
|
|
|
|
|
BuildRequires: php-json
|
|
|
|
|
BuildRequires: php-spl
|
|
|
|
|
BuildRequires: php-pear
|
|
|
|
|
BuildRequires: pcre-devel
|
|
|
|
|
BuildRequires: zlib-devel >= 1.2.0.4
|
|
|
|
@ -30,16 +32,24 @@ BuildRequires: curl-devel >= 7.18.2
|
|
|
|
|
|
|
|
|
|
Requires(post): %{__pecl}
|
|
|
|
|
Requires(postun): %{__pecl}
|
|
|
|
|
Provides: php-pecl(%{proj_name}) = %{version}%{devver}
|
|
|
|
|
Provides: php-pecl(%{pecl_name}) = %{version}%{devver}
|
|
|
|
|
Requires: php(zend-abi) = %{php_zend_api}
|
|
|
|
|
Requires: php(api) = %{php_core_api}
|
|
|
|
|
Requires: php-hash
|
|
|
|
|
Requires: php-iconv
|
|
|
|
|
Requires: php-json
|
|
|
|
|
Requires: php-spl
|
|
|
|
|
Conflicts: php-event
|
|
|
|
|
|
|
|
|
|
# RPM 4.8
|
|
|
|
|
Provides: php-pecl(%{proj_name}) = %{version}%{?prever}
|
|
|
|
|
Provides: php-pecl(%{proj_name})%{?_isa} = %{version}%{?prever}
|
|
|
|
|
Provides: php-pecl(%{pecl_name}) = %{version}%{?prever}
|
|
|
|
|
Provides: php-pecl(%{pecl_name})%{?_isa} = %{version}%{?prever}
|
|
|
|
|
Provides: php-%{pecl_name} = %{version}%{?prever}
|
|
|
|
|
Provides: php-%{pecl_name}%{?_isa} = %{version}%{?prever}
|
|
|
|
|
|
|
|
|
|
# Filter shared private
|
|
|
|
|
%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$}
|
|
|
|
|
%{?filter_setup}
|
|
|
|
|
# RPM 4.9
|
|
|
|
|
%global __provides_exclude_from %{?__provides_exclude_from:%__provides_exclude_from|}%{_libdir}/.*\\.so$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
@ -63,7 +73,7 @@ Documentation : http://php.net/http
|
|
|
|
|
Summary: Extended HTTP support developer files (header)
|
|
|
|
|
Group: Development/Libraries
|
|
|
|
|
Requires: php-pecl-http%{?_isa} = %{version}-%{release}
|
|
|
|
|
Requires: php-devel%{?_isa} >= 5.4.0
|
|
|
|
|
Requires: php-devel%{?_isa} >= 5.3.0
|
|
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
|
These are the files needed to compile programs using HTTP extension.
|
|
|
|
@ -72,12 +82,15 @@ These are the files needed to compile programs using HTTP extension.
|
|
|
|
|
%prep
|
|
|
|
|
%setup -c -q
|
|
|
|
|
|
|
|
|
|
extver=$(sed -n '/#define PHP_HTTP_EXT_VERSION/{s/.* "//;s/".*$//;p}' %{proj_name}-%{version}%{?prever}/php_http.h)
|
|
|
|
|
if test "x${extver}" != "x%{version}%{?devver}"; then
|
|
|
|
|
: Error: Upstream HTTP version is now ${extver}, expecting %{version}%{?devver}.
|
|
|
|
|
cd %{proj_name}-%{version}%{?prever}
|
|
|
|
|
|
|
|
|
|
extver=$(sed -n '/#define PHP_HTTP_EXT_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}.
|
|
|
|
|
: Update the pdover macro and rebuild.
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
|
|
cp %{SOURCE1} %{pecl_name}.ini
|
|
|
|
|
|
|
|
|
@ -97,8 +110,6 @@ make %{?_smp_mflags}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
rm -rf %{buildroot}
|
|
|
|
|
|
|
|
|
|
make -C %{proj_name}-%{version}%{?prever} \
|
|
|
|
|
install INSTALL_ROOT=%{buildroot}
|
|
|
|
|
|
|
|
|
@ -108,21 +119,33 @@ make -C %{proj_name}-zts \
|
|
|
|
|
# Install XML package description
|
|
|
|
|
install -Dpm 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
|
|
|
|
|
|
|
|
|
|
# install config file
|
|
|
|
|
install -Dpm644 %{pecl_name}.ini %{buildroot}%{php_inidir}/%{pecl_name}.ini
|
|
|
|
|
install -Dpm644 %{pecl_name}.ini %{buildroot}%{php_ztsinidir}/%{pecl_name}.ini
|
|
|
|
|
# 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 %{pecl_name}.ini %{buildroot}%{php_ztsinidir}/z-%{pecl_name}.ini
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
# Install needed extensions
|
|
|
|
|
modules=""
|
|
|
|
|
for mod in json hash iconv; do
|
|
|
|
|
if [ -f %{php_extdir}/${mod}.so ]; then
|
|
|
|
|
ln -sf %{php_extdir}/${mod}.so %{proj_name}-%{version}%{?prever}/modules
|
|
|
|
|
ln -sf %{php_ztsextdir}/${mod}.so %{proj_name}-zts/modules
|
|
|
|
|
modules="$modules --define extension=${mod}.so"
|
|
|
|
|
fi
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
# Minimal load test for NTS extension
|
|
|
|
|
%{__php} --no-php-ini \
|
|
|
|
|
--define extension_dir=%{proj_name}-%{version}%{?prever}/modules \
|
|
|
|
|
$modules \
|
|
|
|
|
--define extension=%{pecl_name}.so \
|
|
|
|
|
--modules | grep %{pecl_name}
|
|
|
|
|
|
|
|
|
|
# Minimal load test for ZTS extension
|
|
|
|
|
%{__ztsphp} --no-php-ini \
|
|
|
|
|
--define extension_dir=%{proj_name}-zts/modules \
|
|
|
|
|
$modules \
|
|
|
|
|
--define extension=%{pecl_name}.so \
|
|
|
|
|
--modules | grep %{pecl_name}
|
|
|
|
|
|
|
|
|
@ -137,26 +160,34 @@ if [ $1 -eq 0 ] ; then
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%clean
|
|
|
|
|
rm -rf %{buildroot}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
|
%doc %{proj_name}-%{version}%{?prever}/{CREDITS,LICENSE,ThanksTo.txt}
|
|
|
|
|
%config(noreplace) %{php_inidir}/%{pecl_name}.ini
|
|
|
|
|
%config(noreplace) %{php_ztsinidir}/%{pecl_name}.ini
|
|
|
|
|
%config(noreplace) %{php_inidir}/z-%{pecl_name}.ini
|
|
|
|
|
%config(noreplace) %{php_ztsinidir}/z-%{pecl_name}.ini
|
|
|
|
|
%{php_extdir}/%{pecl_name}.so
|
|
|
|
|
%{php_ztsextdir}/%{pecl_name}.so
|
|
|
|
|
%{pecl_xmldir}/%{name}.xml
|
|
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
|
%{php_incldir}/ext/%{pecl_name}
|
|
|
|
|
%{php_ztsincldir}/ext/%{pecl_name}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* 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
|
|
|
|
|
|
|
|
|
|
* Fri Mar 16 2012 Remi Collet <remi@fedoraproject.org> - 2.0.0-0.7.dev8
|
|
|
|
|
- update to 2.0.0dev8
|
|
|
|
|
|
|
|
|
|