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