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: 5b07c89e53a351209dc23b714da3ef98
22 Patch0: %{name}-info.patch
23 Patch1: %{name}-link.patch
24 Patch2: %{name}-pl.po-update.patch
25 URL: https://www.gnutls.org/
26 BuildRequires: autoconf >= 2.63
27 BuildRequires: automake >= 1:1.12.2
28 BuildRequires: gcc >= 5:3.2
29 BuildRequires: gettext-tools >= 0.19
30 BuildRequires: gmp-devel
31 %{?with_doc:BuildRequires: gtk-doc >= 1.14}
32 %{?with_guile:BuildRequires: guile-devel >= 5:3.0}
33 BuildRequires: libidn2-devel >= 2.0.0
34 BuildRequires: libbrotli-devel >= 1.0.0
35 %{?with_af_alg:BuildRequires: libkcapi-devel >= 1.3.0}
36 BuildRequires: libstdc++-devel
37 BuildRequires: libtasn1-devel >= 4.11
38 BuildRequires: libunistring-devel
39 BuildRequires: libtool >= 2:2
40 %{?with_ktls:BuildRequires: linux-libc-headers >= 7:4.13}
41 BuildRequires: nettle-devel >= 3.6
42 # miniopencdk is included in sources and currently maintained
43 # as part of gnutls, not external package
44 #BuildRequires: opencdk-devel >= 0.6.6
45 BuildRequires: p11-kit-devel >= 0.23.1
46 BuildRequires: pkgconfig
47 BuildRequires: readline-devel
48 BuildRequires: rpmbuild(macros) >= 1.527
49 BuildRequires: sed >= 4.0
50 BuildRequires: tar >= 1:1.22
51 %{?with_doc:BuildRequires: texinfo >= 4.8}
52 %{?with_tpm2:BuildRequires: tpm2-tss-devel}
53 %{?with_tpm:BuildRequires: trousers-devel >= 0.3.11}
54 %{?with_dane:BuildRequires: unbound-devel}
56 BuildRequires: zlib-devel
57 BuildRequires: zstd-devel >= 1.3.0
58 Requires: %{name}-libs = %{version}-%{release}
59 %{?with_dane:Requires: %{name}-dane = %{version}-%{release}}
60 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
62 %define _noautostrip .*\.go
65 GnuTLS is a project that aims to develop a library which provides a
66 secure layer, over a reliable transport layer (ie. TCP/IP). Currently
67 the gnuTLS library implements the proposed standards by the IETF's TLS
70 %description -l pl.UTF-8
71 GnuTLS to projekt mający na celu stworzenie biblioteki udostępniającej
72 powłokę bezpieczeństwa ponad powłoką transportową (np. TCP/IP).
73 Aktualnie biblioteka gnuTLS implementuje standardy proponowane przez
74 grupę roboczą IETF TLS.
77 Summary: GnuTLS shared libraries
78 Summary(pl.UTF-8): Biblioteki współdzielone GnuTLS
80 Requires: libbrotli >= 1.0.0
81 Requires: libidn2 >= 2.0.0
82 %{?with_af_alg:Requires: libkcapi >= 1.3.0}
83 Requires: libtasn1 >= 4.11
84 Requires: nettle >= 3.6
85 #Requires: opencdk >= 0.6.6
86 Requires: p11-kit >= 0.23.1
87 Requires: zstd >= 1.3.0
89 %{?with_tpm2:Suggests: tpm2-tss}
91 %{?with_tpm:Suggests: trousers-libs >= 0.3.11}
92 Conflicts: gnutls < 3.2.0
95 GnuTLS shared libraries.
97 %description libs -l pl.UTF-8
98 Biblioteki współdzielone GnuTLS.
101 Summary: Header files etc to develop gnutls applications
102 Summary(pl.UTF-8): Pliki nagłówkowe i inne do gnutls
103 License: LGPL v2.1+ (libgnutls), GPL v3+ (openssl library)
104 Group: Development/Libraries
105 Requires: %{name}-libs = %{version}-%{release}
107 Requires: libbrotli-devel >= 1.0.0
108 Requires: libidn2-devel
109 Requires: libtasn1-devel >= 4.11
110 Requires: libunistring-devel
111 Requires: nettle-devel >= 3.6
112 #Requires: opencdk-devel >= 0.6.6
113 Requires: p11-kit-devel >= 0.23.1
114 %{?with_tpm:Requires: trousers-devel >= 0.3.11}
116 Requires: zstd-devel >= 1.3.0
119 Header files etc to develop gnutls applications.
121 %description devel -l pl.UTF-8
122 Pliki nagłówkowe i inne do gnutls.
125 Summary: Static gnutls library
126 Summary(pl.UTF-8): Biblioteka statyczna gnutls
127 License: LGPL v2.1+ (libgnutls), GPL v3+ (openssl library)
128 Group: Development/Libraries
129 Requires: %{name}-devel = %{version}-%{release}
132 Static gnutls library.
134 %description static -l pl.UTF-8
135 Biblioteka statyczna gnutls.
138 Summary: libgnutlsxx - C++ interface to gnutls library
139 Summary(pl.UTF-8): libgnutlsxx - interfejs C++ do biblioteki gnutls
142 Requires: %{name}-libs = %{version}-%{release}
145 libgnutlsxx - C++ interface to gnutls library.
147 %description c++ -l pl.UTF-8
148 libgnutlsxx - interfejs C++ do biblioteki gnutls.
151 Summary: Header files for libgnutlsxx, a C++ interface to gnutls library
152 Summary(pl.UTF-8): Pliki nagłówkowe libgnutlsxx - interfejsu C++ do biblioteki gnutls
154 Group: Development/Libraries
155 Requires: %{name}-c++ = %{version}-%{release}
156 Requires: %{name}-devel = %{version}-%{release}
157 Requires: libstdc++-devel
159 %description c++-devel
160 Header files for libgnutlsxx, a C++ interface to gnutls library.
162 %description c++-devel -l pl.UTF-8
163 Pliki nagłówkowe libgnutlsxx - interfejsu C++ do biblioteki gnutls.
166 Summary: Static version of libgnutlsxx, a C++ interface to gnutls library
167 Summary(pl.UTF-8): Statyczna wersja libgnutlsxx - interfejsu C++ do biblioteki gnutls
169 Group: Development/Libraries
170 Requires: %{name}-c++-devel = %{version}-%{release}
172 %description c++-static
173 Static version of libgnutlsxx, a C++ interface to gnutls library.
175 %description c++-static -l pl.UTF-8
176 Statyczna wersja libgnutlsxx - interfejsu C++ do biblioteki gnutls.
179 Summary: DANE security library
180 Summary(pl.UTF-8): Biblioteka bezpieczeństwa DANE
182 Requires: %{name}-libs = %{version}-%{release}
185 DANE security library.
187 %description dane -l pl.UTF-8
188 Biblioteka bezpieczeństwa DANE.
191 Summary: Header file for DANE security library
192 Summary(pl.UTF-8): Plik nagłówkowy biblioteki bezpieczeństwa DANE
193 Group: Development/Libraries
194 Requires: %{name}-dane = %{version}-%{release}
195 Requires: %{name}-devel = %{version}-%{release}
196 Requires: unbound-devel
198 %description dane-devel
199 Header file for DANE security library.
201 %description dane-devel -l pl.UTF-8
202 Plik nagłówkowy biblioteki bezpieczeństwa DANE.
205 Summary: Static DANE security library
206 Summary(pl.UTF-8): Statyczna biblioteka bezpieczeństwa DANE
207 Group: Development/Libraries
208 Requires: %{name}-dane-devel = %{version}-%{release}
210 %description dane-static
211 Static DANE security library.
213 %description dane-static -l pl.UTF-8
214 Statyczna biblioteka bezpieczeństwa DANE.
217 Summary: OpenSSL compatibility library for GnuTLS
218 Summary(pl.UTF-8): Biblioteka zgodności z OpenSSL dla GnuTLS
220 Requires: %{name}-libs = %{version}-%{release}
223 OpenSSL compatibility library for GnuTLS.
225 %description openssl -l pl.UTF-8
226 Biblioteka zgodności z OpenSSL dla GnuTLS.
228 %package openssl-devel
229 Summary: Header file for gnutls-openssl library
230 Summary(pl.UTF-8): Plik nagłówkowy biblioteki gnutls-openssl
231 Group: Development/Libraries
232 Requires: %{name}-devel = %{version}-%{release}
233 Requires: %{name}-openssl = %{version}-%{release}
235 %description openssl-devel
236 Header file for gnutls-openssl library.
238 %description openssl-devel -l pl.UTF-8
239 Plik nagłówkowy biblioteki gnutls-openssl.
241 %package openssl-static
242 Summary: Static gnutls-openssl library
243 Summary(pl.UTF-8): Statyczna biblioteka gnutls-openssl
244 Group: Development/Libraries
245 Requires: %{name}-openssl-devel = %{version}-%{release}
247 %description openssl-static
248 Static gnutls-openssl library.
250 %description openssl-static -l pl.UTF-8
251 Statyczna biblioteka gnutls-openssl.
253 %package -n guile-gnutls
254 Summary: Guile bindings for GnuTLS
255 Summary(pl.UTF-8): Wiązania Guile do GnuTLS
257 Group: Development/Languages
258 Requires: %{name}-libs = %{version}-%{release}
259 Requires: guile >= 5:3.0
261 %description -n guile-gnutls
262 Guile bindings for GnuTLS.
264 %description -n guile-gnutls -l pl.UTF-8
265 Wiązania Guile do GnuTLS.
277 %{__aclocal} -I m4 -I src/gl/m4 -I lib/unistring/m4
282 %{?with_af_alg:--enable-afalg} \
283 %{!?with_doc:--disable-doc} \
284 %{!?with_guile:--disable-guile} \
285 %{__enable_disable ktls} \
286 %{?with_openssl:--enable-openssl-compatibility} \
287 --disable-silent-rules \
288 %{?with_static_libs:--enable-static} \
289 --with-default-trust-store-file=/etc/certs/ca-certificates.crt \
290 %{!?with_tpm:--without-tpm} \
291 %{__with_without tpm2} \
292 --with-trousers-lib=%{_libdir}/libtspi.so.1
297 rm -rf $RPM_BUILD_ROOT
300 DESTDIR=$RPM_BUILD_ROOT
302 # although libgnutls.la is obsoleted by pkg-config, there is
303 # .pc file missing for libgnutls-openssl, and it needs libgnutls.la
306 # guile module - dynamic only
307 %{__rm} $RPM_BUILD_ROOT%{_libdir}/guile/3.*/extensions/guile-gnutls-*.la
308 %if %{with static_libs}
309 %{__rm} $RPM_BUILD_ROOT%{_libdir}/guile/3.*/extensions/guile-gnutls-*.a
313 # images for (not installed) htmlized infos - already packaged with infos
315 %{__rm} $RPM_BUILD_ROOT%{_docdir}/gnutls/*.png
318 %{__rm} -f $RPM_BUILD_ROOT%{_infodir}/dir
323 rm -rf $RPM_BUILD_ROOT
326 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir %{_infodir} >/dev/null 2>&1
329 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir %{_infodir} >/dev/null 2>&1
331 %post libs -p /sbin/ldconfig
332 %postun libs -p /sbin/ldconfig
334 %post c++ -p /sbin/ldconfig
335 %postun c++ -p /sbin/ldconfig
337 %post dane -p /sbin/ldconfig
338 %postun dane -p /sbin/ldconfig
340 %post openssl -p /sbin/ldconfig
341 %postun openssl -p /sbin/ldconfig
343 %post -n guile-gnutls -p /sbin/ldconfig
344 %postun -n guile-gnutls -p /sbin/ldconfig
346 %files -f %{name}.lang
347 %defattr(644,root,root,755)
348 %doc AUTHORS ChangeLog NEWS README.md THANKS
349 %attr(755,root,root) %{_bindir}/certtool
350 %attr(755,root,root) %{_bindir}/gnutls-*
351 %attr(755,root,root) %{_bindir}/ocsptool
352 %attr(755,root,root) %{_bindir}/p11tool
353 %attr(755,root,root) %{_bindir}/psktool
354 %attr(755,root,root) %{_bindir}/srptool
355 %{?with_tpm:%attr(755,root,root) %{_bindir}/tpmtool}
357 %{_mandir}/man1/certtool.1*
358 %{_mandir}/man1/gnutls-*.1*
359 %{_mandir}/man1/ocsptool.1*
360 %{_mandir}/man1/p11tool.1*
361 %{_mandir}/man1/psktool.1*
362 %{_mandir}/man1/srptool.1*
363 %{_mandir}/man1/tpmtool.1*
364 %{_infodir}/gnutls.info*
365 %{_infodir}/gnutls-*.png
366 %{_infodir}/pkcs11-vision.png
370 %defattr(644,root,root,755)
371 %attr(755,root,root) %{_libdir}/libgnutls.so.*.*.*
372 %attr(755,root,root) %ghost %{_libdir}/libgnutls.so.30
375 %defattr(644,root,root,755)
376 %attr(755,root,root) %{_libdir}/libgnutls.so
377 %{_libdir}/libgnutls.la
378 %{_includedir}/gnutls
379 %{?with_dane:%exclude %{_includedir}/gnutls/dane.h}
380 %exclude %{_includedir}/gnutls/gnutlsxx.h
381 %{?with_openssl:%exclude %{_includedir}/gnutls/openssl.h}
382 %{_pkgconfigdir}/gnutls.pc
383 %{?with_doc:%{_mandir}/man3/gnutls_*.3*}
385 %if %{with static_libs}
387 %defattr(644,root,root,755)
388 %{_libdir}/libgnutls.a
392 %defattr(644,root,root,755)
393 %attr(755,root,root) %{_libdir}/libgnutlsxx.so.*.*.*
394 %attr(755,root,root) %ghost %{_libdir}/libgnutlsxx.so.30
397 %defattr(644,root,root,755)
398 %attr(755,root,root) %{_libdir}/libgnutlsxx.so
399 %{_libdir}/libgnutlsxx.la
400 %{_includedir}/gnutls/gnutlsxx.h
402 %if %{with static_libs}
404 %defattr(644,root,root,755)
405 %{_libdir}/libgnutlsxx.a
410 %defattr(644,root,root,755)
411 %attr(755,root,root) %{_bindir}/danetool
412 %attr(755,root,root) %{_libdir}/libgnutls-dane.so.*.*.*
413 %attr(755,root,root) %ghost %{_libdir}/libgnutls-dane.so.0
414 %{?with_doc:%{_mandir}/man1/danetool.1*}
417 %defattr(644,root,root,755)
418 %attr(755,root,root) %{_libdir}/libgnutls-dane.so
419 %{_libdir}/libgnutls-dane.la
420 %{_includedir}/gnutls/dane.h
421 %{_pkgconfigdir}/gnutls-dane.pc
423 %{_mandir}/man3/dane_*.3*
426 %if %{with static_libs}
428 %defattr(644,root,root,755)
429 %{_libdir}/libgnutls-dane.a
435 %defattr(644,root,root,755)
436 %attr(755,root,root) %{_libdir}/libgnutls-openssl.so.*.*.*
437 %attr(755,root,root) %ghost %{_libdir}/libgnutls-openssl.so.27
440 %defattr(644,root,root,755)
441 %attr(755,root,root) %{_libdir}/libgnutls-openssl.so
442 %{_libdir}/libgnutls-openssl.la
443 %{_includedir}/gnutls/openssl.h
445 %if %{with static_libs}
446 %files openssl-static
447 %defattr(644,root,root,755)
448 %{_libdir}/libgnutls-openssl.a
453 %files -n guile-gnutls
454 %defattr(644,root,root,755)
455 %attr(755,root,root) %{_libdir}/guile/3.*/extensions/guile-gnutls-v-2.so*
456 %{_libdir}/guile/3.*/site-ccache/gnutls.go
457 %{_libdir}/guile/3.*/site-ccache/gnutls
458 %{_datadir}/guile/site/3.*/gnutls.scm
459 %{_datadir}/guile/site/3.*/gnutls
461 %{_infodir}/gnutls-guile.info*