- update to 2.0.0beta1
- must be load after json, to rename config to z-http.ini - spec cleanups
This commit is contained in:
parent
ec9096ec34
commit
9c6e2089e0
|
@ -1,4 +1,8 @@
|
|||
package-*.xml
|
||||
*spec~
|
||||
/pecl_http-2.0.0dev6.tgz
|
||||
/pecl_http-2.0.0dev7.tgz
|
||||
/pecl_http-2.0.0dev8.tgz
|
||||
/pecl_http-2.0.0dev10.tgz
|
||||
/pecl_http-2.0.0alpha1.tgz
|
||||
/pecl_http-2.0.0beta1.tgz
|
||||
|
|
|
@ -3,24 +3,26 @@
|
|||
# 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 beta1
|
||||
|
||||
Name: php-pecl-http
|
||||
Version: 2.0.0
|
||||
Release: 0.7.%{prever}%{?dist}
|
||||
Release: 0.11.%{prever}%{?dist}
|
||||
Summary: Extended HTTP support
|
||||
|
||||
License: BSD
|
||||
Group: Development/Languages
|
||||
URL: http://pecl.php.net/package/pecl_http
|
||||
# upstream archive is corrupted, need to be repack
|
||||
# tar xif pecl_http-2.0.0beta1.tgz
|
||||
# tar cf pecl_http-2.0.0beta1.tgz package.xml pecl_http-2.0.0beta1
|
||||
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-json
|
||||
BuildRequires: php-pear
|
||||
BuildRequires: pcre-devel
|
||||
BuildRequires: zlib-devel >= 1.2.0.4
|
||||
|
@ -30,16 +32,18 @@ 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-json
|
||||
|
||||
# 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}
|
||||
|
||||
# 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 +67,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.
|
||||
|
@ -73,8 +77,8 @@ These are the files needed to compile programs using HTTP extension.
|
|||
%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}.
|
||||
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
|
||||
|
@ -97,8 +101,6 @@ make %{?_smp_mflags}
|
|||
|
||||
|
||||
%install
|
||||
rm -rf %{buildroot}
|
||||
|
||||
make -C %{proj_name}-%{version}%{?prever} \
|
||||
install INSTALL_ROOT=%{buildroot}
|
||||
|
||||
|
@ -108,21 +110,25 @@ 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
|
||||
# Minimal load test for NTS extension
|
||||
ln -sf %{php_extdir}/json.so %{proj_name}-%{version}%{?prever}/modules
|
||||
%{__php} --no-php-ini \
|
||||
--define extension_dir=%{proj_name}-%{version}%{?prever}/modules \
|
||||
--define extension=json.so \
|
||||
--define extension=%{pecl_name}.so \
|
||||
--modules | grep %{pecl_name}
|
||||
|
||||
# Minimal load test for ZTS extension
|
||||
ln -sf %{php_ztsextdir}/json.so %{proj_name}-zts/modules
|
||||
%{__ztsphp} --no-php-ini \
|
||||
--define extension_dir=%{proj_name}-zts/modules \
|
||||
--define extension=json.so \
|
||||
--define extension=%{pecl_name}.so \
|
||||
--modules | grep %{pecl_name}
|
||||
|
||||
|
@ -137,26 +143,25 @@ 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
|
||||
* 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
|
||||
|
||||
|
|
Loading…
Reference in New Issue