]> git.pld-linux.org Git - packages/nghttp2.git/blob - nghttp2.spec
ef8e38ef3ac9f677cfe8519e439619ecaffa3c0c
[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.5.0
11 Release:        1
12 License:        MIT
13 Group:          Libraries
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
16 # Source0-md5:  eac2f94ca8f233a861c6a7f73c61a29d
17 Patch0:         %{name}-link.patch
18 Patch1:         %{name}-python.patch
19 URL:            https://github.com/tatsuhiro-t/nghttp2
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:       jansson >= 2.5
42 Requires:       libevent >= 2.0.8
43 Requires:       libxml2 >= 1:2.7.7
44 Requires:       openssl >= 1.0.1
45 Requires:       spdylay >= 1.3.2
46 Requires:       zlib >= 1.2.3
47 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48
49 # non-function symbols std::__once_call, std::__once_callable
50 %define         skip_post_check_so      libnghttp2_asio.so.*
51
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
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
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
137 %prep
138 %setup -q
139 %patch0 -p1
140 %patch1 -p1
141
142 %{__sed} -i -e '1s,/usr/bin/env python,%{__python},' script/fetch-ocsp-response
143
144 %build
145 %{__libtoolize}
146 %{__aclocal} -I m4
147 %{__autoconf}
148 %{__autoheader}
149 %{__automake}
150 %configure \
151         --enable-app \
152         %{?with_asio:--enable-asio-lib} \
153         --enable-hpack-tools \
154         --enable-python-bindings \
155         --disable-silent-rules \
156         %{!?with_static_libs:--disable-static} \
157         --without-jemalloc
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
172 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libnghttp2*.la
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
182 %post   asio -p /sbin/ldconfig
183 %postun asio -p /sbin/ldconfig
184
185 %files
186 %defattr(644,root,root,755)
187 %doc AUTHORS COPYING README.rst
188 %attr(755,root,root) %{_bindir}/deflatehd
189 %attr(755,root,root) %{_bindir}/h2load
190 %attr(755,root,root) %{_bindir}/inflatehd
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.*.*.*
195 %attr(755,root,root) %ghost %{_libdir}/libnghttp2.so.14
196 %dir %{_datadir}/nghttp2
197 %attr(755,root,root) %{_datadir}/nghttp2/fetch-ocsp-response
198 %{_mandir}/man1/h2load.1*
199 %{_mandir}/man1/nghttp.1*
200 %{_mandir}/man1/nghttpd.1*
201 %{_mandir}/man1/nghttpx.1*
202
203 %files devel
204 %defattr(644,root,root,755)
205 %attr(755,root,root) %{_libdir}/libnghttp2.so
206 %dir %{_includedir}/nghttp2
207 %{_includedir}/nghttp2/nghttp2*.h
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
215
216 %files -n python-nghttp2
217 %defattr(644,root,root,755)
218 %attr(755,root,root) %{py_sitedir}/nghttp2.so
219 %{py_sitedir}/python_nghttp2-%{version}-py*.egg-info
220
221 %if %{with asio}
222 %files asio
223 %defattr(644,root,root,755)
224 %attr(755,root,root) %{_libdir}/libnghttp2_asio.so.*.*.*
225 %attr(755,root,root) %ghost %{_libdir}/libnghttp2_asio.so.1
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
231 %{_includedir}/nghttp2/asio_http2_client.h
232 %{_includedir}/nghttp2/asio_http2_server.h
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
This page took 0.072036 seconds and 2 git commands to generate.