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
29 URL: https://www.gnutls.org/
30 BuildRequires: autoconf >= 2.63
31 BuildRequires: automake >= 1:1.12.2
32 BuildRequires: gcc >= 5:3.2
33 BuildRequires: gettext-tools >= 0.19
34 BuildRequires: gmp-devel
35 %{?with_doc:BuildRequires: gtk-doc >= 1.14}
36 %{?with_guile:BuildRequires: guile-devel >= 5:2.2.0}
37 BuildRequires: libidn2-devel >= 2.0.0
38 %{?with_af_alg:BuildRequires: libkcapi-devel >= 1.3.0}
39 BuildRequires: libstdc++-devel
40 BuildRequires: libtasn1-devel >= 4.11
41 BuildRequires: libunistring-devel
42 BuildRequires: libtool >= 2:2
43 %{?with_ktls:BuildRequires: linux-libc-headers >= 7:4.13}
44 BuildRequires: nettle-devel >= 3.6
45 # miniopencdk is included in sources and currently maintained
46 # as part of gnutls, not external package
47 #BuildRequires: opencdk-devel >= 0.6.6
48 BuildRequires: p11-kit-devel >= 0.23.1
49 BuildRequires: pkgconfig
50 BuildRequires: readline-devel
51 BuildRequires: rpmbuild(macros) >= 1.527
52 BuildRequires: sed >= 4.0
53 BuildRequires: tar >= 1:1.22
54 %{?with_doc:BuildRequires: texinfo >= 4.8}
55 %{?with_tpm2:BuildRequires: tpm2-tss-devel}
56 %{?with_tpm:BuildRequires: trousers-devel >= 0.3.11}
57 %{?with_dane:BuildRequires: unbound-devel}
59 BuildRequires: zlib-devel
60 Requires: %{name}-libs = %{version}-%{release}
61 %{?with_dane:Requires: %{name}-dane = %{version}-%{release}}
62 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
64 %define _noautostrip .*\.go
67 GnuTLS is a project that aims to develop a library which provides a
68 secure layer, over a reliable transport layer (ie. TCP/IP). Currently
69 the gnuTLS library implements the proposed standards by the IETF's TLS
72 %description -l pl.UTF-8
73 GnuTLS to projekt mający na celu stworzenie biblioteki udostępniającej
74 powłokę bezpieczeństwa ponad powłoką transportową (np. TCP/IP).
75 Aktualnie biblioteka gnuTLS implementuje standardy proponowane przez
76 grupę roboczą IETF TLS.
79 Summary: GnuTLS shared libraries
80 Summary(pl.UTF-8): Biblioteki współdzielone GnuTLS
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 %{?with_tpm:Requires: trousers-libs >= 0.3.11}
89 Conflicts: gnutls < 3.2.0
92 GnuTLS shared libraries.
94 %description libs -l pl.UTF-8
95 Biblioteki współdzielone GnuTLS.
98 Summary: Header files etc to develop gnutls applications
99 Summary(pl.UTF-8): Pliki nagłówkowe i inne do gnutls
100 License: LGPL v2.1+ (libgnutls), GPL v3+ (openssl library)
101 Group: Development/Libraries
102 Requires: %{name}-libs = %{version}-%{release}
103 Requires: libidn2-devel
104 Requires: libtasn1-devel >= 4.11
105 Requires: libunistring-devel
106 Requires: nettle-devel >= 3.6
107 #Requires: opencdk-devel >= 0.6.6
108 Requires: p11-kit-devel >= 0.23.1
109 %{?with_tpm:Requires: trousers-devel >= 0.3.11}
113 Header files etc to develop gnutls applications.
115 %description devel -l pl.UTF-8
116 Pliki nagłówkowe i inne do gnutls.
119 Summary: Static gnutls library
120 Summary(pl.UTF-8): Biblioteka statyczna gnutls
121 License: LGPL v2.1+ (libgnutls), GPL v3+ (openssl library)
122 Group: Development/Libraries
123 Requires: %{name}-devel = %{version}-%{release}
126 Static gnutls library.
128 %description static -l pl.UTF-8
129 Biblioteka statyczna gnutls.
132 Summary: libgnutlsxx - C++ interface to gnutls library
133 Summary(pl.UTF-8): libgnutlsxx - interfejs C++ do biblioteki gnutls
136 Requires: %{name}-libs = %{version}-%{release}
139 libgnutlsxx - C++ interface to gnutls library.
141 %description c++ -l pl.UTF-8
142 libgnutlsxx - interfejs C++ do biblioteki gnutls.
145 Summary: Header files for libgnutlsxx, a C++ interface to gnutls library
146 Summary(pl.UTF-8): Pliki nagłówkowe libgnutlsxx - interfejsu C++ do biblioteki gnutls
148 Group: Development/Libraries
149 Requires: %{name}-c++ = %{version}-%{release}
150 Requires: %{name}-devel = %{version}-%{release}
151 Requires: libstdc++-devel
153 %description c++-devel
154 Header files for libgnutlsxx, a C++ interface to gnutls library.
156 %description c++-devel -l pl.UTF-8
157 Pliki nagłówkowe libgnutlsxx - interfejsu C++ do biblioteki gnutls.
160 Summary: Static version of libgnutlsxx, a C++ interface to gnutls library
161 Summary(pl.UTF-8): Statyczna wersja libgnutlsxx - interfejsu C++ do biblioteki gnutls
163 Group: Development/Libraries
164 Requires: %{name}-c++-devel = %{version}-%{release}
166 %description c++-static
167 Static version of libgnutlsxx, a C++ interface to gnutls library.
169 %description c++-static -l pl.UTF-8
170 Statyczna wersja libgnutlsxx - interfejsu C++ do biblioteki gnutls.
173 Summary: DANE security library
174 Summary(pl.UTF-8): Biblioteka bezpieczeństwa DANE
176 Requires: %{name}-libs = %{version}-%{release}
179 DANE security library.
181 %description dane -l pl.UTF-8
182 Biblioteka bezpieczeństwa DANE.
185 Summary: Header file for DANE security library
186 Summary(pl.UTF-8): Plik nagłówkowy biblioteki bezpieczeństwa DANE
187 Group: Development/Libraries
188 Requires: %{name}-dane = %{version}-%{release}
189 Requires: %{name}-devel = %{version}-%{release}
190 Requires: unbound-devel
192 %description dane-devel
193 Header file for DANE security library.
195 %description dane-devel -l pl.UTF-8
196 Plik nagłówkowy biblioteki bezpieczeństwa DANE.
199 Summary: Static DANE security library
200 Summary(pl.UTF-8): Statyczna biblioteka bezpieczeństwa DANE
201 Group: Development/Libraries
202 Requires: %{name}-dane-devel = %{version}-%{release}
204 %description dane-static
205 Static DANE security library.
207 %description dane-static -l pl.UTF-8
208 Statyczna biblioteka bezpieczeństwa DANE.
211 Summary: OpenSSL compatibility library for GnuTLS
212 Summary(pl.UTF-8): Biblioteka zgodności z OpenSSL dla GnuTLS
214 Requires: %{name}-libs = %{version}-%{release}
217 OpenSSL compatibility library for GnuTLS.
219 %description openssl -l pl.UTF-8
220 Biblioteka zgodności z OpenSSL dla GnuTLS.
222 %package openssl-devel
223 Summary: Header file for gnutls-openssl library
224 Summary(pl.UTF-8): Plik nagłówkowy biblioteki gnutls-openssl
225 Group: Development/Libraries
226 Requires: %{name}-devel = %{version}-%{release}
227 Requires: %{name}-openssl = %{version}-%{release}
229 %description openssl-devel
230 Header file for gnutls-openssl library.
232 %description openssl-devel -l pl.UTF-8
233 Plik nagłówkowy biblioteki gnutls-openssl.
235 %package openssl-static
236 Summary: Static gnutls-openssl library
237 Summary(pl.UTF-8): Statyczna biblioteka gnutls-openssl
238 Group: Development/Libraries
239 Requires: %{name}-openssl-devel = %{version}-%{release}
241 %description openssl-static
242 Static gnutls-openssl library.
244 %description openssl-static -l pl.UTF-8
245 Statyczna biblioteka gnutls-openssl.
247 %package -n guile-gnutls
248 Summary: Guile bindings for GnuTLS
249 Summary(pl.UTF-8): Wiązania Guile do GnuTLS
251 Group: Development/Languages
252 Requires: %{name}-libs = %{version}-%{release}
253 Requires: guile >= 5:2.2.0
255 %description -n guile-gnutls
256 Guile bindings for GnuTLS.
258 %description -n guile-gnutls -l pl.UTF-8
259 Wiązania Guile do GnuTLS.
271 %{__aclocal} -I m4 -I src/gl/m4 -I lib/unistring/m4
276 %{?with_af_alg:--enable-afalg} \
277 %{!?with_doc:--disable-doc} \
278 %{!?with_guile:--disable-guile} \
279 %{__enable_disable ktls} \
280 %{?with_openssl:--enable-openssl-compatibility} \
281 --disable-silent-rules \
282 %{?with_static_libs:--enable-static} \
283 --with-default-trust-store-file=/etc/certs/ca-certificates.crt \
284 %{!?with_tpm:--without-tpm} \
285 %{__with_without tpm2} \
286 --with-trousers-lib=%{_libdir}/libtspi.so.1
291 rm -rf $RPM_BUILD_ROOT
294 DESTDIR=$RPM_BUILD_ROOT
296 # although libgnutls.la is obsoleted by pkg-config, there is
297 # .pc file missing for libgnutls-openssl, and it needs libgnutls.la
300 # guile module - dynamic only
301 %{__rm} $RPM_BUILD_ROOT%{_libdir}/guile/2.*/extensions/guile-gnutls-*.la
302 %if %{with static_libs}
303 %{__rm} $RPM_BUILD_ROOT%{_libdir}/guile/2.*/extensions/guile-gnutls-*.a
307 # images for (not installed) htmlized infos - already packaged with infos
309 %{__rm} $RPM_BUILD_ROOT%{_docdir}/gnutls/*.png
312 %{__rm} -f $RPM_BUILD_ROOT%{_infodir}/dir
317 rm -rf $RPM_BUILD_ROOT
320 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir %{_infodir} >/dev/null 2>&1
323 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir %{_infodir} >/dev/null 2>&1
325 %post libs -p /sbin/ldconfig
326 %postun libs -p /sbin/ldconfig
328 %post c++ -p /sbin/ldconfig
329 %postun c++ -p /sbin/ldconfig
331 %post dane -p /sbin/ldconfig
332 %postun dane -p /sbin/ldconfig
334 %post openssl -p /sbin/ldconfig
335 %postun openssl -p /sbin/ldconfig
337 %post -n guile-gnutls -p /sbin/ldconfig
338 %postun -n guile-gnutls -p /sbin/ldconfig
340 %files -f %{name}.lang
341 %defattr(644,root,root,755)
342 %doc AUTHORS ChangeLog NEWS README.md THANKS
343 %attr(755,root,root) %{_bindir}/certtool
344 %attr(755,root,root) %{_bindir}/gnutls-*
345 %attr(755,root,root) %{_bindir}/ocsptool
346 %attr(755,root,root) %{_bindir}/p11tool
347 %attr(755,root,root) %{_bindir}/psktool
348 %attr(755,root,root) %{_bindir}/srptool
349 %{?with_tpm:%attr(755,root,root) %{_bindir}/tpmtool}
351 %{_mandir}/man1/certtool.1*
352 %{_mandir}/man1/gnutls-*.1*
353 %{_mandir}/man1/ocsptool.1*
354 %{_mandir}/man1/p11tool.1*
355 %{_mandir}/man1/psktool.1*
356 %{_mandir}/man1/srptool.1*
357 %{_mandir}/man1/tpmtool.1*
358 %{_infodir}/gnutls.info*
359 %{_infodir}/gnutls-*.png
360 %{_infodir}/pkcs11-vision.png
364 %defattr(644,root,root,755)
365 %attr(755,root,root) %{_libdir}/libgnutls.so.*.*.*
366 %attr(755,root,root) %ghost %{_libdir}/libgnutls.so.30
369 %defattr(644,root,root,755)
370 %attr(755,root,root) %{_libdir}/libgnutls.so
371 %{_libdir}/libgnutls.la
372 %{_includedir}/gnutls
373 %{?with_dane:%exclude %{_includedir}/gnutls/dane.h}
374 %exclude %{_includedir}/gnutls/gnutlsxx.h
375 %{?with_openssl:%exclude %{_includedir}/gnutls/openssl.h}
376 %{_pkgconfigdir}/gnutls.pc
377 %{?with_doc:%{_mandir}/man3/gnutls_*.3*}
379 %if %{with static_libs}
381 %defattr(644,root,root,755)
382 %{_libdir}/libgnutls.a
386 %defattr(644,root,root,755)
387 %attr(755,root,root) %{_libdir}/libgnutlsxx.so.*.*.*
388 %attr(755,root,root) %ghost %{_libdir}/libgnutlsxx.so.28
391 %defattr(644,root,root,755)
392 %attr(755,root,root) %{_libdir}/libgnutlsxx.so
393 %{_libdir}/libgnutlsxx.la
394 %{_includedir}/gnutls/gnutlsxx.h
396 %if %{with static_libs}
398 %defattr(644,root,root,755)
399 %{_libdir}/libgnutlsxx.a
404 %defattr(644,root,root,755)
405 %attr(755,root,root) %{_bindir}/danetool
406 %attr(755,root,root) %{_libdir}/libgnutls-dane.so.*.*.*
407 %attr(755,root,root) %ghost %{_libdir}/libgnutls-dane.so.0
408 %{?with_doc:%{_mandir}/man1/danetool.1*}
411 %defattr(644,root,root,755)
412 %attr(755,root,root) %{_libdir}/libgnutls-dane.so
413 %{_libdir}/libgnutls-dane.la
414 %{_includedir}/gnutls/dane.h
415 %{_pkgconfigdir}/gnutls-dane.pc
417 %{_mandir}/man3/dane_*.3*
420 %if %{with static_libs}
422 %defattr(644,root,root,755)
423 %{_libdir}/libgnutls-dane.a
429 %defattr(644,root,root,755)
430 %attr(755,root,root) %{_libdir}/libgnutls-openssl.so.*.*.*
431 %attr(755,root,root) %ghost %{_libdir}/libgnutls-openssl.so.27
434 %defattr(644,root,root,755)
435 %attr(755,root,root) %{_libdir}/libgnutls-openssl.so
436 %{_libdir}/libgnutls-openssl.la
437 %{_includedir}/gnutls/openssl.h
439 %if %{with static_libs}
440 %files openssl-static
441 %defattr(644,root,root,755)
442 %{_libdir}/libgnutls-openssl.a
447 %files -n guile-gnutls
448 %defattr(644,root,root,755)
449 %attr(755,root,root) %{_libdir}/guile/2.*/extensions/guile-gnutls-v-2.so*
450 %{_libdir}/guile/2.*/site-ccache/gnutls.go
451 %{_libdir}/guile/2.*/site-ccache/gnutls
452 %{_datadir}/guile/site/2.*/gnutls.scm
453 %{_datadir}/guile/site/2.*/gnutls
455 %{_infodir}/gnutls-guile.info*