1 # TODO: mruby, neverbleed?
4 %bcond_with http3 # experimental HTTP/3 support
5 %bcond_with libbpf # BPF support (requires CC=clang)
6 %bcond_without static_libs # static libraries
7 %bcond_without systemd # don't include systemd support
8 %bcond_without tests # "make check" call
10 Summary: HTTP/2.0 C library
11 Summary(pl.UTF-8): Biblioteka C HTTP/2.0
17 #Source0Download: https://github.com/nghttp2/nghttp2/releases
18 Source0: https://github.com/nghttp2/nghttp2/releases/download/v%{version}/%{name}-%{version}.tar.xz
19 # Source0-md5: 2b09aaea09a783b2f31e3e5adaeaecbd
20 URL: https://nghttp2.org/
21 BuildRequires: autoconf >= 2.61
22 BuildRequires: automake
23 BuildRequires: c-ares-devel >= 1.7.5
24 BuildRequires: jansson-devel >= 2.5
25 %{?with_libbpf:BuildRequires: libbpf-devel >= 0.7.0}
26 BuildRequires: libev-devel
28 BuildRequires: libevent-devel >= 2.0.8
29 BuildRequires: libstdc++-devel >= 6:5
30 BuildRequires: libtool >= 2:2.2.6
31 BuildRequires: libxml2-devel >= 1:2.6.26
32 %{?with_http3:BuildRequires: nghttp3-devel >= 1.1.0}
33 # +ngtcp2-crypto-openssl or ngtcp2-crypto-boringssl
34 %{?with_http3:BuildRequires: ngtcp2-devel >= 1.0.0}
35 BuildRequires: openssl-devel >= 1.1.1
36 %{?with_http3:BuildRequires: openssl-devel(quic)}
37 BuildRequires: pkgconfig >= 1:0.20
38 BuildRequires: python3 >= 1:3.8
39 BuildRequires: rpmbuild(macros) >= 1.734
40 BuildRequires: sed >= 4.0
41 %{?with_systemd:BuildRequires: systemd-devel >= 1:209}
42 BuildRequires: tar >= 1:1.22
44 BuildRequires: zlib-devel >= 1.2.3
45 Requires: %{name}-libs = %{version}-%{release}
46 Requires: c-ares >= 1.7.5
47 Requires: jansson >= 2.5
48 # noinst examples only
49 #Requires: libevent >= 2.0.8
50 Requires: libxml2 >= 1:2.6.26
51 Requires: openssl >= 1.1.1
52 Requires: zlib >= 1.2.3
53 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
56 This is an experimental implementation of Hypertext Transfer Protocol
59 %description -l pl.UTF-8
60 Ta biblioteka jest eksperymentalną implementacją protokołu HTTP
61 (Hypertext Transfer Protocol) w wersji 2.0.
64 Summary: A library implementing the HTTP/2 protocol
65 Summary(pl.UTF-8): Biblioteka implementująca protokół HTTP/2
67 Obsoletes: python3-nghttp2 < 1.55.1
68 Conflicts: nghttp2 < 1.11.1-2
71 libnghttp2 is a library implementing the Hypertext Transfer Protocol
72 version 2 (HTTP/2) protocol in C.
74 %description libs -l pl.UTF-8
75 libnghttp2 to napisana w C biblioteka implementująca protokół HTTP/2
76 (Hypertext Transfer Protocol w wersji 2).
79 Summary: Files needed for developing with libnghttp2
80 Summary(pl.UTF-8): Pliki niezbędne do tworzenia aplikacji z użyciem libnghttp2
81 Group: Development/Libraries
82 Requires: %{name}-libs = %{version}-%{release}
85 Files needed for building applications with libnghttp2.
87 %description devel -l pl.UTF-8
88 Pliki niezbędne do tworzenia aplikacji z użyciem libnghttp2.
91 Summary: Static libnghttp2 library
92 Summary(pl.UTF-8): Statyczna biblioteka libnghttp2
93 Group: Development/Libraries
94 Requires: %{name}-devel = %{version}-%{release}
97 Static libnghttp2 library.
99 %description static -l pl.UTF-8
100 Statyczna biblioteka libnghttp2.
105 %{__sed} -i -e '1s,/usr/bin/env python3,%{__python3},' script/fetch-ocsp-response
115 --enable-hpack-tools \
116 %{?with_http3:--enable-http3} \
117 --disable-silent-rules \
118 %{!?with_static_libs:--disable-static} \
120 %{?with_libbpf:--with-libbpf}
129 rm -rf $RPM_BUILD_ROOT
132 DESTDIR=$RPM_BUILD_ROOT
134 # obsoleted by pkg-config
135 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libnghttp2*.la
137 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/nghttp2
140 rm -rf $RPM_BUILD_ROOT
142 %post libs -p /sbin/ldconfig
143 %postun libs -p /sbin/ldconfig
146 %defattr(644,root,root,755)
147 %doc AUTHORS COPYING ChangeLog README.rst
148 %attr(755,root,root) %{_bindir}/deflatehd
149 %attr(755,root,root) %{_bindir}/h2load
150 %attr(755,root,root) %{_bindir}/inflatehd
151 %attr(755,root,root) %{_bindir}/nghttp
152 %attr(755,root,root) %{_bindir}/nghttpd
153 %attr(755,root,root) %{_bindir}/nghttpx
154 %dir %{_datadir}/nghttp2
155 %attr(755,root,root) %{_datadir}/nghttp2/fetch-ocsp-response
156 %{_mandir}/man1/h2load.1*
157 %{_mandir}/man1/nghttp.1*
158 %{_mandir}/man1/nghttpd.1*
159 %{_mandir}/man1/nghttpx.1*
162 %defattr(644,root,root,755)
163 %attr(755,root,root) %{_libdir}/libnghttp2.so.*.*.*
164 %attr(755,root,root) %ghost %{_libdir}/libnghttp2.so.14
167 %defattr(644,root,root,755)
168 %attr(755,root,root) %{_libdir}/libnghttp2.so
169 %dir %{_includedir}/nghttp2
170 %{_includedir}/nghttp2/nghttp2*.h
171 %{_pkgconfigdir}/libnghttp2.pc
173 %if %{with static_libs}
175 %defattr(644,root,root,755)
176 %{_libdir}/libnghttp2.a