]> git.pld-linux.org Git - packages/gnutls.git/blame - gnutls.spec
up to 3.8.2 (fixes CVE-2023-5981)
[packages/gnutls.git] / gnutls.spec
CommitLineData
547ca217
JB
1#
2# Conditional build:
63178e7f 3%bcond_without dane # libdane (DANE with DNSSEC certificate verification)
49d0f281 4%bcond_without openssl # libgnutls-openssl compatibility library
63178e7f 5%bcond_without tpm # TPM support in gnutls
3a6f7fd8 6%bcond_without tpm2 # TPM2 support in gnutls
63178e7f 7%bcond_without static_libs # static libraries
12f86e92 8%bcond_without doc # do not generate documentation
b5c41c44 9%bcond_with af_alg # Linux kernel AF_ALG based acceleration
4fe65b0d 10%bcond_with heartbeat # heartbeat extension support
3a6f7fd8 11%bcond_with ktls # Kernel TLS support
4fe65b0d 12%bcond_with srp # SRP authentication support
3a6f7fd8 13
6d7519d8 14Summary: The GNU Transport Layer Security Library
7b093bb5 15Summary(pl.UTF-8): Biblioteka GNU TLS (Transport Layer Security)
6d7519d8 16Name: gnutls
297bb239 17Version: 3.8.2
4fe65b0d 18Release: 1
4df2ddc1 19License: LGPL v2.1+ (libgnutls), LGPL v3+ (libdane), GPL v3+ (openssl library and tools)
6d7519d8 20Group: Libraries
4fe65b0d 21Source0: ftp://ftp.gnutls.org/gcrypt/gnutls/v3.8/%{name}-%{version}.tar.xz
297bb239 22# Source0-md5: 8edaa18bce2a5e7a48d8917352a2ba88
bf6baa77 23Patch0: %{name}-info.patch
4d87caea 24Patch1: %{name}-link.patch
d477527f 25Patch2: %{name}-pl.po-update.patch
866922ba 26URL: https://www.gnutls.org/
d477527f 27BuildRequires: autoconf >= 2.63
59d25b4c 28BuildRequires: automake >= 1:1.12.2
d477527f 29BuildRequires: gcc >= 5:3.2
b0199314 30BuildRequires: gettext-tools >= 0.19
63178e7f 31BuildRequires: gmp-devel
800f463c 32%{?with_doc:BuildRequires: gtk-doc >= 1.14}
15bbc850 33BuildRequires: libidn2-devel >= 2.0.0
688f68e9 34BuildRequires: libbrotli-devel >= 1.0.0
b5c41c44 35%{?with_af_alg:BuildRequires: libkcapi-devel >= 1.3.0}
71cef829 36BuildRequires: libstdc++-devel
a6d06b1c 37BuildRequires: libtasn1-devel >= 4.11
0381cb26 38BuildRequires: libunistring-devel
0d6c279f 39BuildRequires: libtool >= 2:2
3a6f7fd8 40%{?with_ktls:BuildRequires: linux-libc-headers >= 7:4.13}
d57a2cd4 41BuildRequires: nettle-devel >= 3.6
17285f2a
JB
42# miniopencdk is included in sources and currently maintained
43# as part of gnutls, not external package
44#BuildRequires: opencdk-devel >= 0.6.6
f72ee18c 45BuildRequires: p11-kit-devel >= 0.23.1
6b955dd3 46BuildRequires: perl-base
6c4df057 47BuildRequires: pkgconfig
e5ea410a 48BuildRequires: readline-devel
3a6f7fd8 49BuildRequires: rpmbuild(macros) >= 1.527
cf0a9984 50BuildRequires: sed >= 4.0
547ca217 51BuildRequires: tar >= 1:1.22
12f86e92 52%{?with_doc:BuildRequires: texinfo >= 4.8}
3a6f7fd8 53%{?with_tpm2:BuildRequires: tpm2-tss-devel}
06e5a035 54%{?with_tpm:BuildRequires: trousers-devel >= 0.3.11}
83ed044d 55%{?with_dane:BuildRequires: unbound-devel}
e44a8860 56BuildRequires: xz
5a115208 57BuildRequires: zlib-devel
688f68e9 58BuildRequires: zstd-devel >= 1.3.0
dd155803
JB
59Requires: %{name}-libs = %{version}-%{release}
60%{?with_dane:Requires: %{name}-dane = %{version}-%{release}}
6d7519d8
AM
61BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
62
df3400fb
AM
63%define _noautostrip .*\.go
64
6d7519d8
AM
65%description
66GnuTLS is a project that aims to develop a library which provides a
67secure layer, over a reliable transport layer (ie. TCP/IP). Currently
68the gnuTLS library implements the proposed standards by the IETF's TLS
69working group.
70
fc7e37b3
JR
71%description -l pl.UTF-8
72GnuTLS to projekt mający na celu stworzenie biblioteki udostępniającej
73powłokę bezpieczeństwa ponad powłoką transportową (np. TCP/IP).
6d7519d8 74Aktualnie biblioteka gnuTLS implementuje standardy proponowane przez
fc7e37b3 75grupę roboczą IETF TLS.
6d7519d8 76
dd155803
JB
77%package libs
78Summary: GnuTLS shared libraries
79Summary(pl.UTF-8): Biblioteki współdzielone GnuTLS
80Group: Libraries
688f68e9 81Requires: libbrotli >= 1.0.0
15bbc850 82Requires: libidn2 >= 2.0.0
b5c41c44 83%{?with_af_alg:Requires: libkcapi >= 1.3.0}
a6d06b1c 84Requires: libtasn1 >= 4.11
d57a2cd4 85Requires: nettle >= 3.6
dd155803 86#Requires: opencdk >= 0.6.6
f72ee18c 87Requires: p11-kit >= 0.23.1
688f68e9
JP
88Requires: zstd >= 1.3.0
89# dlopened libtss2-*
90%{?with_tpm2:Suggests: tpm2-tss}
91# dlopened libtspi
92%{?with_tpm:Suggests: trousers-libs >= 0.3.11}
dd155803
JB
93Conflicts: gnutls < 3.2.0
94
95%description libs
96GnuTLS shared libraries.
97
98%description libs -l pl.UTF-8
99Biblioteki współdzielone GnuTLS.
100
6d7519d8
AM
101%package devel
102Summary: Header files etc to develop gnutls applications
7b093bb5 103Summary(pl.UTF-8): Pliki nagłówkowe i inne do gnutls
fdd1e702 104License: LGPL v2.1+ (libgnutls), GPL v3+ (openssl library)
6d7519d8 105Group: Development/Libraries
dd155803 106Requires: %{name}-libs = %{version}-%{release}
d84852d5 107Requires: gmp-devel
688f68e9 108Requires: libbrotli-devel >= 1.0.0
3504caa7 109Requires: libidn2-devel
cba3b0de 110%{?with_af_alg:Requires: libkcapi-devel >= 1.3.0}
a6d06b1c 111Requires: libtasn1-devel >= 4.11
0381cb26 112Requires: libunistring-devel
d57a2cd4 113Requires: nettle-devel >= 3.6
17285f2a 114#Requires: opencdk-devel >= 0.6.6
f72ee18c 115Requires: p11-kit-devel >= 0.23.1
06e5a035 116%{?with_tpm:Requires: trousers-devel >= 0.3.11}
74be7fb4 117Requires: zlib-devel
688f68e9 118Requires: zstd-devel >= 1.3.0
6d7519d8
AM
119
120%description devel
121Header files etc to develop gnutls applications.
122
fc7e37b3
JR
123%description devel -l pl.UTF-8
124Pliki nagłówkowe i inne do gnutls.
6d7519d8
AM
125
126%package static
127Summary: Static gnutls library
7b093bb5 128Summary(pl.UTF-8): Biblioteka statyczna gnutls
fdd1e702 129License: LGPL v2.1+ (libgnutls), GPL v3+ (openssl library)
6d7519d8 130Group: Development/Libraries
72115ddc 131Requires: %{name}-devel = %{version}-%{release}
6d7519d8
AM
132
133%description static
134Static gnutls library.
135
fc7e37b3 136%description static -l pl.UTF-8
6d7519d8
AM
137Biblioteka statyczna gnutls.
138
71cef829
JB
139%package c++
140Summary: libgnutlsxx - C++ interface to gnutls library
7b093bb5 141Summary(pl.UTF-8): libgnutlsxx - interfejs C++ do biblioteki gnutls
24cf4cad 142License: LGPL v2.1+
71cef829 143Group: Libraries
dd155803 144Requires: %{name}-libs = %{version}-%{release}
71cef829
JB
145
146%description c++
147libgnutlsxx - C++ interface to gnutls library.
148
fc7e37b3 149%description c++ -l pl.UTF-8
71cef829
JB
150libgnutlsxx - interfejs C++ do biblioteki gnutls.
151
152%package c++-devel
153Summary: Header files for libgnutlsxx, a C++ interface to gnutls library
7b093bb5 154Summary(pl.UTF-8): Pliki nagłówkowe libgnutlsxx - interfejsu C++ do biblioteki gnutls
24cf4cad 155License: LGPL v2.1+
71cef829
JB
156Group: Development/Libraries
157Requires: %{name}-c++ = %{version}-%{release}
158Requires: %{name}-devel = %{version}-%{release}
159Requires: libstdc++-devel
160
161%description c++-devel
162Header files for libgnutlsxx, a C++ interface to gnutls library.
163
fc7e37b3
JR
164%description c++-devel -l pl.UTF-8
165Pliki nagłówkowe libgnutlsxx - interfejsu C++ do biblioteki gnutls.
71cef829
JB
166
167%package c++-static
168Summary: Static version of libgnutlsxx, a C++ interface to gnutls library
7b093bb5 169Summary(pl.UTF-8): Statyczna wersja libgnutlsxx - interfejsu C++ do biblioteki gnutls
24cf4cad 170License: LGPL v2.1+
71cef829
JB
171Group: Development/Libraries
172Requires: %{name}-c++-devel = %{version}-%{release}
173
174%description c++-static
175Static version of libgnutlsxx, a C++ interface to gnutls library.
176
fc7e37b3 177%description c++-static -l pl.UTF-8
71cef829
JB
178Statyczna wersja libgnutlsxx - interfejsu C++ do biblioteki gnutls.
179
aeb71b0b
JB
180%package dane
181Summary: DANE security library
182Summary(pl.UTF-8): Biblioteka bezpieczeństwa DANE
183Group: Libraries
dd155803 184Requires: %{name}-libs = %{version}-%{release}
aeb71b0b
JB
185
186%description dane
187DANE security library.
188
189%description dane -l pl.UTF-8
190Biblioteka bezpieczeństwa DANE.
191
192%package dane-devel
193Summary: Header file for DANE security library
194Summary(pl.UTF-8): Plik nagłówkowy biblioteki bezpieczeństwa DANE
195Group: Development/Libraries
196Requires: %{name}-dane = %{version}-%{release}
197Requires: %{name}-devel = %{version}-%{release}
198Requires: unbound-devel
199
200%description dane-devel
201Header file for DANE security library.
202
203%description dane-devel -l pl.UTF-8
204Plik nagłówkowy biblioteki bezpieczeństwa DANE.
205
206%package dane-static
207Summary: Static DANE security library
208Summary(pl.UTF-8): Statyczna biblioteka bezpieczeństwa DANE
209Group: Development/Libraries
210Requires: %{name}-dane-devel = %{version}-%{release}
211
212%description dane-static
213Static DANE security library.
214
215%description dane-static -l pl.UTF-8
216Statyczna biblioteka bezpieczeństwa DANE.
217
49d0f281
JB
218%package openssl
219Summary: OpenSSL compatibility library for GnuTLS
220Summary(pl.UTF-8): Biblioteka zgodności z OpenSSL dla GnuTLS
221Group: Libraries
222Requires: %{name}-libs = %{version}-%{release}
223
224%description openssl
225OpenSSL compatibility library for GnuTLS.
226
227%description openssl -l pl.UTF-8
228Biblioteka zgodności z OpenSSL dla GnuTLS.
229
230%package openssl-devel
231Summary: Header file for gnutls-openssl library
232Summary(pl.UTF-8): Plik nagłówkowy biblioteki gnutls-openssl
233Group: Development/Libraries
234Requires: %{name}-devel = %{version}-%{release}
235Requires: %{name}-openssl = %{version}-%{release}
236
237%description openssl-devel
238Header file for gnutls-openssl library.
239
240%description openssl-devel -l pl.UTF-8
241Plik nagłówkowy biblioteki gnutls-openssl.
242
243%package openssl-static
244Summary: Static gnutls-openssl library
245Summary(pl.UTF-8): Statyczna biblioteka gnutls-openssl
246Group: Development/Libraries
247Requires: %{name}-openssl-devel = %{version}-%{release}
248
249%description openssl-static
250Static gnutls-openssl library.
251
252%description openssl-static -l pl.UTF-8
253Statyczna biblioteka gnutls-openssl.
254
6d7519d8 255%prep
0e82351f 256%setup -q
67b46ca6 257%patch0 -p1
4d87caea 258%patch1 -p1
d477527f 259%patch2 -p1
547ca217
JB
260
261%{__rm} po/stamp-po
6d7519d8
AM
262
263%build
5a115208 264%{__libtoolize}
3a6f7fd8 265%{__aclocal} -I m4 -I src/gl/m4 -I lib/unistring/m4
d6e4f2bd
JB
266%{__autoconf}
267%{__autoheader}
268%{__automake}
6d7519d8 269%configure \
b5c41c44 270 %{?with_af_alg:--enable-afalg} \
0255a2d6 271 %{!?with_doc:--disable-doc} \
4fe65b0d 272 %{__enable_disable heartbeat heartbeat-support} \
3a6f7fd8 273 %{__enable_disable ktls} \
4fe65b0d 274 %{__enable_disable srp srp-authentication} \
9f330a0f 275 %{?with_openssl:--enable-openssl-compatibility} \
41fffb0a 276 --disable-silent-rules \
63178e7f 277 %{?with_static_libs:--enable-static} \
0089fafa 278 --with-default-trust-store-file=/etc/certs/ca-certificates.crt \
12f86e92 279 %{!?with_tpm:--without-tpm} \
3a6f7fd8 280 %{__with_without tpm2} \
0255a2d6 281 --with-trousers-lib=%{_libdir}/libtspi.so.1
5a115208 282
e3a4b513 283%{__make}
6d7519d8
AM
284
285%install
286rm -rf $RPM_BUILD_ROOT
287
288%{__make} install \
d711a6c0 289 DESTDIR=$RPM_BUILD_ROOT
6d7519d8 290
fdd1e702
JB
291# although libgnutls.la is obsoleted by pkg-config, there is
292# .pc file missing for libgnutls-openssl, and it needs libgnutls.la
8e4a1eaa 293
3504caa7 294# images for (not installed) htmlized infos - already packaged with infos
5f4f75f8 295%if %{with doc}
3504caa7 296%{__rm} $RPM_BUILD_ROOT%{_docdir}/gnutls/*.png
5f4f75f8 297%endif
3504caa7 298
63178e7f 299%{__rm} -f $RPM_BUILD_ROOT%{_infodir}/dir
3c916209 300
547ca217 301%find_lang %{name}
b5ab22ee 302
6d7519d8
AM
303%clean
304rm -rf $RPM_BUILD_ROOT
305
10899c2c 306%post
10899c2c
JB
307[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir %{_infodir} >/dev/null 2>&1
308
309%postun
10899c2c 310[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir %{_infodir} >/dev/null 2>&1
0522b080 311
dd155803
JB
312%post libs -p /sbin/ldconfig
313%postun libs -p /sbin/ldconfig
314
71cef829
JB
315%post c++ -p /sbin/ldconfig
316%postun c++ -p /sbin/ldconfig
317
49d0f281
JB
318%post dane -p /sbin/ldconfig
319%postun dane -p /sbin/ldconfig
320
321%post openssl -p /sbin/ldconfig
322%postun openssl -p /sbin/ldconfig
323
547ca217 324%files -f %{name}.lang
6d7519d8 325%defattr(644,root,root,755)
b0199314 326%doc AUTHORS ChangeLog NEWS README.md THANKS
d191db7f 327%attr(755,root,root) %{_bindir}/certtool
71cef829 328%attr(755,root,root) %{_bindir}/gnutls-*
9dc804da 329%attr(755,root,root) %{_bindir}/ocsptool
41fffb0a 330%attr(755,root,root) %{_bindir}/p11tool
2637a2e1 331%attr(755,root,root) %{_bindir}/psktool
4fe65b0d 332%{?with_srp:%attr(755,root,root) %{_bindir}/srptool}
cc933e6a 333%{?with_tpm:%attr(755,root,root) %{_bindir}/tpmtool}
12f86e92 334%if %{with doc}
584b5346 335%{_mandir}/man1/certtool.1*
71cef829 336%{_mandir}/man1/gnutls-*.1*
f2e1d83e 337%{_mandir}/man1/ocsptool.1*
41fffb0a 338%{_mandir}/man1/p11tool.1*
2637a2e1 339%{_mandir}/man1/psktool.1*
4fe65b0d 340%{?with_srp:%{_mandir}/man1/srptool.1*}
0089fafa 341%{_mandir}/man1/tpmtool.1*
71cef829 342%{_infodir}/gnutls.info*
24cf4cad 343%{_infodir}/gnutls-*.png
41fffb0a 344%{_infodir}/pkcs11-vision.png
12f86e92 345%endif
6d7519d8 346
dd155803
JB
347%files libs
348%defattr(644,root,root,755)
349%attr(755,root,root) %{_libdir}/libgnutls.so.*.*.*
f72ee18c 350%attr(755,root,root) %ghost %{_libdir}/libgnutls.so.30
dd155803 351
6d7519d8
AM
352%files devel
353%defattr(644,root,root,755)
71cef829 354%attr(755,root,root) %{_libdir}/libgnutls.so
71cef829 355%{_libdir}/libgnutls.la
07a67478 356%{_includedir}/gnutls
aeb71b0b 357%{?with_dane:%exclude %{_includedir}/gnutls/dane.h}
71cef829 358%exclude %{_includedir}/gnutls/gnutlsxx.h
49d0f281 359%{?with_openssl:%exclude %{_includedir}/gnutls/openssl.h}
71cef829 360%{_pkgconfigdir}/gnutls.pc
12f86e92 361%{?with_doc:%{_mandir}/man3/gnutls_*.3*}
6d7519d8 362
63178e7f 363%if %{with static_libs}
6d7519d8
AM
364%files static
365%defattr(644,root,root,755)
71cef829 366%{_libdir}/libgnutls.a
63178e7f 367%endif
71cef829
JB
368
369%files c++
370%defattr(644,root,root,755)
371%attr(755,root,root) %{_libdir}/libgnutlsxx.so.*.*.*
688f68e9 372%attr(755,root,root) %ghost %{_libdir}/libgnutlsxx.so.30
71cef829
JB
373
374%files c++-devel
375%defattr(644,root,root,755)
376%attr(755,root,root) %{_libdir}/libgnutlsxx.so
377%{_libdir}/libgnutlsxx.la
378%{_includedir}/gnutls/gnutlsxx.h
379
63178e7f 380%if %{with static_libs}
71cef829
JB
381%files c++-static
382%defattr(644,root,root,755)
383%{_libdir}/libgnutlsxx.a
63178e7f 384%endif
3c916209 385
aeb71b0b
JB
386%if %{with dane}
387%files dane
388%defattr(644,root,root,755)
389%attr(755,root,root) %{_bindir}/danetool
390%attr(755,root,root) %{_libdir}/libgnutls-dane.so.*.*.*
391%attr(755,root,root) %ghost %{_libdir}/libgnutls-dane.so.0
12f86e92 392%{?with_doc:%{_mandir}/man1/danetool.1*}
aeb71b0b
JB
393
394%files dane-devel
395%defattr(644,root,root,755)
396%attr(755,root,root) %{_libdir}/libgnutls-dane.so
397%{_libdir}/libgnutls-dane.la
398%{_includedir}/gnutls/dane.h
399%{_pkgconfigdir}/gnutls-dane.pc
5f4f75f8 400%if %{with doc}
fb8445d7 401%{_mandir}/man3/dane_*.3*
5f4f75f8 402%endif
aeb71b0b 403
63178e7f 404%if %{with static_libs}
aeb71b0b
JB
405%files dane-static
406%defattr(644,root,root,755)
407%{_libdir}/libgnutls-dane.a
408%endif
63178e7f 409%endif
aeb71b0b 410
49d0f281
JB
411%if %{with openssl}
412%files openssl
413%defattr(644,root,root,755)
414%attr(755,root,root) %{_libdir}/libgnutls-openssl.so.*.*.*
415%attr(755,root,root) %ghost %{_libdir}/libgnutls-openssl.so.27
416
417%files openssl-devel
418%defattr(644,root,root,755)
419%attr(755,root,root) %{_libdir}/libgnutls-openssl.so
420%{_libdir}/libgnutls-openssl.la
421%{_includedir}/gnutls/openssl.h
422
5f4f75f8 423%if %{with static_libs}
49d0f281
JB
424%files openssl-static
425%defattr(644,root,root,755)
426%{_libdir}/libgnutls-openssl.a
427%endif
5f4f75f8 428%endif
This page took 0.146037 seconds and 4 git commands to generate.