1 # TODO: mruby, neverbleed?
4 %bcond_without asio # libnghttp2_asio C++ library
5 %bcond_without static_libs # static libraries
6 %bcond_without tests # "make check" call
8 Summary: HTTP/2.0 C library
9 Summary(pl.UTF-8): Biblioteka C HTTP/2.0
15 #Source0Download: https://github.com/nghttp2/nghttp2/releases
16 Source0: https://github.com/nghttp2/nghttp2/releases/download/v%{version}/%{name}-%{version}.tar.xz
17 # Source0-md5: 45b47086ee6da8171e11887c1665f275
18 Patch0: %{name}-link.patch
19 Patch1: %{name}-python.patch
20 Patch2: %{name}-boost-1.70.patch
21 URL: https://nghttp2.org/
22 %{?with_tests:BuildRequires: CUnit >= 2.1}
23 BuildRequires: autoconf >= 2.61
24 BuildRequires: automake
25 %{?with_asio:BuildRequires: boost-devel >= 1.54.0}
26 BuildRequires: c-ares-devel >= 1.7.5
27 BuildRequires: jansson-devel >= 2.5
28 BuildRequires: libev-devel
30 BuildRequires: libevent-devel >= 2.0.8
31 BuildRequires: libstdc++-devel >= 6:4.3
32 BuildRequires: libtool >= 2:2.2.6
33 BuildRequires: libxml2-devel >= 1:2.6.26
34 BuildRequires: openssl-devel >= 1.0.1
35 BuildRequires: pkgconfig >= 1:0.20
36 BuildRequires: python >= 1:2.7
37 BuildRequires: python-Cython >= 0.19
38 BuildRequires: python-devel >= 1:2.7
39 BuildRequires: python-setuptools
40 BuildRequires: rpm-pythonprov
41 BuildRequires: rpmbuild(macros) >= 1.734
42 BuildRequires: sed >= 4.0
43 BuildRequires: systemd-devel >= 1:209
44 BuildRequires: tar >= 1:1.22
46 BuildRequires: zlib-devel >= 1.2.3
47 Requires: %{name}-libs = %{version}-%{release}
48 Requires: c-ares >= 1.7.5
49 Requires: jansson >= 2.5
50 # noinst examples only
51 #Requires: libevent >= 2.0.8
52 Requires: libxml2 >= 1:2.6.26
53 Requires: openssl >= 1.0.1
54 Requires: zlib >= 1.2.3
55 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
58 This is an experimental implementation of Hypertext Transfer Protocol
61 %description -l pl.UTF-8
62 Ta biblioteka jest eksperymentalną implementacją protokołu HTTP
63 (Hypertext Transfer Protocol) w wersji 2.0.
66 Summary: A library implementing the HTTP/2 protocol
67 Summary(pl.UTF-8): Biblioteka implementująca protokół HTTP/2
69 Conflicts: nghttp2 < 1.11.1-2
72 libnghttp2 is a library implementing the Hypertext Transfer Protocol
73 version 2 (HTTP/2) protocol in C.
75 %description libs -l pl.UTF-8
76 libnghttp2 to napisana w C biblioteka implementująca protokół HTTP/2
77 (Hypertext Transfer Protocol w wersji 2).
80 Summary: Files needed for developing with libnghttp2
81 Summary(pl.UTF-8): Pliki niezbędne do tworzenia aplikacji z użyciem libnghttp2
82 Group: Development/Libraries
83 Requires: %{name}-libs = %{version}-%{release}
86 Files needed for building applications with libnghttp2.
88 %description devel -l pl.UTF-8
89 Pliki niezbędne do tworzenia aplikacji z użyciem libnghttp2.
92 Summary: Static libnghttp2 library
93 Summary(pl.UTF-8): Statyczna biblioteka libnghttp2
94 Group: Development/Libraries
95 Requires: %{name}-devel = %{version}-%{release}
98 Static libnghttp2 library.
100 %description static -l pl.UTF-8
101 Statyczna biblioteka libnghttp2.
103 %package -n python-nghttp2
104 Summary: Python binding to nghttp2 library
105 Summary(pl.UTF-8): Wiązanie Pythona do biblioteki nghttp2
106 Group: Libraries/Python
107 Requires: %{name} = %{version}-%{release}
108 Requires: python-libs >= 1:2.7
110 %description -n python-nghttp2
111 Python binding to nghttp2 library.
113 %description -n python-nghttp2 -l pl.UTF-8
114 Wiązanie Pythona do biblioteki nghttp2.
117 Summary: HTTP/2.0 C++ library
118 Summary(pl.UTF-8): Biblioteka C++ HTTP/2.0
120 Requires: %{name}-libs = %{version}-%{release}
121 Requires: openssl >= 1.0.1
124 HTTP/2.0 C++ library.
126 %description asio -l pl.UTF-8
127 Biblioteka C++ HTTP/2.0.
130 Summary: Header file for nghttp2_asio library
131 Summary(pl.UTF-8): Plik nagłówkowy biblioteki nghttp2_asio
132 Group: Development/Libraries
133 Requires: %{name}-asio = %{version}-%{release}
134 Requires: %{name}-devel = %{version}-%{release}
135 Requires: libstdc++-devel
137 %description asio-devel
138 Header file for nghttp2_asio library.
140 %description asio-devel -l pl.UTF-8
141 Plik nagłówkowy biblioteki nghttp2_asio.
144 Summary: Static libnghttp2_asio library
145 Summary(pl.UTF-8): Statyczna biblioteka libnghttp2_asio
146 Group: Development/Libraries
147 Requires: %{name}-asio-devel = %{version}-%{release}
149 %description asio-static
150 Static libnghttp2_asio library.
152 %description asio-static -l pl.UTF-8
153 Statyczna biblioteka libnghttp2_asio.
161 %{__sed} -i -e '1s,/usr/bin/env python,%{__python},' script/fetch-ocsp-response
171 %{?with_asio:--enable-asio-lib} \
172 --enable-hpack-tools \
173 --enable-python-bindings \
174 --disable-silent-rules \
175 %{!?with_static_libs:--disable-static} \
185 rm -rf $RPM_BUILD_ROOT
188 DESTDIR=$RPM_BUILD_ROOT
190 # obsoleted by pkg-config
191 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libnghttp2*.la
193 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/nghttp2
196 rm -rf $RPM_BUILD_ROOT
198 %post libs -p /sbin/ldconfig
199 %postun libs -p /sbin/ldconfig
201 %post asio -p /sbin/ldconfig
202 %postun asio -p /sbin/ldconfig
205 %defattr(644,root,root,755)
206 %doc AUTHORS COPYING ChangeLog README.rst
207 %attr(755,root,root) %{_bindir}/deflatehd
208 %attr(755,root,root) %{_bindir}/h2load
209 %attr(755,root,root) %{_bindir}/inflatehd
210 %attr(755,root,root) %{_bindir}/nghttp
211 %attr(755,root,root) %{_bindir}/nghttpd
212 %attr(755,root,root) %{_bindir}/nghttpx
213 %dir %{_datadir}/nghttp2
214 %attr(755,root,root) %{_datadir}/nghttp2/fetch-ocsp-response
215 %{_mandir}/man1/h2load.1*
216 %{_mandir}/man1/nghttp.1*
217 %{_mandir}/man1/nghttpd.1*
218 %{_mandir}/man1/nghttpx.1*
221 %defattr(644,root,root,755)
222 %attr(755,root,root) %{_libdir}/libnghttp2.so.*.*.*
223 %attr(755,root,root) %ghost %{_libdir}/libnghttp2.so.14
226 %defattr(644,root,root,755)
227 %attr(755,root,root) %{_libdir}/libnghttp2.so
228 %dir %{_includedir}/nghttp2
229 %{_includedir}/nghttp2/nghttp2*.h
230 %{_pkgconfigdir}/libnghttp2.pc
232 %if %{with static_libs}
234 %defattr(644,root,root,755)
235 %{_libdir}/libnghttp2.a
238 %files -n python-nghttp2
239 %defattr(644,root,root,755)
240 %attr(755,root,root) %{py_sitedir}/nghttp2.so
241 %{py_sitedir}/python_nghttp2-%{version}-py*.egg-info
245 %defattr(644,root,root,755)
246 %attr(755,root,root) %{_libdir}/libnghttp2_asio.so.*.*.*
247 %attr(755,root,root) %ghost %{_libdir}/libnghttp2_asio.so.1
250 %defattr(644,root,root,755)
251 %attr(755,root,root) %{_libdir}/libnghttp2_asio.so
252 %{_includedir}/nghttp2/asio_http2.h
253 %{_includedir}/nghttp2/asio_http2_client.h
254 %{_includedir}/nghttp2/asio_http2_server.h
255 %{_pkgconfigdir}/libnghttp2_asio.pc
257 %if %{with static_libs}
259 %defattr(644,root,root,755)
260 %{_libdir}/libnghttp2_asio.a