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/tatsuhiro-t/nghttp2/releases
15 Source0: https://github.com/tatsuhiro-t/nghttp2/releases/download/v%{version}/%{name}-%{version}.tar.xz
16 # Source0-md5: 3755757c75e3e1536f8d9adeb8a649dc
17 Patch0: %{name}-link.patch
18 URL: https://github.com/tatsuhiro-t/nghttp2
19 %{?with_tests:BuildRequires: CUnit >= 2.1}
20 BuildRequires: autoconf >= 2.61
21 BuildRequires: automake
22 %{?with_asio:BuildRequires: boost-devel >= 1.54.0}
23 BuildRequires: jansson-devel >= 2.5
24 BuildRequires: libev-devel
25 BuildRequires: libevent-devel >= 2.0.8
26 BuildRequires: libstdc++-devel >= 6:4.3
27 BuildRequires: libtool >= 2:2.2.6
28 BuildRequires: libxml2-devel >= 1:2.7.7
29 BuildRequires: openssl-devel >= 1.0.1
30 BuildRequires: pkgconfig >= 1:0.20
31 BuildRequires: python >= 1:2.7
32 BuildRequires: python-Cython
33 BuildRequires: sed >= 4.0
34 BuildRequires: spdylay-devel >= 1.3.2
35 BuildRequires: tar >= 1:1.22
37 BuildRequires: zlib-devel >= 1.2.3
38 Requires: jansson >= 2.5
39 Requires: libevent >= 2.0.8
40 Requires: libxml2 >= 1:2.7.7
41 Requires: openssl >= 1.0.1
42 Requires: spdylay >= 1.3.2
43 Requires: zlib >= 1.2.3
44 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46 # non-function symbols std::__once_call, std::__once_callable
47 %define skip_post_check_so libnghttp2_asio.so.*
50 This is an experimental implementation of Hypertext Transfer Protocol
53 %description -l pl.UTF-8
54 Ta biblioteka jest eksperymentalną implementacją protokołu HTTP
55 (Hypertext Transfer Protocol) w wersji 2.0.
58 Summary: Files needed for developing with libnghttp2
59 Summary(pl.UTF-8): Pliki niezbędne do tworzenia aplikacji z użyciem libnghttp2
60 Group: Development/Libraries
61 Requires: %{name} = %{version}-%{release}
62 Requires: zlib-devel >= 1.2.3
65 Files needed for building applications with libnghttp2.
67 %description devel -l pl.UTF-8
68 Pliki niezbędne do tworzenia aplikacji z użyciem libnghttp2.
71 Summary: Static libnghttp2 library
72 Summary(pl.UTF-8): Statyczna biblioteka libnghttp2
73 Group: Development/Libraries
74 Requires: %{name}-devel = %{version}-%{release}
77 Static libnghttp2 library.
79 %description static -l pl.UTF-8
80 Statyczna biblioteka libnghttp2.
82 %package -n python-nghttp2
83 Summary: Python binding to nghttp2 library
84 Summary(pl.UTF-8): Wiązanie Pythona do biblioteki nghttp2
85 Group: Libraries/Python
86 Requires: %{name} = %{version}-%{release}
87 Requires: python-libs >= 1:2.7
89 %description -n python-nghttp2
90 Python binding to nghttp2 library.
92 %description -n python-nghttp2 -l pl.UTF-8
93 Wiązanie Pythona do biblioteki nghttp2.
96 Summary: HTTP/2.0 C++ library
97 Summary(pl.UTF-8): Biblioteka C++ HTTP/2.0
99 Requires: %{name} = %{version}-%{release}
100 Requires: openssl >= 1.0.1
103 HTTP/2.0 C++ library.
105 %description asio -l pl.UTF-8
106 Biblioteka C++ HTTP/2.0.
109 Summary: Header file for nghttp2_asio library
110 Summary(pl.UTF-8): Plik nagłówkowy biblioteki nghttp2_asio
111 Group: Development/Libraries
112 Requires: %{name}-asio = %{version}-%{release}
113 Requires: %{name}-devel = %{version}-%{release}
114 Requires: libstdc++-devel
116 %description asio-devel
117 Header file for nghttp2_asio library.
119 %description asio-devel -l pl.UTF-8
120 Plik nagłówkowy biblioteki nghttp2_asio.
123 Summary: Static libnghttp2_asio library
124 Summary(pl.UTF-8): Statyczna biblioteka libnghttp2_asio
125 Group: Development/Libraries
126 Requires: %{name}-asio-devel = %{version}-%{release}
128 %description asio-static
129 Static libnghttp2_asio library.
131 %description asio-static -l pl.UTF-8
132 Statyczna biblioteka libnghttp2_asio.
138 %{__sed} -i -e '1s,/usr/bin/env python,%{__python},' script/fetch-ocsp-response
148 %{?with_asio:--enable-asio-lib} \
149 --enable-hpack-tools \
150 --enable-python-bindings \
151 --disable-silent-rules \
152 %{!?with_static_libs:--disable-static} \
162 rm -rf $RPM_BUILD_ROOT
165 DESTDIR=$RPM_BUILD_ROOT
167 # obsoleted by pkg-config
168 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libnghttp2*.la
170 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/nghttp2
173 rm -rf $RPM_BUILD_ROOT
175 %post -p /sbin/ldconfig
176 %postun -p /sbin/ldconfig
178 %post asio -p /sbin/ldconfig
179 %postun asio -p /sbin/ldconfig
182 %defattr(644,root,root,755)
183 %doc AUTHORS COPYING README.rst
184 %attr(755,root,root) %{_bindir}/deflatehd
185 %attr(755,root,root) %{_bindir}/h2load
186 %attr(755,root,root) %{_bindir}/inflatehd
187 %attr(755,root,root) %{_bindir}/nghttp
188 %attr(755,root,root) %{_bindir}/nghttpd
189 %attr(755,root,root) %{_bindir}/nghttpx
190 %attr(755,root,root) %{_libdir}/libnghttp2.so.*.*.*
191 %attr(755,root,root) %ghost %{_libdir}/libnghttp2.so.14
192 %dir %{_datadir}/nghttp2
193 %attr(755,root,root) %{_datadir}/nghttp2/fetch-ocsp-response
194 %{_mandir}/man1/h2load.1*
195 %{_mandir}/man1/nghttp.1*
196 %{_mandir}/man1/nghttpd.1*
197 %{_mandir}/man1/nghttpx.1*
200 %defattr(644,root,root,755)
201 %attr(755,root,root) %{_libdir}/libnghttp2.so
202 %dir %{_includedir}/nghttp2
203 %{_includedir}/nghttp2/nghttp2*.h
204 %{_pkgconfigdir}/libnghttp2.pc
206 %if %{with static_libs}
208 %defattr(644,root,root,755)
209 %{_libdir}/libnghttp2.a
212 %files -n python-nghttp2
213 %defattr(644,root,root,755)
214 %attr(755,root,root) %{py_sitedir}/nghttp2.so
215 %{py_sitedir}/python_nghttp2-%{version}-py*.egg-info
219 %defattr(644,root,root,755)
220 %attr(755,root,root) %{_libdir}/libnghttp2_asio.so.*.*.*
221 %attr(755,root,root) %ghost %{_libdir}/libnghttp2_asio.so.1
224 %defattr(644,root,root,755)
225 %attr(755,root,root) %{_libdir}/libnghttp2_asio.so
226 %{_includedir}/nghttp2/asio_http2.h
227 %{_includedir}/nghttp2/asio_http2_client.h
228 %{_includedir}/nghttp2/asio_http2_server.h
229 %{_pkgconfigdir}/libnghttp2_asio.pc
231 %if %{with static_libs}
233 %defattr(644,root,root,755)
234 %{_libdir}/libnghttp2_asio.a