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