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