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