]>
Commit | Line | Data |
---|---|---|
7e68a898 JB |
1 | # |
2 | # Conditional build: | |
5ebd5855 | 3 | %bcond_without asio # libnghttp2_asio C++ library |
9f92d897 | 4 | %bcond_without spdy # SPDY support via spdylay |
5ebd5855 JB |
5 | %bcond_without static_libs # static libraries |
6 | %bcond_without tests # "make check" call | |
7e68a898 JB |
7 | |
8 | Summary: HTTP/2.0 C library | |
9 | Summary(pl.UTF-8): Biblioteka C HTTP/2.0 | |
10 | Name: nghttp2 | |
f6c40731 JB |
11 | Version: 1.22.0 |
12 | Release: 1 | |
7e68a898 JB |
13 | License: MIT |
14 | Group: Libraries | |
27bc50c7 JB |
15 | #Source0Download: https://github.com/nghttp2/nghttp2/releases |
16 | Source0: https://github.com/nghttp2/nghttp2/releases/download/v%{version}/%{name}-%{version}.tar.xz | |
f6c40731 | 17 | # Source0-md5: 99d7d2c8073be8dd8801e453a4307037 |
5ebd5855 | 18 | Patch0: %{name}-link.patch |
7a45bd4f | 19 | Patch1: %{name}-python.patch |
27bc50c7 | 20 | URL: https://nghttp2.org/ |
7e68a898 JB |
21 | %{?with_tests:BuildRequires: CUnit >= 2.1} |
22 | BuildRequires: autoconf >= 2.61 | |
23 | BuildRequires: automake | |
5ebd5855 | 24 | %{?with_asio:BuildRequires: boost-devel >= 1.54.0} |
9f92d897 | 25 | BuildRequires: c-ares-devel >= 1.7.5 |
c02473f3 | 26 | BuildRequires: jansson-devel >= 2.5 |
5ebd5855 | 27 | BuildRequires: libev-devel |
9f92d897 | 28 | # for examples |
7e68a898 | 29 | BuildRequires: libevent-devel >= 2.0.8 |
5ebd5855 | 30 | BuildRequires: libstdc++-devel >= 6:4.3 |
7e68a898 JB |
31 | BuildRequires: libtool >= 2:2.2.6 |
32 | BuildRequires: libxml2-devel >= 1:2.7.7 | |
33 | BuildRequires: openssl-devel >= 1.0.1 | |
34 | BuildRequires: pkgconfig >= 1:0.20 | |
90ff5ae9 | 35 | BuildRequires: python >= 1:2.7 |
9f92d897 JB |
36 | BuildRequires: python-Cython >= 0.19 |
37 | BuildRequires: python-devel >= 1:2.7 | |
7e35cf68 ER |
38 | BuildRequires: python-setuptools |
39 | BuildRequires: rpm-pythonprov | |
55ef14c3 | 40 | BuildRequires: sed >= 4.0 |
9f92d897 JB |
41 | %{?with_spdy:BuildRequires: spdylay-devel >= 1.3.2} |
42 | BuildRequires: systemd-devel >= 1:209 | |
7e68a898 JB |
43 | BuildRequires: tar >= 1:1.22 |
44 | BuildRequires: xz | |
45 | BuildRequires: zlib-devel >= 1.2.3 | |
218ea8da | 46 | Requires: %{name}-libs = %{version}-%{release} |
9f92d897 JB |
47 | Requires: c-ares >= 1.7.5 |
48 | Requires: jansson >= 2.5 | |
49 | # noinst examples only | |
50 | #Requires: libevent >= 2.0.8 | |
51 | Requires: libxml2 >= 1:2.7.7 | |
52 | Requires: openssl >= 1.0.1 | |
53 | %{?with_spdy:Requires: spdylay >= 1.3.2} | |
54 | Requires: zlib >= 1.2.3 | |
7e68a898 JB |
55 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
56 | ||
5ebd5855 JB |
57 | # non-function symbols std::__once_call, std::__once_callable |
58 | %define skip_post_check_so libnghttp2_asio.so.* | |
59 | ||
7e68a898 JB |
60 | %description |
61 | This is an experimental implementation of Hypertext Transfer Protocol | |
62 | version 2.0. | |
63 | ||
64 | %description -l pl.UTF-8 | |
65 | Ta biblioteka jest eksperymentalną implementacją protokołu HTTP | |
66 | (Hypertext Transfer Protocol) w wersji 2.0. | |
67 | ||
218ea8da ER |
68 | %package libs |
69 | Summary: A library implementing the HTTP/2 protocol | |
27bc50c7 | 70 | Summary(pl.UTF-8): Biblioteka implementująca protokół HTTP/2 |
218ea8da | 71 | Group: Libraries |
218ea8da ER |
72 | Conflicts: nghttp2 < 1.11.1-2 |
73 | ||
74 | %description libs | |
75 | libnghttp2 is a library implementing the Hypertext Transfer Protocol | |
76 | version 2 (HTTP/2) protocol in C. | |
77 | ||
27bc50c7 JB |
78 | %description libs -l pl.UTF-8 |
79 | libnghttp2 to napisana w C biblioteka implementująca protokół HTTP/2 | |
80 | (Hypertext Transfer Protocol w wersji 2). | |
81 | ||
7e68a898 JB |
82 | %package devel |
83 | Summary: Files needed for developing with libnghttp2 | |
84 | Summary(pl.UTF-8): Pliki niezbędne do tworzenia aplikacji z użyciem libnghttp2 | |
85 | Group: Development/Libraries | |
218ea8da | 86 | Requires: %{name}-libs = %{version}-%{release} |
7e68a898 JB |
87 | |
88 | %description devel | |
89 | Files needed for building applications with libnghttp2. | |
90 | ||
91 | %description devel -l pl.UTF-8 | |
92 | Pliki niezbędne do tworzenia aplikacji z użyciem libnghttp2. | |
93 | ||
94 | %package static | |
95 | Summary: Static libnghttp2 library | |
96 | Summary(pl.UTF-8): Statyczna biblioteka libnghttp2 | |
97 | Group: Development/Libraries | |
98 | Requires: %{name}-devel = %{version}-%{release} | |
99 | ||
100 | %description static | |
101 | Static libnghttp2 library. | |
102 | ||
103 | %description static -l pl.UTF-8 | |
104 | Statyczna biblioteka libnghttp2. | |
105 | ||
90ff5ae9 JB |
106 | %package -n python-nghttp2 |
107 | Summary: Python binding to nghttp2 library | |
108 | Summary(pl.UTF-8): Wiązanie Pythona do biblioteki nghttp2 | |
109 | Group: Libraries/Python | |
110 | Requires: %{name} = %{version}-%{release} | |
111 | Requires: python-libs >= 1:2.7 | |
112 | ||
113 | %description -n python-nghttp2 | |
114 | Python binding to nghttp2 library. | |
115 | ||
116 | %description -n python-nghttp2 -l pl.UTF-8 | |
117 | Wiązanie Pythona do biblioteki nghttp2. | |
118 | ||
5ebd5855 JB |
119 | %package asio |
120 | Summary: HTTP/2.0 C++ library | |
121 | Summary(pl.UTF-8): Biblioteka C++ HTTP/2.0 | |
122 | Group: Libraries | |
218ea8da | 123 | Requires: %{name}-libs = %{version}-%{release} |
5ebd5855 JB |
124 | Requires: openssl >= 1.0.1 |
125 | ||
126 | %description asio | |
127 | HTTP/2.0 C++ library. | |
128 | ||
129 | %description asio -l pl.UTF-8 | |
130 | Biblioteka C++ HTTP/2.0. | |
131 | ||
132 | %package asio-devel | |
133 | Summary: Header file for nghttp2_asio library | |
134 | Summary(pl.UTF-8): Plik nagłówkowy biblioteki nghttp2_asio | |
135 | Group: Development/Libraries | |
136 | Requires: %{name}-asio = %{version}-%{release} | |
137 | Requires: %{name}-devel = %{version}-%{release} | |
138 | Requires: libstdc++-devel | |
139 | ||
140 | %description asio-devel | |
141 | Header file for nghttp2_asio library. | |
142 | ||
143 | %description asio-devel -l pl.UTF-8 | |
144 | Plik nagłówkowy biblioteki nghttp2_asio. | |
145 | ||
146 | %package asio-static | |
147 | Summary: Static libnghttp2_asio library | |
148 | Summary(pl.UTF-8): Statyczna biblioteka libnghttp2_asio | |
149 | Group: Development/Libraries | |
150 | Requires: %{name}-asio-devel = %{version}-%{release} | |
151 | ||
152 | %description asio-static | |
153 | Static libnghttp2_asio library. | |
154 | ||
155 | %description asio-static -l pl.UTF-8 | |
156 | Statyczna biblioteka libnghttp2_asio. | |
157 | ||
7e68a898 | 158 | %prep |
90ff5ae9 | 159 | %setup -q |
5ebd5855 | 160 | %patch0 -p1 |
7a45bd4f | 161 | %patch1 -p1 |
7e68a898 | 162 | |
55ef14c3 JB |
163 | %{__sed} -i -e '1s,/usr/bin/env python,%{__python},' script/fetch-ocsp-response |
164 | ||
7e68a898 JB |
165 | %build |
166 | %{__libtoolize} | |
167 | %{__aclocal} -I m4 | |
168 | %{__autoconf} | |
169 | %{__autoheader} | |
170 | %{__automake} | |
171 | %configure \ | |
5ebd5855 JB |
172 | --enable-app \ |
173 | %{?with_asio:--enable-asio-lib} \ | |
174 | --enable-hpack-tools \ | |
175 | --enable-python-bindings \ | |
2fcd3974 | 176 | --disable-silent-rules \ |
5ebd5855 | 177 | %{!?with_static_libs:--disable-static} \ |
9f92d897 JB |
178 | --without-jemalloc \ |
179 | %{?with_spdy:--with-spdylay} | |
7e68a898 JB |
180 | |
181 | %{__make} | |
182 | ||
183 | %if %{with tests} | |
184 | %{__make} check | |
185 | %endif | |
186 | ||
187 | %install | |
188 | rm -rf $RPM_BUILD_ROOT | |
189 | ||
190 | %{__make} install \ | |
191 | DESTDIR=$RPM_BUILD_ROOT | |
192 | ||
193 | # obsoleted by pkg-config | |
5ebd5855 | 194 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libnghttp2*.la |
7e68a898 JB |
195 | # packaged as %doc |
196 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/nghttp2 | |
197 | ||
198 | %clean | |
199 | rm -rf $RPM_BUILD_ROOT | |
200 | ||
218ea8da ER |
201 | %post libs -p /sbin/ldconfig |
202 | %postun libs -p /sbin/ldconfig | |
7e68a898 | 203 | |
5ebd5855 JB |
204 | %post asio -p /sbin/ldconfig |
205 | %postun asio -p /sbin/ldconfig | |
206 | ||
7e68a898 JB |
207 | %files |
208 | %defattr(644,root,root,755) | |
b375e37d | 209 | %doc AUTHORS COPYING ChangeLog README.rst |
90ff5ae9 | 210 | %attr(755,root,root) %{_bindir}/deflatehd |
2fcd3974 | 211 | %attr(755,root,root) %{_bindir}/h2load |
90ff5ae9 | 212 | %attr(755,root,root) %{_bindir}/inflatehd |
7e68a898 JB |
213 | %attr(755,root,root) %{_bindir}/nghttp |
214 | %attr(755,root,root) %{_bindir}/nghttpd | |
215 | %attr(755,root,root) %{_bindir}/nghttpx | |
55ef14c3 JB |
216 | %dir %{_datadir}/nghttp2 |
217 | %attr(755,root,root) %{_datadir}/nghttp2/fetch-ocsp-response | |
2fcd3974 | 218 | %{_mandir}/man1/h2load.1* |
90ff5ae9 JB |
219 | %{_mandir}/man1/nghttp.1* |
220 | %{_mandir}/man1/nghttpd.1* | |
221 | %{_mandir}/man1/nghttpx.1* | |
7e68a898 | 222 | |
218ea8da ER |
223 | %files libs |
224 | %defattr(644,root,root,755) | |
225 | %attr(755,root,root) %{_libdir}/libnghttp2.so.*.*.* | |
226 | %attr(755,root,root) %ghost %{_libdir}/libnghttp2.so.14 | |
227 | ||
7e68a898 JB |
228 | %files devel |
229 | %defattr(644,root,root,755) | |
230 | %attr(755,root,root) %{_libdir}/libnghttp2.so | |
5ebd5855 JB |
231 | %dir %{_includedir}/nghttp2 |
232 | %{_includedir}/nghttp2/nghttp2*.h | |
7e68a898 JB |
233 | %{_pkgconfigdir}/libnghttp2.pc |
234 | ||
235 | %if %{with static_libs} | |
236 | %files static | |
237 | %defattr(644,root,root,755) | |
238 | %{_libdir}/libnghttp2.a | |
239 | %endif | |
90ff5ae9 JB |
240 | |
241 | %files -n python-nghttp2 | |
242 | %defattr(644,root,root,755) | |
243 | %attr(755,root,root) %{py_sitedir}/nghttp2.so | |
593810f0 | 244 | %{py_sitedir}/python_nghttp2-%{version}-py*.egg-info |
5ebd5855 JB |
245 | |
246 | %if %{with asio} | |
247 | %files asio | |
248 | %defattr(644,root,root,755) | |
249 | %attr(755,root,root) %{_libdir}/libnghttp2_asio.so.*.*.* | |
4a039389 | 250 | %attr(755,root,root) %ghost %{_libdir}/libnghttp2_asio.so.1 |
5ebd5855 JB |
251 | |
252 | %files asio-devel | |
253 | %defattr(644,root,root,755) | |
254 | %attr(755,root,root) %{_libdir}/libnghttp2_asio.so | |
255 | %{_includedir}/nghttp2/asio_http2.h | |
4a039389 AM |
256 | %{_includedir}/nghttp2/asio_http2_client.h |
257 | %{_includedir}/nghttp2/asio_http2_server.h | |
5ebd5855 JB |
258 | %{_pkgconfigdir}/libnghttp2_asio.pc |
259 | ||
260 | %if %{with static_libs} | |
261 | %files asio-static | |
262 | %defattr(644,root,root,755) | |
263 | %{_libdir}/libnghttp2_asio.a | |
264 | %endif | |
265 | %endif |