]>
Commit | Line | Data |
---|---|---|
db338154 | 1 | # TODO: mruby, neverbleed for nghttpx? |
7e68a898 JB |
2 | # |
3 | # Conditional build: | |
a1cdf081 | 4 | %bcond_without tools # applications (nghttp, nghttpd, nghttpx, h2load) and hpack-tools (deflatehd, inflatehd) |
db338154 JB |
5 | %bcond_with brotli # brotli support in apps |
6 | %bcond_with http3 # HTTP/3 support in apps (h2load, nghttpx) | |
7 | %bcond_with libbpf # BPF support in nghttpx (requires CC=clang) | |
5ebd5855 | 8 | %bcond_without static_libs # static libraries |
db338154 | 9 | %bcond_without systemd # systemd support in nghttpx |
5ebd5855 | 10 | %bcond_without tests # "make check" call |
7e68a898 JB |
11 | |
12 | Summary: HTTP/2.0 C library | |
13 | Summary(pl.UTF-8): Biblioteka C HTTP/2.0 | |
14 | Name: nghttp2 | |
279dc632 | 15 | Version: 1.62.1 |
c14fa1d7 | 16 | Release: 1 |
7e68a898 JB |
17 | License: MIT |
18 | Group: Libraries | |
27bc50c7 JB |
19 | #Source0Download: https://github.com/nghttp2/nghttp2/releases |
20 | Source0: https://github.com/nghttp2/nghttp2/releases/download/v%{version}/%{name}-%{version}.tar.xz | |
279dc632 | 21 | # Source0-md5: 965f9a9e0f0eef12d8976fb33e9312ef |
27bc50c7 | 22 | URL: https://nghttp2.org/ |
7e68a898 JB |
23 | BuildRequires: autoconf >= 2.61 |
24 | BuildRequires: automake | |
a1cdf081 JB |
25 | BuildRequires: libtool >= 2:2.2.6 |
26 | BuildRequires: pkgconfig >= 1:0.20 | |
27 | BuildRequires: python3 >= 1:3.8 | |
28 | BuildRequires: rpmbuild(macros) >= 1.734 | |
29 | BuildRequires: sed >= 4.0 | |
30 | BuildRequires: tar >= 1:1.22 | |
31 | BuildRequires: xz | |
32 | %if %{with tools} | |
adcde645 | 33 | BuildRequires: c-ares-devel >= 1.16.0 |
c02473f3 | 34 | BuildRequires: jansson-devel >= 2.5 |
35859362 | 35 | %{?with_libbpf:BuildRequires: libbpf-devel >= 0.7.0} |
db338154 | 36 | %{?with_brotli:BuildRequires: libbrotli-devel >= 1.0.9} |
5ebd5855 | 37 | BuildRequires: libev-devel |
db338154 | 38 | # libevent + libevent_openssl for examples |
7e68a898 | 39 | BuildRequires: libevent-devel >= 2.0.8 |
a1cdf081 | 40 | BuildRequires: libstdc++-devel >= 6:11 |
b0744631 | 41 | BuildRequires: libxml2-devel >= 1:2.6.26 |
87568588 | 42 | %{?with_http3:BuildRequires: nghttp3-devel >= 1.1.0} |
176ff3e9 | 43 | %{?with_http3:BuildRequires: ngtcp2-devel >= 1.4.0} |
db338154 | 44 | #%{?with_http3:BuildRequires: ngtcp2-crypto-quictls >= 1.0.0 or ngtcp2-crypto-boringssl} |
87568588 | 45 | BuildRequires: openssl-devel >= 1.1.1 |
35859362 | 46 | %{?with_http3:BuildRequires: openssl-devel(quic)} |
a8f9a0f9 | 47 | %{?with_systemd:BuildRequires: systemd-devel >= 1:209} |
7e68a898 | 48 | BuildRequires: zlib-devel >= 1.2.3 |
a1cdf081 | 49 | %endif |
218ea8da | 50 | Requires: %{name}-libs = %{version}-%{release} |
adcde645 | 51 | Requires: c-ares >= 1.16.0 |
9f92d897 | 52 | Requires: jansson >= 2.5 |
db338154 | 53 | %{?with_brotli:Requires: libbrotli >= 1.0.9} |
9f92d897 JB |
54 | # noinst examples only |
55 | #Requires: libevent >= 2.0.8 | |
b0744631 | 56 | Requires: libxml2 >= 1:2.6.26 |
87568588 | 57 | Requires: openssl >= 1.1.1 |
9f92d897 | 58 | Requires: zlib >= 1.2.3 |
7e68a898 JB |
59 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
60 | ||
61 | %description | |
62 | This is an experimental implementation of Hypertext Transfer Protocol | |
63 | version 2.0. | |
64 | ||
65 | %description -l pl.UTF-8 | |
66 | Ta biblioteka jest eksperymentalną implementacją protokołu HTTP | |
67 | (Hypertext Transfer Protocol) w wersji 2.0. | |
68 | ||
218ea8da ER |
69 | %package libs |
70 | Summary: A library implementing the HTTP/2 protocol | |
27bc50c7 | 71 | Summary(pl.UTF-8): Biblioteka implementująca protokół HTTP/2 |
218ea8da | 72 | Group: Libraries |
034d7d03 | 73 | Obsoletes: python3-nghttp2 < 1.55.1 |
218ea8da ER |
74 | Conflicts: nghttp2 < 1.11.1-2 |
75 | ||
76 | %description libs | |
77 | libnghttp2 is a library implementing the Hypertext Transfer Protocol | |
78 | version 2 (HTTP/2) protocol in C. | |
79 | ||
27bc50c7 JB |
80 | %description libs -l pl.UTF-8 |
81 | libnghttp2 to napisana w C biblioteka implementująca protokół HTTP/2 | |
82 | (Hypertext Transfer Protocol w wersji 2). | |
83 | ||
7e68a898 JB |
84 | %package devel |
85 | Summary: Files needed for developing with libnghttp2 | |
86 | Summary(pl.UTF-8): Pliki niezbędne do tworzenia aplikacji z użyciem libnghttp2 | |
87 | Group: Development/Libraries | |
218ea8da | 88 | Requires: %{name}-libs = %{version}-%{release} |
7e68a898 JB |
89 | |
90 | %description devel | |
91 | Files needed for building applications with libnghttp2. | |
92 | ||
93 | %description devel -l pl.UTF-8 | |
94 | Pliki niezbędne do tworzenia aplikacji z użyciem libnghttp2. | |
95 | ||
96 | %package static | |
97 | Summary: Static libnghttp2 library | |
98 | Summary(pl.UTF-8): Statyczna biblioteka libnghttp2 | |
99 | Group: Development/Libraries | |
100 | Requires: %{name}-devel = %{version}-%{release} | |
101 | ||
102 | %description static | |
103 | Static libnghttp2 library. | |
104 | ||
105 | %description static -l pl.UTF-8 | |
106 | Statyczna biblioteka libnghttp2. | |
107 | ||
108 | %prep | |
90ff5ae9 | 109 | %setup -q |
7e68a898 | 110 | |
535aa5bf | 111 | %{__sed} -i -e '1s,/usr/bin/env python3,%{__python3},' script/fetch-ocsp-response |
55ef14c3 | 112 | |
7e68a898 JB |
113 | %build |
114 | %{__libtoolize} | |
115 | %{__aclocal} -I m4 | |
116 | %{__autoconf} | |
117 | %{__autoheader} | |
118 | %{__automake} | |
119 | %configure \ | |
a1cdf081 JB |
120 | %{__enable_disable tools app} \ |
121 | %{__enable_disable tools hpack-tools} \ | |
35859362 | 122 | %{?with_http3:--enable-http3} \ |
2fcd3974 | 123 | --disable-silent-rules \ |
5ebd5855 | 124 | %{!?with_static_libs:--disable-static} \ |
35859362 | 125 | --without-jemalloc \ |
db338154 JB |
126 | %{?with_libbpf:--with-libbpf} \ |
127 | %if %{with brotli} | |
128 | --with-libbrotlidec \ | |
129 | --with-libbrotlienc | |
130 | %endif | |
7e68a898 JB |
131 | |
132 | %{__make} | |
133 | ||
134 | %if %{with tests} | |
135 | %{__make} check | |
136 | %endif | |
137 | ||
138 | %install | |
139 | rm -rf $RPM_BUILD_ROOT | |
140 | ||
141 | %{__make} install \ | |
142 | DESTDIR=$RPM_BUILD_ROOT | |
143 | ||
144 | # obsoleted by pkg-config | |
5ebd5855 | 145 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libnghttp2*.la |
7e68a898 JB |
146 | # packaged as %doc |
147 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/nghttp2 | |
148 | ||
a1cdf081 JB |
149 | %if %{without tools} |
150 | %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/{h2load,nghttp,nghttpd,nghttpx}.1 | |
151 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/nghttp2 | |
152 | %endif | |
153 | ||
7e68a898 JB |
154 | %clean |
155 | rm -rf $RPM_BUILD_ROOT | |
156 | ||
218ea8da ER |
157 | %post libs -p /sbin/ldconfig |
158 | %postun libs -p /sbin/ldconfig | |
7e68a898 | 159 | |
a1cdf081 | 160 | %if %{with tools} |
7e68a898 JB |
161 | %files |
162 | %defattr(644,root,root,755) | |
90ff5ae9 | 163 | %attr(755,root,root) %{_bindir}/deflatehd |
2fcd3974 | 164 | %attr(755,root,root) %{_bindir}/h2load |
90ff5ae9 | 165 | %attr(755,root,root) %{_bindir}/inflatehd |
7e68a898 JB |
166 | %attr(755,root,root) %{_bindir}/nghttp |
167 | %attr(755,root,root) %{_bindir}/nghttpd | |
168 | %attr(755,root,root) %{_bindir}/nghttpx | |
2fcd3974 | 169 | %{_mandir}/man1/h2load.1* |
90ff5ae9 JB |
170 | %{_mandir}/man1/nghttp.1* |
171 | %{_mandir}/man1/nghttpd.1* | |
172 | %{_mandir}/man1/nghttpx.1* | |
a1cdf081 JB |
173 | %dir %{_datadir}/nghttp2 |
174 | %attr(755,root,root) %{_datadir}/nghttp2/fetch-ocsp-response | |
175 | %endif | |
7e68a898 | 176 | |
218ea8da ER |
177 | %files libs |
178 | %defattr(644,root,root,755) | |
a1cdf081 | 179 | %doc AUTHORS COPYING ChangeLog README.rst |
218ea8da ER |
180 | %attr(755,root,root) %{_libdir}/libnghttp2.so.*.*.* |
181 | %attr(755,root,root) %ghost %{_libdir}/libnghttp2.so.14 | |
182 | ||
7e68a898 JB |
183 | %files devel |
184 | %defattr(644,root,root,755) | |
185 | %attr(755,root,root) %{_libdir}/libnghttp2.so | |
5ebd5855 JB |
186 | %dir %{_includedir}/nghttp2 |
187 | %{_includedir}/nghttp2/nghttp2*.h | |
7e68a898 JB |
188 | %{_pkgconfigdir}/libnghttp2.pc |
189 | ||
190 | %if %{with static_libs} | |
191 | %files static | |
192 | %defattr(644,root,root,755) | |
193 | %{_libdir}/libnghttp2.a | |
194 | %endif |