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
17 Summary: The GNU Transport Layer Security Library
18 Summary(pl.UTF-8): Biblioteka GNU TLS (Transport Layer Security)
22 License: LGPL v2.1+ (libgnutls), LGPL v3+ (libdane), GPL v3+ (openssl library and tools)
24 Source0: ftp://ftp.gnutls.org/gcrypt/gnutls/v3.7/%{name}-%{version}.tar.xz
25 # Source0-md5: 3723d8fee66c5d45d780ca64c089ed23
26 Patch0: %{name}-info.patch
27 Patch1: %{name}-link.patch
28 Patch2: %{name}-pl.po-update.patch
30 URL: https://www.gnutls.org/
31 BuildRequires: autoconf >= 2.63
32 BuildRequires: automake >= 1:1.12.2
33 BuildRequires: gcc >= 5:3.2
34 BuildRequires: gettext-tools >= 0.19
35 BuildRequires: gmp-devel
36 %{?with_doc:BuildRequires: gtk-doc >= 1.14}
37 %{?with_guile:BuildRequires: guile-devel >= 5:2.2.0}
38 BuildRequires: libidn2-devel >= 2.0.0
39 %{?with_af_alg:BuildRequires: libkcapi-devel >= 1.3.0}
40 BuildRequires: libstdc++-devel
41 BuildRequires: libtasn1-devel >= 4.11
42 BuildRequires: libunistring-devel
43 BuildRequires: libtool >= 2:2
44 %{?with_ktls:BuildRequires: linux-libc-headers >= 7:4.13}
45 BuildRequires: nettle-devel >= 3.6
46 # miniopencdk is included in sources and currently maintained
47 # as part of gnutls, not external package
48 #BuildRequires: opencdk-devel >= 0.6.6
49 BuildRequires: p11-kit-devel >= 0.23.1
50 BuildRequires: pkgconfig
51 BuildRequires: readline-devel
52 BuildRequires: rpmbuild(macros) >= 1.527
53 BuildRequires: sed >= 4.0
54 BuildRequires: tar >= 1:1.22
55 %{?with_doc:BuildRequires: texinfo >= 4.8}
56 %{?with_tpm2:BuildRequires: tpm2-tss-devel}
57 %{?with_tpm:BuildRequires: trousers-devel >= 0.3.11}
58 %{?with_dane:BuildRequires: unbound-devel}
60 BuildRequires: zlib-devel
61 Requires: %{name}-libs = %{version}-%{release}
62 %{?with_dane:Requires: %{name}-dane = %{version}-%{release}}
63 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
65 %define _noautostrip .*\.go
68 GnuTLS is a project that aims to develop a library which provides a
69 secure layer, over a reliable transport layer (ie. TCP/IP). Currently
70 the gnuTLS library implements the proposed standards by the IETF's TLS
73 %description -l pl.UTF-8
74 GnuTLS to projekt mający na celu stworzenie biblioteki udostępniającej
75 powłokę bezpieczeństwa ponad powłoką transportową (np. TCP/IP).
76 Aktualnie biblioteka gnuTLS implementuje standardy proponowane przez
77 grupę roboczą IETF TLS.
80 Summary: GnuTLS shared libraries
81 Summary(pl.UTF-8): Biblioteki współdzielone GnuTLS
83 Requires: libidn2 >= 2.0.0
84 %{?with_af_alg:Requires: libkcapi >= 1.3.0}
85 Requires: libtasn1 >= 4.11
86 Requires: nettle >= 3.6
87 #Requires: opencdk >= 0.6.6
88 Requires: p11-kit >= 0.23.1
89 %{?with_tpm:Requires: trousers-libs >= 0.3.11}
90 Conflicts: gnutls < 3.2.0
93 GnuTLS shared libraries.
95 %description libs -l pl.UTF-8
96 Biblioteki współdzielone GnuTLS.
99 Summary: Header files etc to develop gnutls applications
100 Summary(pl.UTF-8): Pliki nagłówkowe i inne do gnutls
101 License: LGPL v2.1+ (libgnutls), GPL v3+ (openssl library)
102 Group: Development/Libraries
103 Requires: %{name}-libs = %{version}-%{release}
104 Requires: libidn2-devel
105 Requires: libtasn1-devel >= 4.11
106 Requires: libunistring-devel
107 Requires: nettle-devel >= 3.6
108 #Requires: opencdk-devel >= 0.6.6
109 Requires: p11-kit-devel >= 0.23.1
110 %{?with_tpm:Requires: trousers-devel >= 0.3.11}
114 Header files etc to develop gnutls applications.
116 %description devel -l pl.UTF-8
117 Pliki nagłówkowe i inne do gnutls.
120 Summary: Static gnutls library
121 Summary(pl.UTF-8): Biblioteka statyczna gnutls
122 License: LGPL v2.1+ (libgnutls), GPL v3+ (openssl library)
123 Group: Development/Libraries
124 Requires: %{name}-devel = %{version}-%{release}
127 Static gnutls library.
129 %description static -l pl.UTF-8
130 Biblioteka statyczna gnutls.
133 Summary: libgnutlsxx - C++ interface to gnutls library
134 Summary(pl.UTF-8): libgnutlsxx - interfejs C++ do biblioteki gnutls
137 Requires: %{name}-libs = %{version}-%{release}
140 libgnutlsxx - C++ interface to gnutls library.
142 %description c++ -l pl.UTF-8
143 libgnutlsxx - interfejs C++ do biblioteki gnutls.
146 Summary: Header files for libgnutlsxx, a C++ interface to gnutls library
147 Summary(pl.UTF-8): Pliki nagłówkowe libgnutlsxx - interfejsu C++ do biblioteki gnutls
149 Group: Development/Libraries
150 Requires: %{name}-c++ = %{version}-%{release}
151 Requires: %{name}-devel = %{version}-%{release}
152 Requires: libstdc++-devel
154 %description c++-devel
155 Header files for libgnutlsxx, a C++ interface to gnutls library.
157 %description c++-devel -l pl.UTF-8
158 Pliki nagłówkowe libgnutlsxx - interfejsu C++ do biblioteki gnutls.
161 Summary: Static version of libgnutlsxx, a C++ interface to gnutls library
162 Summary(pl.UTF-8): Statyczna wersja libgnutlsxx - interfejsu C++ do biblioteki gnutls
164 Group: Development/Libraries
165 Requires: %{name}-c++-devel = %{version}-%{release}
167 %description c++-static
168 Static version of libgnutlsxx, a C++ interface to gnutls library.
170 %description c++-static -l pl.UTF-8
171 Statyczna wersja libgnutlsxx - interfejsu C++ do biblioteki gnutls.
174 Summary: DANE security library
175 Summary(pl.UTF-8): Biblioteka bezpieczeństwa DANE
177 Requires: %{name}-libs = %{version}-%{release}
180 DANE security library.
182 %description dane -l pl.UTF-8
183 Biblioteka bezpieczeństwa DANE.
186 Summary: Header file for DANE security library
187 Summary(pl.UTF-8): Plik nagłówkowy biblioteki bezpieczeństwa DANE
188 Group: Development/Libraries
189 Requires: %{name}-dane = %{version}-%{release}
190 Requires: %{name}-devel = %{version}-%{release}
191 Requires: unbound-devel
193 %description dane-devel
194 Header file for DANE security library.
196 %description dane-devel -l pl.UTF-8
197 Plik nagłówkowy biblioteki bezpieczeństwa DANE.
200 Summary: Static DANE security library
201 Summary(pl.UTF-8): Statyczna biblioteka bezpieczeństwa DANE
202 Group: Development/Libraries
203 Requires: %{name}-dane-devel = %{version}-%{release}
205 %description dane-static
206 Static DANE security library.
208 %description dane-static -l pl.UTF-8
209 Statyczna biblioteka bezpieczeństwa DANE.
212 Summary: OpenSSL compatibility library for GnuTLS
213 Summary(pl.UTF-8): Biblioteka zgodności z OpenSSL dla GnuTLS
215 Requires: %{name}-libs = %{version}-%{release}
218 OpenSSL compatibility library for GnuTLS.
220 %description openssl -l pl.UTF-8
221 Biblioteka zgodności z OpenSSL dla GnuTLS.
223 %package openssl-devel
224 Summary: Header file for gnutls-openssl library
225 Summary(pl.UTF-8): Plik nagłówkowy biblioteki gnutls-openssl
226 Group: Development/Libraries
227 Requires: %{name}-devel = %{version}-%{release}
228 Requires: %{name}-openssl = %{version}-%{release}
230 %description openssl-devel
231 Header file for gnutls-openssl library.
233 %description openssl-devel -l pl.UTF-8
234 Plik nagłówkowy biblioteki gnutls-openssl.
236 %package openssl-static
237 Summary: Static gnutls-openssl library
238 Summary(pl.UTF-8): Statyczna biblioteka gnutls-openssl
239 Group: Development/Libraries
240 Requires: %{name}-openssl-devel = %{version}-%{release}
242 %description openssl-static
243 Static gnutls-openssl library.
245 %description openssl-static -l pl.UTF-8
246 Statyczna biblioteka gnutls-openssl.
248 %package -n guile-gnutls
249 Summary: Guile bindings for GnuTLS
250 Summary(pl.UTF-8): Wiązania Guile do GnuTLS
252 Group: Development/Languages
253 Requires: %{name}-libs = %{version}-%{release}
254 Requires: guile >= 5:2.2.0
256 %description -n guile-gnutls
257 Guile bindings for GnuTLS.
259 %description -n guile-gnutls -l pl.UTF-8
260 Wiązania Guile do GnuTLS.
273 %{__aclocal} -I m4 -I src/gl/m4 -I lib/unistring/m4
278 %{?with_af_alg:--enable-afalg} \
279 %{!?with_doc:--disable-doc} \
280 %{!?with_guile:--disable-guile} \
281 %{__enable_disable ktls} \
282 %{?with_openssl:--enable-openssl-compatibility} \
283 --disable-silent-rules \
284 %{?with_static_libs:--enable-static} \
285 --with-default-trust-store-file=/etc/certs/ca-certificates.crt \
286 %{!?with_tpm:--without-tpm} \
287 %{__with_without tpm2} \
288 --with-trousers-lib=%{_libdir}/libtspi.so.1
293 rm -rf $RPM_BUILD_ROOT
296 DESTDIR=$RPM_BUILD_ROOT
298 # although libgnutls.la is obsoleted by pkg-config, there is
299 # .pc file missing for libgnutls-openssl, and it needs libgnutls.la
302 # guile module - dynamic only
303 %{__rm} $RPM_BUILD_ROOT%{_libdir}/guile/2.*/extensions/guile-gnutls-*.la
304 %if %{with static_libs}
305 %{__rm} $RPM_BUILD_ROOT%{_libdir}/guile/2.*/extensions/guile-gnutls-*.a
309 # images for (not installed) htmlized infos - already packaged with infos
311 %{__rm} $RPM_BUILD_ROOT%{_docdir}/gnutls/*.png
314 %{__rm} -f $RPM_BUILD_ROOT%{_infodir}/dir
319 rm -rf $RPM_BUILD_ROOT
322 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir %{_infodir} >/dev/null 2>&1
325 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir %{_infodir} >/dev/null 2>&1
327 %post libs -p /sbin/ldconfig
328 %postun libs -p /sbin/ldconfig
330 %post c++ -p /sbin/ldconfig
331 %postun c++ -p /sbin/ldconfig
333 %post dane -p /sbin/ldconfig
334 %postun dane -p /sbin/ldconfig
336 %post openssl -p /sbin/ldconfig
337 %postun openssl -p /sbin/ldconfig
339 %post -n guile-gnutls -p /sbin/ldconfig
340 %postun -n guile-gnutls -p /sbin/ldconfig
342 %files -f %{name}.lang
343 %defattr(644,root,root,755)
344 %doc AUTHORS ChangeLog NEWS README.md THANKS
345 %attr(755,root,root) %{_bindir}/certtool
346 %attr(755,root,root) %{_bindir}/gnutls-*
347 %attr(755,root,root) %{_bindir}/ocsptool
348 %attr(755,root,root) %{_bindir}/p11tool
349 %attr(755,root,root) %{_bindir}/psktool
350 %attr(755,root,root) %{_bindir}/srptool
351 %{?with_tpm:%attr(755,root,root) %{_bindir}/tpmtool}
353 %{_mandir}/man1/certtool.1*
354 %{_mandir}/man1/gnutls-*.1*
355 %{_mandir}/man1/ocsptool.1*
356 %{_mandir}/man1/p11tool.1*
357 %{_mandir}/man1/psktool.1*
358 %{_mandir}/man1/srptool.1*
359 %{_mandir}/man1/tpmtool.1*
360 %{_infodir}/gnutls.info*
361 %{_infodir}/gnutls-*.png
362 %{_infodir}/pkcs11-vision.png
366 %defattr(644,root,root,755)
367 %attr(755,root,root) %{_libdir}/libgnutls.so.*.*.*
368 %attr(755,root,root) %ghost %{_libdir}/libgnutls.so.30
371 %defattr(644,root,root,755)
372 %attr(755,root,root) %{_libdir}/libgnutls.so
373 %{_libdir}/libgnutls.la
374 %{_includedir}/gnutls
375 %{?with_dane:%exclude %{_includedir}/gnutls/dane.h}
376 %exclude %{_includedir}/gnutls/gnutlsxx.h
377 %{?with_openssl:%exclude %{_includedir}/gnutls/openssl.h}
378 %{_pkgconfigdir}/gnutls.pc
379 %{?with_doc:%{_mandir}/man3/gnutls_*.3*}
381 %if %{with static_libs}
383 %defattr(644,root,root,755)
384 %{_libdir}/libgnutls.a
388 %defattr(644,root,root,755)
389 %attr(755,root,root) %{_libdir}/libgnutlsxx.so.*.*.*
390 %attr(755,root,root) %ghost %{_libdir}/libgnutlsxx.so.28
393 %defattr(644,root,root,755)
394 %attr(755,root,root) %{_libdir}/libgnutlsxx.so
395 %{_libdir}/libgnutlsxx.la
396 %{_includedir}/gnutls/gnutlsxx.h
398 %if %{with static_libs}
400 %defattr(644,root,root,755)
401 %{_libdir}/libgnutlsxx.a
406 %defattr(644,root,root,755)
407 %attr(755,root,root) %{_bindir}/danetool
408 %attr(755,root,root) %{_libdir}/libgnutls-dane.so.*.*.*
409 %attr(755,root,root) %ghost %{_libdir}/libgnutls-dane.so.0
410 %{?with_doc:%{_mandir}/man1/danetool.1*}
413 %defattr(644,root,root,755)
414 %attr(755,root,root) %{_libdir}/libgnutls-dane.so
415 %{_libdir}/libgnutls-dane.la
416 %{_includedir}/gnutls/dane.h
417 %{_pkgconfigdir}/gnutls-dane.pc
419 %{_mandir}/man3/dane_*.3*
422 %if %{with static_libs}
424 %defattr(644,root,root,755)
425 %{_libdir}/libgnutls-dane.a
431 %defattr(644,root,root,755)
432 %attr(755,root,root) %{_libdir}/libgnutls-openssl.so.*.*.*
433 %attr(755,root,root) %ghost %{_libdir}/libgnutls-openssl.so.27
436 %defattr(644,root,root,755)
437 %attr(755,root,root) %{_libdir}/libgnutls-openssl.so
438 %{_libdir}/libgnutls-openssl.la
439 %{_includedir}/gnutls/openssl.h
441 %if %{with static_libs}
442 %files openssl-static
443 %defattr(644,root,root,755)
444 %{_libdir}/libgnutls-openssl.a
449 %files -n guile-gnutls
450 %defattr(644,root,root,755)
451 %attr(755,root,root) %{_libdir}/guile/2.*/extensions/guile-gnutls-v-2.so*
452 %{_libdir}/guile/2.*/site-ccache/gnutls.go
453 %{_libdir}/guile/2.*/site-ccache/gnutls
454 %{_datadir}/guile/site/2.*/gnutls.scm
455 %{_datadir}/guile/site/2.*/gnutls
457 %{_infodir}/gnutls-guile.info*