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: b5b45ade2c9552a571278815d362a0f3
17 Patch0: %{name}-link.patch
18 Patch1: %{name}-python.patch
19 URL: https://github.com/tatsuhiro-t/nghttp2
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: jansson >= 2.5
42 Requires: libevent >= 2.0.8
43 Requires: libxml2 >= 1:2.7.7
44 Requires: openssl >= 1.0.1
45 Requires: spdylay >= 1.3.2
46 Requires: zlib >= 1.2.3
47 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49 # non-function symbols std::__once_call, std::__once_callable
50 %define skip_post_check_so libnghttp2_asio.so.*
53 This is an experimental implementation of Hypertext Transfer Protocol
56 %description -l pl.UTF-8
57 Ta biblioteka jest eksperymentalną implementacją protokołu HTTP
58 (Hypertext Transfer Protocol) w wersji 2.0.
61 Summary: Files needed for developing with libnghttp2
62 Summary(pl.UTF-8): Pliki niezbędne do tworzenia aplikacji z użyciem libnghttp2
63 Group: Development/Libraries
64 Requires: %{name} = %{version}-%{release}
65 Requires: zlib-devel >= 1.2.3
68 Files needed for building applications with libnghttp2.
70 %description devel -l pl.UTF-8
71 Pliki niezbędne do tworzenia aplikacji z użyciem libnghttp2.
74 Summary: Static libnghttp2 library
75 Summary(pl.UTF-8): Statyczna biblioteka libnghttp2
76 Group: Development/Libraries
77 Requires: %{name}-devel = %{version}-%{release}
80 Static libnghttp2 library.
82 %description static -l pl.UTF-8
83 Statyczna biblioteka libnghttp2.
85 %package -n python-nghttp2
86 Summary: Python binding to nghttp2 library
87 Summary(pl.UTF-8): Wiązanie Pythona do biblioteki nghttp2
88 Group: Libraries/Python
89 Requires: %{name} = %{version}-%{release}
90 Requires: python-libs >= 1:2.7
92 %description -n python-nghttp2
93 Python binding to nghttp2 library.
95 %description -n python-nghttp2 -l pl.UTF-8
96 Wiązanie Pythona do biblioteki nghttp2.
99 Summary: HTTP/2.0 C++ library
100 Summary(pl.UTF-8): Biblioteka C++ HTTP/2.0
102 Requires: %{name} = %{version}-%{release}
103 Requires: openssl >= 1.0.1
106 HTTP/2.0 C++ library.
108 %description asio -l pl.UTF-8
109 Biblioteka C++ HTTP/2.0.
112 Summary: Header file for nghttp2_asio library
113 Summary(pl.UTF-8): Plik nagłówkowy biblioteki nghttp2_asio
114 Group: Development/Libraries
115 Requires: %{name}-asio = %{version}-%{release}
116 Requires: %{name}-devel = %{version}-%{release}
117 Requires: libstdc++-devel
119 %description asio-devel
120 Header file for nghttp2_asio library.
122 %description asio-devel -l pl.UTF-8
123 Plik nagłówkowy biblioteki nghttp2_asio.
126 Summary: Static libnghttp2_asio library
127 Summary(pl.UTF-8): Statyczna biblioteka libnghttp2_asio
128 Group: Development/Libraries
129 Requires: %{name}-asio-devel = %{version}-%{release}
131 %description asio-static
132 Static libnghttp2_asio library.
134 %description asio-static -l pl.UTF-8
135 Statyczna biblioteka libnghttp2_asio.
142 %{__sed} -i -e '1s,/usr/bin/env python,%{__python},' script/fetch-ocsp-response
152 %{?with_asio:--enable-asio-lib} \
153 --enable-hpack-tools \
154 --enable-python-bindings \
155 --disable-silent-rules \
156 %{!?with_static_libs:--disable-static} \
166 rm -rf $RPM_BUILD_ROOT
169 DESTDIR=$RPM_BUILD_ROOT
171 # obsoleted by pkg-config
172 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libnghttp2*.la
174 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/nghttp2
177 rm -rf $RPM_BUILD_ROOT
179 %post -p /sbin/ldconfig
180 %postun -p /sbin/ldconfig
182 %post asio -p /sbin/ldconfig
183 %postun asio -p /sbin/ldconfig
186 %defattr(644,root,root,755)
187 %doc AUTHORS COPYING README.rst
188 %attr(755,root,root) %{_bindir}/deflatehd
189 %attr(755,root,root) %{_bindir}/h2load
190 %attr(755,root,root) %{_bindir}/inflatehd
191 %attr(755,root,root) %{_bindir}/nghttp
192 %attr(755,root,root) %{_bindir}/nghttpd
193 %attr(755,root,root) %{_bindir}/nghttpx
194 %attr(755,root,root) %{_libdir}/libnghttp2.so.*.*.*
195 %attr(755,root,root) %ghost %{_libdir}/libnghttp2.so.14
196 %dir %{_datadir}/nghttp2
197 %attr(755,root,root) %{_datadir}/nghttp2/fetch-ocsp-response
198 %{_mandir}/man1/h2load.1*
199 %{_mandir}/man1/nghttp.1*
200 %{_mandir}/man1/nghttpd.1*
201 %{_mandir}/man1/nghttpx.1*
204 %defattr(644,root,root,755)
205 %attr(755,root,root) %{_libdir}/libnghttp2.so
206 %dir %{_includedir}/nghttp2
207 %{_includedir}/nghttp2/nghttp2*.h
208 %{_pkgconfigdir}/libnghttp2.pc
210 %if %{with static_libs}
212 %defattr(644,root,root,755)
213 %{_libdir}/libnghttp2.a
216 %files -n python-nghttp2
217 %defattr(644,root,root,755)
218 %attr(755,root,root) %{py_sitedir}/nghttp2.so
219 %{py_sitedir}/python_nghttp2-%{version}-py*.egg-info
223 %defattr(644,root,root,755)
224 %attr(755,root,root) %{_libdir}/libnghttp2_asio.so.*.*.*
225 %attr(755,root,root) %ghost %{_libdir}/libnghttp2_asio.so.1
228 %defattr(644,root,root,755)
229 %attr(755,root,root) %{_libdir}/libnghttp2_asio.so
230 %{_includedir}/nghttp2/asio_http2.h
231 %{_includedir}/nghttp2/asio_http2_client.h
232 %{_includedir}/nghttp2/asio_http2_server.h
233 %{_pkgconfigdir}/libnghttp2_asio.pc
235 %if %{with static_libs}
237 %defattr(644,root,root,755)
238 %{_libdir}/libnghttp2_asio.a