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