SHA256
1
0
forked from pool/nghttp2
nghttp2/nghttp2.spec
Martin Pluskal 32130d4c7b - Update to 1.6.0
* Fix heap-use-after-free bug when handling idle streams
	* Strict error handling for frames which are not allowed after 
		closed (remote)
	* Set max number of outgoing concurrent streams to 100 by 
		default
	* Keep incoming streams only at server side
	* Create stream object for pushed resource during 
		nghttp2_submit_push_promise()
	* Add nghttp2_session_create_idle_stream() API
	* Handle response in nghttp2_on_begin_frame_callback
	* Add --lib-only configure option
	* Compile with OpenSSL 1.1.0-pre1
	* Fix build when OpenSSL 1.0.2 is not available (patch from 
		Sunpoet Po-Chuan Hsieh)
	* asio: Add connect and read timeout to client API
	* asio: Add TLS handshake and read timeout to server API
	*	asio: Added access to a requests remote endpoint (patch from 
		Andreas Pohl)
	* asio: libnghttp2_asio: Added io_service accessors (patch from 
		Andreas Pohl)
	* h2load: Add req/s min, max, mean and sd for clients
	* h2load: Fix broken connection times

OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/nghttp2?expand=0&rev=45
2015-12-23 17:53:28 +00:00

207 lines
5.6 KiB
RPMSpec

#
# spec file for package nghttp2
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define soname libnghttp2
%define sover 14
%define soname_asio libnghttp2_asio
%define sover_asio 1
Name: nghttp2
Version: 1.6.0
Release: 0
Summary: Implementation of Hypertext Transfer Protocol version 2 in C
License: MIT
Group: Development/Libraries/C and C++
Url: https://nghttp2.org/
Source: https://github.com/tatsuhiro-t/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.xz
Source1: baselibs.conf
# PATCH-FIX-OPENSUSE nghttp2-remove-python-build.patch
Patch0: %{name}-remove-python-build.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: boost-devel
BuildRequires: gcc-c++
BuildRequires: jemalloc-devel
BuildRequires: libtool
BuildRequires: pkg-config
BuildRequires: python-Cython
BuildRequires: python-Sphinx
BuildRequires: python-setuptools
BuildRequires: pkgconfig(cunit)
BuildRequires: pkgconfig(jansson)
BuildRequires: pkgconfig(libev)
BuildRequires: pkgconfig(libspdylay)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(python)
BuildRequires: pkgconfig(zlib)
%description
This is an implementation of Hypertext Transfer Protocol version 2.
The framing layer of HTTP/2 is implemented as a form of reusable C
library. On top of that, we have implemented HTTP/2 client, server
and proxy. We have also developed load test and benchmarking tool
for HTTP/2.
HPACK encoder and decoder are available as public API.
%package -n %{soname}-%{sover}
Summary: Shared library for nghttp2
Group: System/Libraries
%description -n %{soname}-%{sover}
Shared C libraries for implementation of
Hypertext Transfer Protocol version 2.
%package -n %{soname_asio}%{sover_asio}
Summary: Shared library for nghttp2
Group: System/Libraries
%description -n %{soname_asio}%{sover_asio}
Shared librarios for asynchronous implementation of
Hypertext Transfer Protocol version 2.
%package -n python-%{name}
Summary: Python bindings for nghttp2
Group: Development/Libraries/Python
%description -n python-%{name}
Python bindings for implementation of
Hypertext Transfer Protocol version 2.
%package -n %{soname}-devel
Summary: Development files for nghttp2
Group: Development/Languages/C and C++
Requires: %{soname_asio}%{sover_asio} = %{version}
Provides: %{name}-devel
%description -n %{soname}-devel
Development files for usage with libnghttp2, which implements
Hypertext Transfer Protocol version 2.
%package -n %{soname_asio}-devel
Summary: Development files for nghttp2
Group: Development/Languages/C and C++
Requires: %{soname_asio}%{sover_asio} = %{version}
%description -n %{soname_asio}-devel
Development files for usage with libnghttp2_aio, which implements
asynchronous Hypertext Transfer Protocol version 2.
%package doc
Summary: Documentation for nghttp2
Group: Documentation/HTML
%description doc
Documentation for nghttp2, which includes a shared C library,
HTTP/2 client, server and proxy.
%prep
%setup -q
%patch0 -p1
%build
autoreconf -fiv
%configure \
--disable-static \
--disable-silent-rules \
--enable-asio-lib \
--enable-app \
--enable-python-bindings
make all html %{?_smp_mflags}
pushd python
make nghttp2.c %{?_smp_mflags}
python2 setup.py build
popd
%install
%make_install
pushd python
python2 setup.py install \
--root=%{buildroot} --prefix=%{_prefix}
popd
# Move to the correct directory.
mkdir -p %{buildroot}%{_docdir}/
mv -f %{buildroot}%{_datadir}/doc/%{name}/ %{buildroot}%{_docdir}/%{name}-doc/
find %{buildroot} -type f -name "*.la" -delete -print
# None of applications using these man pages are built.
rm -rf %{buildroot}%{_mandir}/man1/* \
doc/manual/html/.buildinfo
%check
make check %{?_smp_mflags}
%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
%files
%defattr(-,root,root)
%{_bindir}/deflatehd
%{_bindir}/inflatehd
%{_bindir}/h2load
%{_bindir}/nghttp
%{_bindir}/nghttpd
%{_bindir}/nghttpx
%{_datadir}/%{name}/
%files -n %{soname}-%{sover}
%defattr(-,root,root)
%doc COPYING
%{_libdir}/%{soname}.so.%{sover}*
%files -n %{soname_asio}%{sover_asio}
%defattr(-,root,root)
%doc COPYING
%{_libdir}/%{soname_asio}.so.%{sover_asio}*
%files -n python-%{name}
%defattr(-,root,root)
%{python_sitearch}/nghttp2.so
%{python_sitearch}/python_nghttp2-*
%files -n %{soname}-devel
%defattr(-,root,root)
%dir %{_includedir}/%{name}/
%{_includedir}/%{name}/%{name}*.h
%{_libdir}/%{soname}.so
%{_libdir}/pkgconfig/%{soname}.pc
%files -n %{soname_asio}-devel
%defattr(-,root,root)
%dir %{_includedir}/%{name}/
%{_includedir}/%{name}/asio_http2*.h
%{_libdir}/%{soname_asio}.so
%{_libdir}/pkgconfig/%{soname_asio}.pc
%files doc
%defattr(-,root,root)
%doc AUTHORS ChangeLog doc/manual/html
%doc %{_docdir}/%{name}-doc/
%changelog