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}
105 Requires: libidn2-devel
106 Requires: libtasn1-devel >= 4.11
107 Requires: libunistring-devel
108 Requires: nettle-devel >= 3.6
109 #Requires: opencdk-devel >= 0.6.6
110 Requires: p11-kit-devel >= 0.23.1
111 %{?with_tpm2:Requires: tpm2-tss-devel}
112 %{?with_tpm:Requires: trousers-devel >= 0.3.11}
116 Header files etc to develop gnutls applications.
118 %description devel -l pl.UTF-8
119 Pliki nagłówkowe i inne do gnutls.
122 Summary: Static gnutls library
123 Summary(pl.UTF-8): Biblioteka statyczna gnutls
124 License: LGPL v2.1+ (libgnutls), GPL v3+ (openssl library)
125 Group: Development/Libraries
126 Requires: %{name}-devel = %{version}-%{release}
129 Static gnutls library.
131 %description static -l pl.UTF-8
132 Biblioteka statyczna gnutls.
135 Summary: libgnutlsxx - C++ interface to gnutls library
136 Summary(pl.UTF-8): libgnutlsxx - interfejs C++ do biblioteki gnutls
139 Requires: %{name}-libs = %{version}-%{release}
142 libgnutlsxx - C++ interface to gnutls library.
144 %description c++ -l pl.UTF-8
145 libgnutlsxx - interfejs C++ do biblioteki gnutls.
148 Summary: Header files for libgnutlsxx, a C++ interface to gnutls library
149 Summary(pl.UTF-8): Pliki nagłówkowe libgnutlsxx - interfejsu C++ do biblioteki gnutls
151 Group: Development/Libraries
152 Requires: %{name}-c++ = %{version}-%{release}
153 Requires: %{name}-devel = %{version}-%{release}
154 Requires: libstdc++-devel
156 %description c++-devel
157 Header files for libgnutlsxx, a C++ interface to gnutls library.
159 %description c++-devel -l pl.UTF-8
160 Pliki nagłówkowe libgnutlsxx - interfejsu C++ do biblioteki gnutls.
163 Summary: Static version of libgnutlsxx, a C++ interface to gnutls library
164 Summary(pl.UTF-8): Statyczna wersja libgnutlsxx - interfejsu C++ do biblioteki gnutls
166 Group: Development/Libraries
167 Requires: %{name}-c++-devel = %{version}-%{release}
169 %description c++-static
170 Static version of libgnutlsxx, a C++ interface to gnutls library.
172 %description c++-static -l pl.UTF-8
173 Statyczna wersja libgnutlsxx - interfejsu C++ do biblioteki gnutls.
176 Summary: DANE security library
177 Summary(pl.UTF-8): Biblioteka bezpieczeństwa DANE
179 Requires: %{name}-libs = %{version}-%{release}
182 DANE security library.
184 %description dane -l pl.UTF-8
185 Biblioteka bezpieczeństwa DANE.
188 Summary: Header file for DANE security library
189 Summary(pl.UTF-8): Plik nagłówkowy biblioteki bezpieczeństwa DANE
190 Group: Development/Libraries
191 Requires: %{name}-dane = %{version}-%{release}
192 Requires: %{name}-devel = %{version}-%{release}
193 Requires: unbound-devel
195 %description dane-devel
196 Header file for DANE security library.
198 %description dane-devel -l pl.UTF-8
199 Plik nagłówkowy biblioteki bezpieczeństwa DANE.
202 Summary: Static DANE security library
203 Summary(pl.UTF-8): Statyczna biblioteka bezpieczeństwa DANE
204 Group: Development/Libraries
205 Requires: %{name}-dane-devel = %{version}-%{release}
207 %description dane-static
208 Static DANE security library.
210 %description dane-static -l pl.UTF-8
211 Statyczna biblioteka bezpieczeństwa DANE.
214 Summary: OpenSSL compatibility library for GnuTLS
215 Summary(pl.UTF-8): Biblioteka zgodności z OpenSSL dla GnuTLS
217 Requires: %{name}-libs = %{version}-%{release}
220 OpenSSL compatibility library for GnuTLS.
222 %description openssl -l pl.UTF-8
223 Biblioteka zgodności z OpenSSL dla GnuTLS.
225 %package openssl-devel
226 Summary: Header file for gnutls-openssl library
227 Summary(pl.UTF-8): Plik nagłówkowy biblioteki gnutls-openssl
228 Group: Development/Libraries
229 Requires: %{name}-devel = %{version}-%{release}
230 Requires: %{name}-openssl = %{version}-%{release}
232 %description openssl-devel
233 Header file for gnutls-openssl library.
235 %description openssl-devel -l pl.UTF-8
236 Plik nagłówkowy biblioteki gnutls-openssl.
238 %package openssl-static
239 Summary: Static gnutls-openssl library
240 Summary(pl.UTF-8): Statyczna biblioteka gnutls-openssl
241 Group: Development/Libraries
242 Requires: %{name}-openssl-devel = %{version}-%{release}
244 %description openssl-static
245 Static gnutls-openssl library.
247 %description openssl-static -l pl.UTF-8
248 Statyczna biblioteka gnutls-openssl.
250 %package -n guile-gnutls
251 Summary: Guile bindings for GnuTLS
252 Summary(pl.UTF-8): Wiązania Guile do GnuTLS
254 Group: Development/Languages
255 Requires: %{name}-libs = %{version}-%{release}
256 Requires: guile >= 5:2.2.0
258 %description -n guile-gnutls
259 Guile bindings for GnuTLS.
261 %description -n guile-gnutls -l pl.UTF-8
262 Wiązania Guile do GnuTLS.
275 %{__aclocal} -I m4 -I src/gl/m4 -I lib/unistring/m4
280 %{?with_af_alg:--enable-afalg} \
281 %{!?with_doc:--disable-doc} \
282 %{!?with_guile:--disable-guile} \
283 %{__enable_disable ktls} \
284 %{?with_openssl:--enable-openssl-compatibility} \
285 --disable-silent-rules \
286 %{?with_static_libs:--enable-static} \
287 --with-default-trust-store-file=/etc/certs/ca-certificates.crt \
288 %{!?with_tpm:--without-tpm} \
289 %{__with_without tpm2} \
290 --with-trousers-lib=%{_libdir}/libtspi.so.1
295 rm -rf $RPM_BUILD_ROOT
298 DESTDIR=$RPM_BUILD_ROOT
300 # although libgnutls.la is obsoleted by pkg-config, there is
301 # .pc file missing for libgnutls-openssl, and it needs libgnutls.la
304 # guile module - dynamic only
305 %{__rm} $RPM_BUILD_ROOT%{_libdir}/guile/2.*/extensions/guile-gnutls-*.la
306 %if %{with static_libs}
307 %{__rm} $RPM_BUILD_ROOT%{_libdir}/guile/2.*/extensions/guile-gnutls-*.a
311 # images for (not installed) htmlized infos - already packaged with infos
313 %{__rm} $RPM_BUILD_ROOT%{_docdir}/gnutls/*.png
316 %{__rm} -f $RPM_BUILD_ROOT%{_infodir}/dir
321 rm -rf $RPM_BUILD_ROOT
324 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir %{_infodir} >/dev/null 2>&1
327 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir %{_infodir} >/dev/null 2>&1
329 %post libs -p /sbin/ldconfig
330 %postun libs -p /sbin/ldconfig
332 %post c++ -p /sbin/ldconfig
333 %postun c++ -p /sbin/ldconfig
335 %post dane -p /sbin/ldconfig
336 %postun dane -p /sbin/ldconfig
338 %post openssl -p /sbin/ldconfig
339 %postun openssl -p /sbin/ldconfig
341 %post -n guile-gnutls -p /sbin/ldconfig
342 %postun -n guile-gnutls -p /sbin/ldconfig
344 %files -f %{name}.lang
345 %defattr(644,root,root,755)
346 %doc AUTHORS ChangeLog NEWS README.md THANKS
347 %attr(755,root,root) %{_bindir}/certtool
348 %attr(755,root,root) %{_bindir}/gnutls-*
349 %attr(755,root,root) %{_bindir}/ocsptool
350 %attr(755,root,root) %{_bindir}/p11tool
351 %attr(755,root,root) %{_bindir}/psktool
352 %attr(755,root,root) %{_bindir}/srptool
353 %{?with_tpm:%attr(755,root,root) %{_bindir}/tpmtool}
355 %{_mandir}/man1/certtool.1*
356 %{_mandir}/man1/gnutls-*.1*
357 %{_mandir}/man1/ocsptool.1*
358 %{_mandir}/man1/p11tool.1*
359 %{_mandir}/man1/psktool.1*
360 %{_mandir}/man1/srptool.1*
361 %{_mandir}/man1/tpmtool.1*
362 %{_infodir}/gnutls.info*
363 %{_infodir}/gnutls-*.png
364 %{_infodir}/pkcs11-vision.png
368 %defattr(644,root,root,755)
369 %attr(755,root,root) %{_libdir}/libgnutls.so.*.*.*
370 %attr(755,root,root) %ghost %{_libdir}/libgnutls.so.30
373 %defattr(644,root,root,755)
374 %attr(755,root,root) %{_libdir}/libgnutls.so
375 %{_libdir}/libgnutls.la
376 %{_includedir}/gnutls
377 %{?with_dane:%exclude %{_includedir}/gnutls/dane.h}
378 %exclude %{_includedir}/gnutls/gnutlsxx.h
379 %{?with_openssl:%exclude %{_includedir}/gnutls/openssl.h}
380 %{_pkgconfigdir}/gnutls.pc
381 %{?with_doc:%{_mandir}/man3/gnutls_*.3*}
383 %if %{with static_libs}
385 %defattr(644,root,root,755)
386 %{_libdir}/libgnutls.a
390 %defattr(644,root,root,755)
391 %attr(755,root,root) %{_libdir}/libgnutlsxx.so.*.*.*
392 %attr(755,root,root) %ghost %{_libdir}/libgnutlsxx.so.28
395 %defattr(644,root,root,755)
396 %attr(755,root,root) %{_libdir}/libgnutlsxx.so
397 %{_libdir}/libgnutlsxx.la
398 %{_includedir}/gnutls/gnutlsxx.h
400 %if %{with static_libs}
402 %defattr(644,root,root,755)
403 %{_libdir}/libgnutlsxx.a
408 %defattr(644,root,root,755)
409 %attr(755,root,root) %{_bindir}/danetool
410 %attr(755,root,root) %{_libdir}/libgnutls-dane.so.*.*.*
411 %attr(755,root,root) %ghost %{_libdir}/libgnutls-dane.so.0
412 %{?with_doc:%{_mandir}/man1/danetool.1*}
415 %defattr(644,root,root,755)
416 %attr(755,root,root) %{_libdir}/libgnutls-dane.so
417 %{_libdir}/libgnutls-dane.la
418 %{_includedir}/gnutls/dane.h
419 %{_pkgconfigdir}/gnutls-dane.pc
421 %{_mandir}/man3/dane_*.3*
424 %if %{with static_libs}
426 %defattr(644,root,root,755)
427 %{_libdir}/libgnutls-dane.a
433 %defattr(644,root,root,755)
434 %attr(755,root,root) %{_libdir}/libgnutls-openssl.so.*.*.*
435 %attr(755,root,root) %ghost %{_libdir}/libgnutls-openssl.so.27
438 %defattr(644,root,root,755)
439 %attr(755,root,root) %{_libdir}/libgnutls-openssl.so
440 %{_libdir}/libgnutls-openssl.la
441 %{_includedir}/gnutls/openssl.h
443 %if %{with static_libs}
444 %files openssl-static
445 %defattr(644,root,root,755)
446 %{_libdir}/libgnutls-openssl.a
451 %files -n guile-gnutls
452 %defattr(644,root,root,755)
453 %attr(755,root,root) %{_libdir}/guile/2.*/extensions/guile-gnutls-v-2.so*
454 %{_libdir}/guile/2.*/site-ccache/gnutls.go
455 %{_libdir}/guile/2.*/site-ccache/gnutls
456 %{_datadir}/guile/site/2.*/gnutls.scm
457 %{_datadir}/guile/site/2.*/gnutls
459 %{_infodir}/gnutls-guile.info*