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