3 %bcond_without dane # libdane (DANE with DNSSEC certificate verification)
4 %bcond_without openssl # libgnutls-openssl compatibility library
5 %bcond_without tpm # TPM support in gnutls
6 %bcond_without tpm2 # TPM2 support in gnutls
7 %bcond_without static_libs # static libraries
8 %bcond_without doc # do not generate documentation
9 %bcond_without guile # Guile binding
10 %bcond_with af_alg # Linux kernel AF_ALG based acceleration
11 %bcond_with ktls # Kernel TLS support
13 Summary: The GNU Transport Layer Security Library
14 Summary(pl.UTF-8): Biblioteka GNU TLS (Transport Layer Security)
18 License: LGPL v2.1+ (libgnutls), LGPL v3+ (libdane), GPL v3+ (openssl library and tools)
20 Source0: ftp://ftp.gnutls.org/gcrypt/gnutls/v3.7/%{name}-%{version}.tar.xz
21 # Source0-md5: 4bce06332c525eae540bb237433d4225
22 Patch0: %{name}-info.patch
23 Patch1: %{name}-link.patch
24 Patch2: %{name}-pl.po-update.patch
26 URL: https://www.gnutls.org/
27 BuildRequires: autoconf >= 2.63
28 BuildRequires: automake >= 1:1.12.2
29 BuildRequires: gcc >= 5:3.2
30 BuildRequires: gettext-tools >= 0.19
31 BuildRequires: gmp-devel
32 %{?with_doc:BuildRequires: gtk-doc >= 1.14}
33 %{?with_guile:BuildRequires: guile-devel >= 5:2.2.0}
34 BuildRequires: libidn2-devel >= 2.0.0
35 BuildRequires: libbrotli-devel >= 1.0.0
36 %{?with_af_alg:BuildRequires: libkcapi-devel >= 1.3.0}
37 BuildRequires: libstdc++-devel
38 BuildRequires: libtasn1-devel >= 4.11
39 BuildRequires: libunistring-devel
40 BuildRequires: libtool >= 2:2
41 %{?with_ktls:BuildRequires: linux-libc-headers >= 7:4.13}
42 BuildRequires: nettle-devel >= 3.6
43 # miniopencdk is included in sources and currently maintained
44 # as part of gnutls, not external package
45 #BuildRequires: opencdk-devel >= 0.6.6
46 BuildRequires: p11-kit-devel >= 0.23.1
47 BuildRequires: pkgconfig
48 BuildRequires: readline-devel
49 BuildRequires: rpmbuild(macros) >= 1.527
50 BuildRequires: sed >= 4.0
51 BuildRequires: tar >= 1:1.22
52 %{?with_doc:BuildRequires: texinfo >= 4.8}
53 %{?with_tpm2:BuildRequires: tpm2-tss-devel}
54 %{?with_tpm:BuildRequires: trousers-devel >= 0.3.11}
55 %{?with_dane:BuildRequires: unbound-devel}
57 BuildRequires: zlib-devel
58 BuildRequires: zstd-devel >= 1.3.0
59 Requires: %{name}-libs = %{version}-%{release}
60 %{?with_dane:Requires: %{name}-dane = %{version}-%{release}}
61 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
63 %define _noautostrip .*\.go
66 GnuTLS is a project that aims to develop a library which provides a
67 secure layer, over a reliable transport layer (ie. TCP/IP). Currently
68 the gnuTLS library implements the proposed standards by the IETF's TLS
71 %description -l pl.UTF-8
72 GnuTLS to projekt mający na celu stworzenie biblioteki udostępniającej
73 powłokę bezpieczeństwa ponad powłoką transportową (np. TCP/IP).
74 Aktualnie biblioteka gnuTLS implementuje standardy proponowane przez
75 grupę roboczą IETF TLS.
78 Summary: GnuTLS shared libraries
79 Summary(pl.UTF-8): Biblioteki współdzielone GnuTLS
81 Requires: libbrotli >= 1.0.0
82 Requires: libidn2 >= 2.0.0
83 %{?with_af_alg:Requires: libkcapi >= 1.3.0}
84 Requires: libtasn1 >= 4.11
85 Requires: nettle >= 3.6
86 #Requires: opencdk >= 0.6.6
87 Requires: p11-kit >= 0.23.1
88 Requires: zstd >= 1.3.0
90 %{?with_tpm2:Suggests: tpm2-tss}
92 %{?with_tpm:Suggests: trousers-libs >= 0.3.11}
93 Conflicts: gnutls < 3.2.0
96 GnuTLS shared libraries.
98 %description libs -l pl.UTF-8
99 Biblioteki współdzielone GnuTLS.
102 Summary: Header files etc to develop gnutls applications
103 Summary(pl.UTF-8): Pliki nagłówkowe i inne do gnutls
104 License: LGPL v2.1+ (libgnutls), GPL v3+ (openssl library)
105 Group: Development/Libraries
106 Requires: %{name}-libs = %{version}-%{release}
108 Requires: libbrotli-devel >= 1.0.0
109 Requires: libidn2-devel
110 Requires: libtasn1-devel >= 4.11
111 Requires: libunistring-devel
112 Requires: nettle-devel >= 3.6
113 #Requires: opencdk-devel >= 0.6.6
114 Requires: p11-kit-devel >= 0.23.1
115 %{?with_tpm:Requires: trousers-devel >= 0.3.11}
117 Requires: zstd-devel >= 1.3.0
120 Header files etc to develop gnutls applications.
122 %description devel -l pl.UTF-8
123 Pliki nagłówkowe i inne do gnutls.
126 Summary: Static gnutls library
127 Summary(pl.UTF-8): Biblioteka statyczna gnutls
128 License: LGPL v2.1+ (libgnutls), GPL v3+ (openssl library)
129 Group: Development/Libraries
130 Requires: %{name}-devel = %{version}-%{release}
133 Static gnutls library.
135 %description static -l pl.UTF-8
136 Biblioteka statyczna gnutls.
139 Summary: libgnutlsxx - C++ interface to gnutls library
140 Summary(pl.UTF-8): libgnutlsxx - interfejs C++ do biblioteki gnutls
143 Requires: %{name}-libs = %{version}-%{release}
146 libgnutlsxx - C++ interface to gnutls library.
148 %description c++ -l pl.UTF-8
149 libgnutlsxx - interfejs C++ do biblioteki gnutls.
152 Summary: Header files for libgnutlsxx, a C++ interface to gnutls library
153 Summary(pl.UTF-8): Pliki nagłówkowe libgnutlsxx - interfejsu C++ do biblioteki gnutls
155 Group: Development/Libraries
156 Requires: %{name}-c++ = %{version}-%{release}
157 Requires: %{name}-devel = %{version}-%{release}
158 Requires: libstdc++-devel
160 %description c++-devel
161 Header files for libgnutlsxx, a C++ interface to gnutls library.
163 %description c++-devel -l pl.UTF-8
164 Pliki nagłówkowe libgnutlsxx - interfejsu C++ do biblioteki gnutls.
167 Summary: Static version of libgnutlsxx, a C++ interface to gnutls library
168 Summary(pl.UTF-8): Statyczna wersja libgnutlsxx - interfejsu C++ do biblioteki gnutls
170 Group: Development/Libraries
171 Requires: %{name}-c++-devel = %{version}-%{release}
173 %description c++-static
174 Static version of libgnutlsxx, a C++ interface to gnutls library.
176 %description c++-static -l pl.UTF-8
177 Statyczna wersja libgnutlsxx - interfejsu C++ do biblioteki gnutls.
180 Summary: DANE security library
181 Summary(pl.UTF-8): Biblioteka bezpieczeństwa DANE
183 Requires: %{name}-libs = %{version}-%{release}
186 DANE security library.
188 %description dane -l pl.UTF-8
189 Biblioteka bezpieczeństwa DANE.
192 Summary: Header file for DANE security library
193 Summary(pl.UTF-8): Plik nagłówkowy biblioteki bezpieczeństwa DANE
194 Group: Development/Libraries
195 Requires: %{name}-dane = %{version}-%{release}
196 Requires: %{name}-devel = %{version}-%{release}
197 Requires: unbound-devel
199 %description dane-devel
200 Header file for DANE security library.
202 %description dane-devel -l pl.UTF-8
203 Plik nagłówkowy biblioteki bezpieczeństwa DANE.
206 Summary: Static DANE security library
207 Summary(pl.UTF-8): Statyczna biblioteka bezpieczeństwa DANE
208 Group: Development/Libraries
209 Requires: %{name}-dane-devel = %{version}-%{release}
211 %description dane-static
212 Static DANE security library.
214 %description dane-static -l pl.UTF-8
215 Statyczna biblioteka bezpieczeństwa DANE.
218 Summary: OpenSSL compatibility library for GnuTLS
219 Summary(pl.UTF-8): Biblioteka zgodności z OpenSSL dla GnuTLS
221 Requires: %{name}-libs = %{version}-%{release}
224 OpenSSL compatibility library for GnuTLS.
226 %description openssl -l pl.UTF-8
227 Biblioteka zgodności z OpenSSL dla GnuTLS.
229 %package openssl-devel
230 Summary: Header file for gnutls-openssl library
231 Summary(pl.UTF-8): Plik nagłówkowy biblioteki gnutls-openssl
232 Group: Development/Libraries
233 Requires: %{name}-devel = %{version}-%{release}
234 Requires: %{name}-openssl = %{version}-%{release}
236 %description openssl-devel
237 Header file for gnutls-openssl library.
239 %description openssl-devel -l pl.UTF-8
240 Plik nagłówkowy biblioteki gnutls-openssl.
242 %package openssl-static
243 Summary: Static gnutls-openssl library
244 Summary(pl.UTF-8): Statyczna biblioteka gnutls-openssl
245 Group: Development/Libraries
246 Requires: %{name}-openssl-devel = %{version}-%{release}
248 %description openssl-static
249 Static gnutls-openssl library.
251 %description openssl-static -l pl.UTF-8
252 Statyczna biblioteka gnutls-openssl.
254 %package -n guile-gnutls
255 Summary: Guile bindings for GnuTLS
256 Summary(pl.UTF-8): Wiązania Guile do GnuTLS
258 Group: Development/Languages
259 Requires: %{name}-libs = %{version}-%{release}
260 Requires: guile >= 5:2.2.0
262 %description -n guile-gnutls
263 Guile bindings for GnuTLS.
265 %description -n guile-gnutls -l pl.UTF-8
266 Wiązania Guile do GnuTLS.
279 %{__aclocal} -I m4 -I src/gl/m4 -I lib/unistring/m4
284 %{?with_af_alg:--enable-afalg} \
285 %{!?with_doc:--disable-doc} \
286 %{!?with_guile:--disable-guile} \
287 %{__enable_disable ktls} \
288 %{?with_openssl:--enable-openssl-compatibility} \
289 --disable-silent-rules \
290 %{?with_static_libs:--enable-static} \
291 --with-default-trust-store-file=/etc/certs/ca-certificates.crt \
292 %{!?with_tpm:--without-tpm} \
293 %{__with_without tpm2} \
294 --with-trousers-lib=%{_libdir}/libtspi.so.1
299 rm -rf $RPM_BUILD_ROOT
302 DESTDIR=$RPM_BUILD_ROOT
304 # although libgnutls.la is obsoleted by pkg-config, there is
305 # .pc file missing for libgnutls-openssl, and it needs libgnutls.la
308 # guile module - dynamic only
309 %{__rm} $RPM_BUILD_ROOT%{_libdir}/guile/3.*/extensions/guile-gnutls-*.la
310 %if %{with static_libs}
311 %{__rm} $RPM_BUILD_ROOT%{_libdir}/guile/3.*/extensions/guile-gnutls-*.a
315 # images for (not installed) htmlized infos - already packaged with infos
317 %{__rm} $RPM_BUILD_ROOT%{_docdir}/gnutls/*.png
320 %{__rm} -f $RPM_BUILD_ROOT%{_infodir}/dir
325 rm -rf $RPM_BUILD_ROOT
328 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir %{_infodir} >/dev/null 2>&1
331 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir %{_infodir} >/dev/null 2>&1
333 %post libs -p /sbin/ldconfig
334 %postun libs -p /sbin/ldconfig
336 %post c++ -p /sbin/ldconfig
337 %postun c++ -p /sbin/ldconfig
339 %post dane -p /sbin/ldconfig
340 %postun dane -p /sbin/ldconfig
342 %post openssl -p /sbin/ldconfig
343 %postun openssl -p /sbin/ldconfig
345 %post -n guile-gnutls -p /sbin/ldconfig
346 %postun -n guile-gnutls -p /sbin/ldconfig
348 %files -f %{name}.lang
349 %defattr(644,root,root,755)
350 %doc AUTHORS ChangeLog NEWS README.md THANKS
351 %attr(755,root,root) %{_bindir}/certtool
352 %attr(755,root,root) %{_bindir}/gnutls-*
353 %attr(755,root,root) %{_bindir}/ocsptool
354 %attr(755,root,root) %{_bindir}/p11tool
355 %attr(755,root,root) %{_bindir}/psktool
356 %attr(755,root,root) %{_bindir}/srptool
357 %{?with_tpm:%attr(755,root,root) %{_bindir}/tpmtool}
359 %{_mandir}/man1/certtool.1*
360 %{_mandir}/man1/gnutls-*.1*
361 %{_mandir}/man1/ocsptool.1*
362 %{_mandir}/man1/p11tool.1*
363 %{_mandir}/man1/psktool.1*
364 %{_mandir}/man1/srptool.1*
365 %{_mandir}/man1/tpmtool.1*
366 %{_infodir}/gnutls.info*
367 %{_infodir}/gnutls-*.png
368 %{_infodir}/pkcs11-vision.png
372 %defattr(644,root,root,755)
373 %attr(755,root,root) %{_libdir}/libgnutls.so.*.*.*
374 %attr(755,root,root) %ghost %{_libdir}/libgnutls.so.30
377 %defattr(644,root,root,755)
378 %attr(755,root,root) %{_libdir}/libgnutls.so
379 %{_libdir}/libgnutls.la
380 %{_includedir}/gnutls
381 %{?with_dane:%exclude %{_includedir}/gnutls/dane.h}
382 %exclude %{_includedir}/gnutls/gnutlsxx.h
383 %{?with_openssl:%exclude %{_includedir}/gnutls/openssl.h}
384 %{_pkgconfigdir}/gnutls.pc
385 %{?with_doc:%{_mandir}/man3/gnutls_*.3*}
387 %if %{with static_libs}
389 %defattr(644,root,root,755)
390 %{_libdir}/libgnutls.a
394 %defattr(644,root,root,755)
395 %attr(755,root,root) %{_libdir}/libgnutlsxx.so.*.*.*
396 %attr(755,root,root) %ghost %{_libdir}/libgnutlsxx.so.30
399 %defattr(644,root,root,755)
400 %attr(755,root,root) %{_libdir}/libgnutlsxx.so
401 %{_libdir}/libgnutlsxx.la
402 %{_includedir}/gnutls/gnutlsxx.h
404 %if %{with static_libs}
406 %defattr(644,root,root,755)
407 %{_libdir}/libgnutlsxx.a
412 %defattr(644,root,root,755)
413 %attr(755,root,root) %{_bindir}/danetool
414 %attr(755,root,root) %{_libdir}/libgnutls-dane.so.*.*.*
415 %attr(755,root,root) %ghost %{_libdir}/libgnutls-dane.so.0
416 %{?with_doc:%{_mandir}/man1/danetool.1*}
419 %defattr(644,root,root,755)
420 %attr(755,root,root) %{_libdir}/libgnutls-dane.so
421 %{_libdir}/libgnutls-dane.la
422 %{_includedir}/gnutls/dane.h
423 %{_pkgconfigdir}/gnutls-dane.pc
425 %{_mandir}/man3/dane_*.3*
428 %if %{with static_libs}
430 %defattr(644,root,root,755)
431 %{_libdir}/libgnutls-dane.a
437 %defattr(644,root,root,755)
438 %attr(755,root,root) %{_libdir}/libgnutls-openssl.so.*.*.*
439 %attr(755,root,root) %ghost %{_libdir}/libgnutls-openssl.so.27
442 %defattr(644,root,root,755)
443 %attr(755,root,root) %{_libdir}/libgnutls-openssl.so
444 %{_libdir}/libgnutls-openssl.la
445 %{_includedir}/gnutls/openssl.h
447 %if %{with static_libs}
448 %files openssl-static
449 %defattr(644,root,root,755)
450 %{_libdir}/libgnutls-openssl.a
455 %files -n guile-gnutls
456 %defattr(644,root,root,755)
457 %attr(755,root,root) %{_libdir}/guile/3.*/extensions/guile-gnutls-v-2.so*
458 %{_libdir}/guile/3.*/site-ccache/gnutls.go
459 %{_libdir}/guile/3.*/site-ccache/gnutls
460 %{_datadir}/guile/site/3.*/gnutls.scm
461 %{_datadir}/guile/site/3.*/gnutls
463 %{_infodir}/gnutls-guile.info*