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