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