]>
Commit | Line | Data |
---|---|---|
b0744631 | 1 | # TODO: mruby, neverbleed? |
7e68a898 JB |
2 | # |
3 | # Conditional build: | |
5ebd5855 JB |
4 | %bcond_without asio # libnghttp2_asio C++ library |
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 | |
f04ce4b6 | 11 | Version: 1.43.0 |
2a3e23c4 | 12 | Release: 2 |
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 | |
f04ce4b6 | 17 | # Source0-md5: c1d607bf3830000acd7a51f0058f4bd2 |
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 |
b17c3c9f | 30 | BuildRequires: libstdc++-devel >= 6:4.7 |
7e68a898 | 31 | BuildRequires: libtool >= 2:2.2.6 |
b0744631 | 32 | BuildRequires: libxml2-devel >= 1:2.6.26 |
7e68a898 JB |
33 | BuildRequires: openssl-devel >= 1.0.1 |
34 | BuildRequires: pkgconfig >= 1:0.20 | |
f04ce4b6 JP |
35 | BuildRequires: python3 >= 1:3.8 |
36 | BuildRequires: python3-Cython >= 0.19 | |
37 | BuildRequires: python3-devel >= 1:3.8 | |
38 | BuildRequires: python3-setuptools | |
7e35cf68 | 39 | BuildRequires: rpm-pythonprov |
26b1a5cb | 40 | BuildRequires: rpmbuild(macros) >= 1.734 |
55ef14c3 | 41 | BuildRequires: sed >= 4.0 |
9f92d897 | 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 | |
b0744631 | 51 | Requires: libxml2 >= 1:2.6.26 |
9f92d897 | 52 | Requires: openssl >= 1.0.1 |
9f92d897 | 53 | Requires: zlib >= 1.2.3 |
7e68a898 JB |
54 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
55 | ||
56 | %description | |
57 | This is an experimental implementation of Hypertext Transfer Protocol | |
58 | version 2.0. | |
59 | ||
60 | %description -l pl.UTF-8 | |
61 | Ta biblioteka jest eksperymentalną implementacją protokołu HTTP | |
62 | (Hypertext Transfer Protocol) w wersji 2.0. | |
63 | ||
218ea8da ER |
64 | %package libs |
65 | Summary: A library implementing the HTTP/2 protocol | |
27bc50c7 | 66 | Summary(pl.UTF-8): Biblioteka implementująca protokół HTTP/2 |
218ea8da | 67 | Group: Libraries |
218ea8da ER |
68 | Conflicts: nghttp2 < 1.11.1-2 |
69 | ||
70 | %description libs | |
71 | libnghttp2 is a library implementing the Hypertext Transfer Protocol | |
72 | version 2 (HTTP/2) protocol in C. | |
73 | ||
27bc50c7 JB |
74 | %description libs -l pl.UTF-8 |
75 | libnghttp2 to napisana w C biblioteka implementująca protokół HTTP/2 | |
76 | (Hypertext Transfer Protocol w wersji 2). | |
77 | ||
7e68a898 JB |
78 | %package devel |
79 | Summary: Files needed for developing with libnghttp2 | |
80 | Summary(pl.UTF-8): Pliki niezbędne do tworzenia aplikacji z użyciem libnghttp2 | |
81 | Group: Development/Libraries | |
218ea8da | 82 | Requires: %{name}-libs = %{version}-%{release} |
7e68a898 JB |
83 | |
84 | %description devel | |
85 | Files needed for building applications with libnghttp2. | |
86 | ||
87 | %description devel -l pl.UTF-8 | |
88 | Pliki niezbędne do tworzenia aplikacji z użyciem libnghttp2. | |
89 | ||
90 | %package static | |
91 | Summary: Static libnghttp2 library | |
92 | Summary(pl.UTF-8): Statyczna biblioteka libnghttp2 | |
93 | Group: Development/Libraries | |
94 | Requires: %{name}-devel = %{version}-%{release} | |
95 | ||
96 | %description static | |
97 | Static libnghttp2 library. | |
98 | ||
99 | %description static -l pl.UTF-8 | |
100 | Statyczna biblioteka libnghttp2. | |
101 | ||
f04ce4b6 | 102 | %package -n python3-nghttp2 |
90ff5ae9 JB |
103 | Summary: Python binding to nghttp2 library |
104 | Summary(pl.UTF-8): Wiązanie Pythona do biblioteki nghttp2 | |
105 | Group: Libraries/Python | |
106 | Requires: %{name} = %{version}-%{release} | |
f04ce4b6 JP |
107 | Requires: python3-libs >= 1:3.8 |
108 | Obsoletes: python-nghttp2 < 1.43.0 | |
90ff5ae9 | 109 | |
f04ce4b6 | 110 | %description -n python3-nghttp2 |
90ff5ae9 JB |
111 | Python binding to nghttp2 library. |
112 | ||
f04ce4b6 | 113 | %description -n python3-nghttp2 -l pl.UTF-8 |
90ff5ae9 JB |
114 | Wiązanie Pythona do biblioteki nghttp2. |
115 | ||
5ebd5855 JB |
116 | %package asio |
117 | Summary: HTTP/2.0 C++ library | |
118 | Summary(pl.UTF-8): Biblioteka C++ HTTP/2.0 | |
119 | Group: Libraries | |
218ea8da | 120 | Requires: %{name}-libs = %{version}-%{release} |
5ebd5855 JB |
121 | Requires: openssl >= 1.0.1 |
122 | ||
123 | %description asio | |
124 | HTTP/2.0 C++ library. | |
125 | ||
126 | %description asio -l pl.UTF-8 | |
127 | Biblioteka C++ HTTP/2.0. | |
128 | ||
129 | %package asio-devel | |
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} | |
b17c3c9f | 135 | Requires: libstdc++-devel >= 6:4.7 |
5ebd5855 JB |
136 | |
137 | %description asio-devel | |
138 | Header file for nghttp2_asio library. | |
139 | ||
140 | %description asio-devel -l pl.UTF-8 | |
141 | Plik nagłówkowy biblioteki nghttp2_asio. | |
142 | ||
143 | %package asio-static | |
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} | |
148 | ||
149 | %description asio-static | |
150 | Static libnghttp2_asio library. | |
151 | ||
152 | %description asio-static -l pl.UTF-8 | |
153 | Statyczna biblioteka libnghttp2_asio. | |
154 | ||
7e68a898 | 155 | %prep |
90ff5ae9 | 156 | %setup -q |
5ebd5855 | 157 | %patch0 -p1 |
7a45bd4f | 158 | %patch1 -p1 |
7e68a898 | 159 | |
2a3e23c4 | 160 | %{__sed} -i -e '1s,/usr/bin/env python,%{__python3},' script/fetch-ocsp-response |
55ef14c3 | 161 | |
7e68a898 JB |
162 | %build |
163 | %{__libtoolize} | |
164 | %{__aclocal} -I m4 | |
165 | %{__autoconf} | |
166 | %{__autoheader} | |
167 | %{__automake} | |
168 | %configure \ | |
5ebd5855 JB |
169 | --enable-app \ |
170 | %{?with_asio:--enable-asio-lib} \ | |
171 | --enable-hpack-tools \ | |
172 | --enable-python-bindings \ | |
2fcd3974 | 173 | --disable-silent-rules \ |
5ebd5855 | 174 | %{!?with_static_libs:--disable-static} \ |
d97dd061 | 175 | --without-jemalloc |
7e68a898 JB |
176 | |
177 | %{__make} | |
178 | ||
179 | %if %{with tests} | |
180 | %{__make} check | |
181 | %endif | |
182 | ||
183 | %install | |
184 | rm -rf $RPM_BUILD_ROOT | |
185 | ||
186 | %{__make} install \ | |
187 | DESTDIR=$RPM_BUILD_ROOT | |
188 | ||
189 | # obsoleted by pkg-config | |
5ebd5855 | 190 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libnghttp2*.la |
7e68a898 JB |
191 | # packaged as %doc |
192 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/nghttp2 | |
193 | ||
194 | %clean | |
195 | rm -rf $RPM_BUILD_ROOT | |
196 | ||
218ea8da ER |
197 | %post libs -p /sbin/ldconfig |
198 | %postun libs -p /sbin/ldconfig | |
7e68a898 | 199 | |
5ebd5855 JB |
200 | %post asio -p /sbin/ldconfig |
201 | %postun asio -p /sbin/ldconfig | |
202 | ||
7e68a898 JB |
203 | %files |
204 | %defattr(644,root,root,755) | |
b375e37d | 205 | %doc AUTHORS COPYING ChangeLog README.rst |
90ff5ae9 | 206 | %attr(755,root,root) %{_bindir}/deflatehd |
2fcd3974 | 207 | %attr(755,root,root) %{_bindir}/h2load |
90ff5ae9 | 208 | %attr(755,root,root) %{_bindir}/inflatehd |
7e68a898 JB |
209 | %attr(755,root,root) %{_bindir}/nghttp |
210 | %attr(755,root,root) %{_bindir}/nghttpd | |
211 | %attr(755,root,root) %{_bindir}/nghttpx | |
55ef14c3 JB |
212 | %dir %{_datadir}/nghttp2 |
213 | %attr(755,root,root) %{_datadir}/nghttp2/fetch-ocsp-response | |
2fcd3974 | 214 | %{_mandir}/man1/h2load.1* |
90ff5ae9 JB |
215 | %{_mandir}/man1/nghttp.1* |
216 | %{_mandir}/man1/nghttpd.1* | |
217 | %{_mandir}/man1/nghttpx.1* | |
7e68a898 | 218 | |
218ea8da ER |
219 | %files libs |
220 | %defattr(644,root,root,755) | |
221 | %attr(755,root,root) %{_libdir}/libnghttp2.so.*.*.* | |
222 | %attr(755,root,root) %ghost %{_libdir}/libnghttp2.so.14 | |
223 | ||
7e68a898 JB |
224 | %files devel |
225 | %defattr(644,root,root,755) | |
226 | %attr(755,root,root) %{_libdir}/libnghttp2.so | |
5ebd5855 JB |
227 | %dir %{_includedir}/nghttp2 |
228 | %{_includedir}/nghttp2/nghttp2*.h | |
7e68a898 JB |
229 | %{_pkgconfigdir}/libnghttp2.pc |
230 | ||
231 | %if %{with static_libs} | |
232 | %files static | |
233 | %defattr(644,root,root,755) | |
234 | %{_libdir}/libnghttp2.a | |
235 | %endif | |
90ff5ae9 | 236 | |
f04ce4b6 | 237 | %files -n python3-nghttp2 |
90ff5ae9 | 238 | %defattr(644,root,root,755) |
f04ce4b6 JP |
239 | %attr(755,root,root) %{py3_sitedir}/nghttp2.cpython-*.so |
240 | %{py3_sitedir}/python_nghttp2-%{version}-py*.egg-info | |
5ebd5855 JB |
241 | |
242 | %if %{with asio} | |
243 | %files asio | |
244 | %defattr(644,root,root,755) | |
245 | %attr(755,root,root) %{_libdir}/libnghttp2_asio.so.*.*.* | |
4a039389 | 246 | %attr(755,root,root) %ghost %{_libdir}/libnghttp2_asio.so.1 |
5ebd5855 JB |
247 | |
248 | %files asio-devel | |
249 | %defattr(644,root,root,755) | |
250 | %attr(755,root,root) %{_libdir}/libnghttp2_asio.so | |
251 | %{_includedir}/nghttp2/asio_http2.h | |
4a039389 AM |
252 | %{_includedir}/nghttp2/asio_http2_client.h |
253 | %{_includedir}/nghttp2/asio_http2_server.h | |
5ebd5855 JB |
254 | %{_pkgconfigdir}/libnghttp2_asio.pc |
255 | ||
256 | %if %{with static_libs} | |
257 | %files asio-static | |
258 | %defattr(644,root,root,755) | |
259 | %{_libdir}/libnghttp2_asio.a | |
260 | %endif | |
261 | %endif |