]> git.pld-linux.org Git - packages/nghttp2.git/blob - nghttp2.spec
e829ab7184171cc4eb0187c2b556471a10d55604
[packages/nghttp2.git] / nghttp2.spec
1 # TODO: mruby, neverbleed?
2 #
3 # Conditional build:
4 %bcond_without  asio            # libnghttp2_asio C++ library
5 %bcond_without  static_libs     # static libraries
6 %bcond_without  tests           # "make check" call
7
8 Summary:        HTTP/2.0 C library
9 Summary(pl.UTF-8):      Biblioteka C HTTP/2.0
10 Name:           nghttp2
11 Version:        1.37.0
12 Release:        2
13 License:        MIT
14 Group:          Libraries
15 #Source0Download: https://github.com/nghttp2/nghttp2/releases
16 Source0:        https://github.com/nghttp2/nghttp2/releases/download/v%{version}/%{name}-%{version}.tar.xz
17 # Source0-md5:  dc7536d02aa7d4883c20eaf637747381
18 Patch0:         %{name}-link.patch
19 Patch1:         %{name}-python.patch
20 Patch2:         %{name}-boost-1.70.patch
21 URL:            https://nghttp2.org/
22 %{?with_tests:BuildRequires:    CUnit >= 2.1}
23 BuildRequires:  autoconf >= 2.61
24 BuildRequires:  automake
25 %{?with_asio:BuildRequires:     boost-devel >= 1.54.0}
26 BuildRequires:  c-ares-devel >= 1.7.5
27 BuildRequires:  jansson-devel >= 2.5
28 BuildRequires:  libev-devel
29 # for examples
30 BuildRequires:  libevent-devel >= 2.0.8
31 BuildRequires:  libstdc++-devel >= 6:4.3
32 BuildRequires:  libtool >= 2:2.2.6
33 BuildRequires:  libxml2-devel >= 1:2.6.26
34 BuildRequires:  openssl-devel >= 1.0.1
35 BuildRequires:  pkgconfig >= 1:0.20
36 BuildRequires:  python >= 1:2.7
37 BuildRequires:  python-Cython >= 0.19
38 BuildRequires:  python-devel >= 1:2.7
39 BuildRequires:  python-setuptools
40 BuildRequires:  rpm-pythonprov
41 BuildRequires:  rpmbuild(macros) >= 1.734
42 BuildRequires:  sed >= 4.0
43 BuildRequires:  systemd-devel >= 1:209
44 BuildRequires:  tar >= 1:1.22
45 BuildRequires:  xz
46 BuildRequires:  zlib-devel >= 1.2.3
47 Requires:       %{name}-libs = %{version}-%{release}
48 Requires:       c-ares >= 1.7.5
49 Requires:       jansson >= 2.5
50 # noinst examples only
51 #Requires:      libevent >= 2.0.8
52 Requires:       libxml2 >= 1:2.6.26
53 Requires:       openssl >= 1.0.1
54 Requires:       zlib >= 1.2.3
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
65 %package libs
66 Summary:        A library implementing the HTTP/2 protocol
67 Summary(pl.UTF-8):      Biblioteka implementująca protokół HTTP/2
68 Group:          Libraries
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
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
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
83 Requires:       %{name}-libs = %{version}-%{release}
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
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
116 %package asio
117 Summary:        HTTP/2.0 C++ library
118 Summary(pl.UTF-8):      Biblioteka C++ HTTP/2.0
119 Group:          Libraries
120 Requires:       %{name}-libs = %{version}-%{release}
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
155 %prep
156 %setup -q
157 %patch0 -p1
158 %patch1 -p1
159 %patch2 -p1
160
161 %{__sed} -i -e '1s,/usr/bin/env python,%{__python},' script/fetch-ocsp-response
162
163 %build
164 %{__libtoolize}
165 %{__aclocal} -I m4
166 %{__autoconf}
167 %{__autoheader}
168 %{__automake}
169 %configure \
170         --enable-app \
171         %{?with_asio:--enable-asio-lib} \
172         --enable-hpack-tools \
173         --enable-python-bindings \
174         --disable-silent-rules \
175         %{!?with_static_libs:--disable-static} \
176         --without-jemalloc
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
191 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libnghttp2*.la
192 # packaged as %doc
193 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/nghttp2
194
195 %clean
196 rm -rf $RPM_BUILD_ROOT
197
198 %post   libs -p /sbin/ldconfig
199 %postun libs -p /sbin/ldconfig
200
201 %post   asio -p /sbin/ldconfig
202 %postun asio -p /sbin/ldconfig
203
204 %files
205 %defattr(644,root,root,755)
206 %doc AUTHORS COPYING ChangeLog README.rst
207 %attr(755,root,root) %{_bindir}/deflatehd
208 %attr(755,root,root) %{_bindir}/h2load
209 %attr(755,root,root) %{_bindir}/inflatehd
210 %attr(755,root,root) %{_bindir}/nghttp
211 %attr(755,root,root) %{_bindir}/nghttpd
212 %attr(755,root,root) %{_bindir}/nghttpx
213 %dir %{_datadir}/nghttp2
214 %attr(755,root,root) %{_datadir}/nghttp2/fetch-ocsp-response
215 %{_mandir}/man1/h2load.1*
216 %{_mandir}/man1/nghttp.1*
217 %{_mandir}/man1/nghttpd.1*
218 %{_mandir}/man1/nghttpx.1*
219
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
225 %files devel
226 %defattr(644,root,root,755)
227 %attr(755,root,root) %{_libdir}/libnghttp2.so
228 %dir %{_includedir}/nghttp2
229 %{_includedir}/nghttp2/nghttp2*.h
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
237
238 %files -n python-nghttp2
239 %defattr(644,root,root,755)
240 %attr(755,root,root) %{py_sitedir}/nghttp2.so
241 %{py_sitedir}/python_nghttp2-%{version}-py*.egg-info
242
243 %if %{with asio}
244 %files asio
245 %defattr(644,root,root,755)
246 %attr(755,root,root) %{_libdir}/libnghttp2_asio.so.*.*.*
247 %attr(755,root,root) %ghost %{_libdir}/libnghttp2_asio.so.1
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
253 %{_includedir}/nghttp2/asio_http2_client.h
254 %{_includedir}/nghttp2/asio_http2_server.h
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
This page took 0.098366 seconds and 2 git commands to generate.