3 %bcond_without asio # libnghttp2_asio C++ library
4 %bcond_without static_libs # static libraries
5 %bcond_without tests # "make check" call
7 Summary: HTTP/2.0 C library
8 Summary(pl.UTF-8): Biblioteka C HTTP/2.0
14 #Source0Download: https://github.com/nghttp2/nghttp2/releases
15 Source0: https://github.com/nghttp2/nghttp2/releases/download/v%{version}/%{name}-%{version}.tar.xz
16 # Source0-md5: e9f313abcc9d8e29093f196aeb4aaa2c
17 Patch0: %{name}-link.patch
18 Patch1: %{name}-python.patch
19 URL: https://nghttp2.org/
20 %{?with_tests:BuildRequires: CUnit >= 2.1}
21 BuildRequires: autoconf >= 2.61
22 BuildRequires: automake
23 %{?with_asio:BuildRequires: boost-devel >= 1.54.0}
24 BuildRequires: jansson-devel >= 2.5
25 BuildRequires: libev-devel
26 BuildRequires: libevent-devel >= 2.0.8
27 BuildRequires: libstdc++-devel >= 6:4.3
28 BuildRequires: libtool >= 2:2.2.6
29 BuildRequires: libxml2-devel >= 1:2.7.7
30 BuildRequires: openssl-devel >= 1.0.1
31 BuildRequires: pkgconfig >= 1:0.20
32 BuildRequires: python >= 1:2.7
33 BuildRequires: python-Cython
34 BuildRequires: python-setuptools
35 BuildRequires: rpm-pythonprov
36 BuildRequires: sed >= 4.0
37 BuildRequires: spdylay-devel >= 1.3.2
38 BuildRequires: tar >= 1:1.22
40 BuildRequires: zlib-devel >= 1.2.3
41 Requires: %{name}-libs = %{version}-%{release}
42 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44 # non-function symbols std::__once_call, std::__once_callable
45 %define skip_post_check_so libnghttp2_asio.so.*
48 This is an experimental implementation of Hypertext Transfer Protocol
51 %description -l pl.UTF-8
52 Ta biblioteka jest eksperymentalną implementacją protokołu HTTP
53 (Hypertext Transfer Protocol) w wersji 2.0.
56 Summary: A library implementing the HTTP/2 protocol
57 Summary(pl.UTF-8): Biblioteka implementująca protokół HTTP/2
59 Requires: jansson >= 2.5
60 Requires: libevent >= 2.0.8
61 Requires: libxml2 >= 1:2.7.7
62 Requires: openssl >= 1.0.1
63 Requires: spdylay >= 1.3.2
64 Requires: zlib >= 1.2.3
65 Conflicts: nghttp2 < 1.11.1-2
68 libnghttp2 is a library implementing the Hypertext Transfer Protocol
69 version 2 (HTTP/2) protocol in C.
71 %description libs -l pl.UTF-8
72 libnghttp2 to napisana w C biblioteka implementująca protokół HTTP/2
73 (Hypertext Transfer Protocol w wersji 2).
76 Summary: Files needed for developing with libnghttp2
77 Summary(pl.UTF-8): Pliki niezbędne do tworzenia aplikacji z użyciem libnghttp2
78 Group: Development/Libraries
79 Requires: %{name}-libs = %{version}-%{release}
80 Requires: zlib-devel >= 1.2.3
83 Files needed for building applications with libnghttp2.
85 %description devel -l pl.UTF-8
86 Pliki niezbędne do tworzenia aplikacji z użyciem libnghttp2.
89 Summary: Static libnghttp2 library
90 Summary(pl.UTF-8): Statyczna biblioteka libnghttp2
91 Group: Development/Libraries
92 Requires: %{name}-devel = %{version}-%{release}
95 Static libnghttp2 library.
97 %description static -l pl.UTF-8
98 Statyczna biblioteka libnghttp2.
100 %package -n python-nghttp2
101 Summary: Python binding to nghttp2 library
102 Summary(pl.UTF-8): Wiązanie Pythona do biblioteki nghttp2
103 Group: Libraries/Python
104 Requires: %{name} = %{version}-%{release}
105 Requires: python-libs >= 1:2.7
107 %description -n python-nghttp2
108 Python binding to nghttp2 library.
110 %description -n python-nghttp2 -l pl.UTF-8
111 Wiązanie Pythona do biblioteki nghttp2.
114 Summary: HTTP/2.0 C++ library
115 Summary(pl.UTF-8): Biblioteka C++ HTTP/2.0
117 Requires: %{name}-libs = %{version}-%{release}
118 Requires: openssl >= 1.0.1
121 HTTP/2.0 C++ library.
123 %description asio -l pl.UTF-8
124 Biblioteka C++ HTTP/2.0.
127 Summary: Header file for nghttp2_asio library
128 Summary(pl.UTF-8): Plik nagłówkowy biblioteki nghttp2_asio
129 Group: Development/Libraries
130 Requires: %{name}-asio = %{version}-%{release}
131 Requires: %{name}-devel = %{version}-%{release}
132 Requires: libstdc++-devel
134 %description asio-devel
135 Header file for nghttp2_asio library.
137 %description asio-devel -l pl.UTF-8
138 Plik nagłówkowy biblioteki nghttp2_asio.
141 Summary: Static libnghttp2_asio library
142 Summary(pl.UTF-8): Statyczna biblioteka libnghttp2_asio
143 Group: Development/Libraries
144 Requires: %{name}-asio-devel = %{version}-%{release}
146 %description asio-static
147 Static libnghttp2_asio library.
149 %description asio-static -l pl.UTF-8
150 Statyczna biblioteka libnghttp2_asio.
157 %{__sed} -i -e '1s,/usr/bin/env python,%{__python},' script/fetch-ocsp-response
167 %{?with_asio:--enable-asio-lib} \
168 --enable-hpack-tools \
169 --enable-python-bindings \
170 --disable-silent-rules \
171 %{!?with_static_libs:--disable-static} \
181 rm -rf $RPM_BUILD_ROOT
184 DESTDIR=$RPM_BUILD_ROOT
186 # obsoleted by pkg-config
187 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libnghttp2*.la
189 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/nghttp2
192 rm -rf $RPM_BUILD_ROOT
194 %post libs -p /sbin/ldconfig
195 %postun libs -p /sbin/ldconfig
197 %post asio -p /sbin/ldconfig
198 %postun asio -p /sbin/ldconfig
201 %defattr(644,root,root,755)
202 %doc AUTHORS COPYING ChangeLog README.rst
203 %attr(755,root,root) %{_bindir}/deflatehd
204 %attr(755,root,root) %{_bindir}/h2load
205 %attr(755,root,root) %{_bindir}/inflatehd
206 %attr(755,root,root) %{_bindir}/nghttp
207 %attr(755,root,root) %{_bindir}/nghttpd
208 %attr(755,root,root) %{_bindir}/nghttpx
209 %dir %{_datadir}/nghttp2
210 %attr(755,root,root) %{_datadir}/nghttp2/fetch-ocsp-response
211 %{_mandir}/man1/h2load.1*
212 %{_mandir}/man1/nghttp.1*
213 %{_mandir}/man1/nghttpd.1*
214 %{_mandir}/man1/nghttpx.1*
217 %defattr(644,root,root,755)
218 %attr(755,root,root) %{_libdir}/libnghttp2.so.*.*.*
219 %attr(755,root,root) %ghost %{_libdir}/libnghttp2.so.14
222 %defattr(644,root,root,755)
223 %attr(755,root,root) %{_libdir}/libnghttp2.so
224 %dir %{_includedir}/nghttp2
225 %{_includedir}/nghttp2/nghttp2*.h
226 %{_pkgconfigdir}/libnghttp2.pc
228 %if %{with static_libs}
230 %defattr(644,root,root,755)
231 %{_libdir}/libnghttp2.a
234 %files -n python-nghttp2
235 %defattr(644,root,root,755)
236 %attr(755,root,root) %{py_sitedir}/nghttp2.so
237 %{py_sitedir}/python_nghttp2-%{version}-py*.egg-info
241 %defattr(644,root,root,755)
242 %attr(755,root,root) %{_libdir}/libnghttp2_asio.so.*.*.*
243 %attr(755,root,root) %ghost %{_libdir}/libnghttp2_asio.so.1
246 %defattr(644,root,root,755)
247 %attr(755,root,root) %{_libdir}/libnghttp2_asio.so
248 %{_includedir}/nghttp2/asio_http2.h
249 %{_includedir}/nghttp2/asio_http2_client.h
250 %{_includedir}/nghttp2/asio_http2_server.h
251 %{_pkgconfigdir}/libnghttp2_asio.pc
253 %if %{with static_libs}
255 %defattr(644,root,root,755)
256 %{_libdir}/libnghttp2_asio.a