SHA256
1
0
forked from pool/nghttp2

Accepting request 666996 from home:scarabeus_iv:branches:devel:libraries:c_c++

- Use multibuild to not pull in python3 in first build, nghttp2
  is low in the system

OBS-URL: https://build.opensuse.org/request/show/666996
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/nghttp2?expand=0&rev=90
This commit is contained in:
Martin Pluskal 2019-01-18 14:37:04 +00:00 committed by Git OBS Bridge
parent 5707eccfb7
commit 61738b6991
3 changed files with 47 additions and 15 deletions

3
_multibuild Normal file
View File

@ -0,0 +1,3 @@
<multibuild>
<package>python</package>
</multibuild>

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Jan 18 14:35:14 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Use multibuild to not pull in python3 in first build, nghttp2
is low in the system
-------------------------------------------------------------------
Fri Jan 11 14:24:40 UTC 2019 - Martin Pluskal <mpluskal@suse.com>

View File

@ -20,7 +20,15 @@
%define sover 14
%define soname_asio libnghttp2_asio
%define sover_asio 1
Name: nghttp2
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "python"
%define psuffix -python
%bcond_without python
%else
%define psuffix %{nil}
%bcond_with python
%endif
Name: nghttp2%{psuffix}
Version: 1.35.1
Release: 0
Summary: Implementation of Hypertext Transfer Protocol version 2 in C
@ -30,15 +38,13 @@ URL: https://nghttp2.org/
Source: https://github.com/tatsuhiro-t/nghttp2/releases/download/v%{version}/nghttp2-%{version}.tar.xz
Source1: baselibs.conf
# PATCH-FIX-OPENSUSE nghttp2-remove-python-build.patch
Patch0: %{name}-remove-python-build.patch
Patch0: nghttp2-remove-python-build.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: gcc-c++
BuildRequires: libtool
BuildRequires: pkgconfig
BuildRequires: python-rpm-macros
BuildRequires: python3-Cython
BuildRequires: python3-setuptools
BuildRequires: pkgconfig(cunit)
BuildRequires: pkgconfig(jansson)
BuildRequires: pkgconfig(libcares)
@ -47,8 +53,12 @@ BuildRequires: pkgconfig(liblzma)
BuildRequires: pkgconfig(libsystemd)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(python3)
BuildRequires: pkgconfig(zlib)
%if %{with python}
BuildRequires: pkgconfig(python3)
BuildRequires: python3-Cython
BuildRequires: python3-setuptools
%endif
%ifnarch ppc %{arm}
BuildRequires: pkgconfig(jemalloc)
%endif
@ -84,11 +94,11 @@ Group: System/Libraries
Shared libraries for asynchronous implementation of Hypertext Transfer
Protocol version 2.
%package -n python3-%{name}
%package -n python3-nghttp2
Summary: Python3 bindings for nghttp2
Group: Development/Libraries/Python
%description -n python3-%{name}
%description -n python3-nghttp2
Python bindings for implementation of Hypertext Transfer Protocol version
2.
@ -120,7 +130,7 @@ Documentation for nghttp2, which includes a shared C library,
HTTP/2 client, server and proxy.
%prep
%setup -q
%setup -q -n nghttp2-%{version}
%patch0 -p1
# fix python shebang
sed -i -e 's:#!%{_bindir}/env python:#!%{_bindir}/python3:g' script/fetch-ocsp-response
@ -133,19 +143,27 @@ export PYTHON=%{_bindir}/python3
--disable-silent-rules \
--enable-asio-lib \
--enable-app \
--enable-python-bindings
%if %{with python}
--enable-python-bindings \
%else
--disable-python-bindings \
%endif
%{nil}
make %{?_smp_mflags} all
%if %{with python}
pushd python
make %{?_smp_mflags} nghttp2.c
%python3_build
popd
%endif
%install
%make_install
%if %{with python}
pushd python
%python3_install
popd
%else
%make_install
find %{buildroot} -type f -name "*.la" -delete -print
# Do not ship theis
@ -154,16 +172,24 @@ rm -rf %{buildroot}%{_datadir}/doc/nghttp2
# None of applications using these man pages are built.
rm -rf %{buildroot}%{_mandir}/man1/* \
doc/manual/html/.buildinfo
%endif
%check
# One test fails if python-sphinx is not present
make %{?_smp_mflags} check ||:
%if !%{with python}
%post -n %{soname}-%{sover} -p /sbin/ldconfig
%post -n %{soname_asio}%{sover_asio} -p /sbin/ldconfig
%postun -n %{soname}-%{sover} -p /sbin/ldconfig
%postun -n %{soname_asio}%{sover_asio} -p /sbin/ldconfig
%endif
%if %{with python}
%files -n python3-nghttp2
%{python3_sitearch}/nghttp2.*.so
%{python3_sitearch}/python_nghttp2-*
%else
%files
%{_bindir}/deflatehd
%{_bindir}/inflatehd
@ -181,10 +207,6 @@ make %{?_smp_mflags} check ||:
%license COPYING
%{_libdir}/%{soname_asio}.so.%{sover_asio}*
%files -n python3-%{name}
%{python3_sitearch}/nghttp2.*.so
%{python3_sitearch}/python_nghttp2-*
%files -n %{soname}-devel
%dir %{_includedir}/%{name}/
%{_includedir}/%{name}/%{name}*.h
@ -196,5 +218,6 @@ make %{?_smp_mflags} check ||:
%{_includedir}/%{name}/asio_http2*.h
%{_libdir}/%{soname_asio}.so
%{_libdir}/pkgconfig/%{soname_asio}.pc
%endif
%changelog