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 static_libs # static libraries
7 %bcond_without doc # do not generate documentation
8 %bcond_without guile # Guile binding
9 %bcond_with af_alg # Linux kernel AF_ALG based acceleration
11 Summary: The GNU Transport Layer Security Library
12 Summary(pl.UTF-8): Biblioteka GNU TLS (Transport Layer Security)
16 License: LGPL v2.1+ (libgnutls), LGPL v3+ (libdane), GPL v3+ (openssl library and tools)
18 Source0: ftp://ftp.gnutls.org/gcrypt/gnutls/v3.7/%{name}-%{version}.tar.xz
19 # Source0-md5: 95c32a1af583ecfcb280648874c0fbd9
20 Patch0: %{name}-info.patch
21 Patch1: %{name}-link.patch
22 Patch2: %{name}-pl.po-update.patch
23 URL: https://www.gnutls.org/
24 BuildRequires: autoconf >= 2.63
25 BuildRequires: autogen >= 5.16
26 BuildRequires: autogen-devel >= 5.16
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:2.2.0}
33 BuildRequires: libidn2-devel >= 2.0.0
34 %{?with_af_alg:BuildRequires: libkcapi-devel >= 1.3.0}
35 BuildRequires: libstdc++-devel
36 BuildRequires: libtasn1-devel >= 4.11
37 BuildRequires: libunistring-devel
38 BuildRequires: libtool >= 2:2
39 BuildRequires: nettle-devel >= 3.6
40 # miniopencdk is included in sources and currently maintained
41 # as part of gnutls, not external package
42 #BuildRequires: opencdk-devel >= 0.6.6
43 BuildRequires: p11-kit-devel >= 0.23.1
44 BuildRequires: pkgconfig
45 BuildRequires: readline-devel
46 BuildRequires: rpmbuild(macros) >= 1.383
47 BuildRequires: sed >= 4.0
48 BuildRequires: tar >= 1:1.22
49 %{?with_doc:BuildRequires: texinfo >= 4.8}
50 %{?with_tpm:BuildRequires: trousers-devel >= 0.3.11}
51 %{?with_dane:BuildRequires: unbound-devel}
53 BuildRequires: zlib-devel
54 Requires: %{name}-libs = %{version}-%{release}
55 %{?with_dane:Requires: %{name}-dane = %{version}-%{release}}
56 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
58 %define _noautostrip .*\.go
61 GnuTLS is a project that aims to develop a library which provides a
62 secure layer, over a reliable transport layer (ie. TCP/IP). Currently
63 the gnuTLS library implements the proposed standards by the IETF's TLS
66 %description -l pl.UTF-8
67 GnuTLS to projekt mający na celu stworzenie biblioteki udostępniającej
68 powłokę bezpieczeństwa ponad powłoką transportową (np. TCP/IP).
69 Aktualnie biblioteka gnuTLS implementuje standardy proponowane przez
70 grupę roboczą IETF TLS.
73 Summary: GnuTLS shared libraries
74 Summary(pl.UTF-8): Biblioteki współdzielone GnuTLS
76 Requires: libidn2 >= 2.0.0
77 %{?with_af_alg:Requires: libkcapi >= 1.3.0}
78 Requires: libtasn1 >= 4.11
79 Requires: nettle >= 3.6
80 #Requires: opencdk >= 0.6.6
81 Requires: p11-kit >= 0.23.1
82 %{?with_tpm:Requires: trousers-libs >= 0.3.11}
83 Conflicts: gnutls < 3.2.0
86 GnuTLS shared libraries.
88 %description libs -l pl.UTF-8
89 Biblioteki współdzielone GnuTLS.
92 Summary: Header files etc to develop gnutls applications
93 Summary(pl.UTF-8): Pliki nagłówkowe i inne do gnutls
94 License: LGPL v2.1+ (libgnutls), GPL v3+ (openssl library)
95 Group: Development/Libraries
96 Requires: %{name}-libs = %{version}-%{release}
97 Requires: libidn2-devel
98 Requires: libtasn1-devel >= 4.11
99 Requires: libunistring-devel
100 Requires: nettle-devel >= 3.6
101 #Requires: opencdk-devel >= 0.6.6
102 Requires: p11-kit-devel >= 0.23.1
103 %{?with_tpm:Requires: trousers-devel >= 0.3.11}
107 Header files etc to develop gnutls applications.
109 %description devel -l pl.UTF-8
110 Pliki nagłówkowe i inne do gnutls.
113 Summary: Static gnutls library
114 Summary(pl.UTF-8): Biblioteka statyczna gnutls
115 License: LGPL v2.1+ (libgnutls), GPL v3+ (openssl library)
116 Group: Development/Libraries
117 Requires: %{name}-devel = %{version}-%{release}
120 Static gnutls library.
122 %description static -l pl.UTF-8
123 Biblioteka statyczna gnutls.
126 Summary: libgnutlsxx - C++ interface to gnutls library
127 Summary(pl.UTF-8): libgnutlsxx - interfejs C++ do biblioteki gnutls
130 Requires: %{name}-libs = %{version}-%{release}
133 libgnutlsxx - C++ interface to gnutls library.
135 %description c++ -l pl.UTF-8
136 libgnutlsxx - interfejs C++ do biblioteki gnutls.
139 Summary: Header files for libgnutlsxx, a C++ interface to gnutls library
140 Summary(pl.UTF-8): Pliki nagłówkowe libgnutlsxx - interfejsu C++ do biblioteki gnutls
142 Group: Development/Libraries
143 Requires: %{name}-c++ = %{version}-%{release}
144 Requires: %{name}-devel = %{version}-%{release}
145 Requires: libstdc++-devel
147 %description c++-devel
148 Header files for libgnutlsxx, a C++ interface to gnutls library.
150 %description c++-devel -l pl.UTF-8
151 Pliki nagłówkowe libgnutlsxx - interfejsu C++ do biblioteki gnutls.
154 Summary: Static version of libgnutlsxx, a C++ interface to gnutls library
155 Summary(pl.UTF-8): Statyczna wersja libgnutlsxx - interfejsu C++ do biblioteki gnutls
157 Group: Development/Libraries
158 Requires: %{name}-c++-devel = %{version}-%{release}
160 %description c++-static
161 Static version of libgnutlsxx, a C++ interface to gnutls library.
163 %description c++-static -l pl.UTF-8
164 Statyczna wersja libgnutlsxx - interfejsu C++ do biblioteki gnutls.
167 Summary: DANE security library
168 Summary(pl.UTF-8): Biblioteka bezpieczeństwa DANE
170 Requires: %{name}-libs = %{version}-%{release}
173 DANE security library.
175 %description dane -l pl.UTF-8
176 Biblioteka bezpieczeństwa DANE.
179 Summary: Header file for DANE security library
180 Summary(pl.UTF-8): Plik nagłówkowy biblioteki bezpieczeństwa DANE
181 Group: Development/Libraries
182 Requires: %{name}-dane = %{version}-%{release}
183 Requires: %{name}-devel = %{version}-%{release}
184 Requires: unbound-devel
186 %description dane-devel
187 Header file for DANE security library.
189 %description dane-devel -l pl.UTF-8
190 Plik nagłówkowy biblioteki bezpieczeństwa DANE.
193 Summary: Static DANE security library
194 Summary(pl.UTF-8): Statyczna biblioteka bezpieczeństwa DANE
195 Group: Development/Libraries
196 Requires: %{name}-dane-devel = %{version}-%{release}
198 %description dane-static
199 Static DANE security library.
201 %description dane-static -l pl.UTF-8
202 Statyczna biblioteka bezpieczeństwa DANE.
205 Summary: OpenSSL compatibility library for GnuTLS
206 Summary(pl.UTF-8): Biblioteka zgodności z OpenSSL dla GnuTLS
208 Requires: %{name}-libs = %{version}-%{release}
211 OpenSSL compatibility library for GnuTLS.
213 %description openssl -l pl.UTF-8
214 Biblioteka zgodności z OpenSSL dla GnuTLS.
216 %package openssl-devel
217 Summary: Header file for gnutls-openssl library
218 Summary(pl.UTF-8): Plik nagłówkowy biblioteki gnutls-openssl
219 Group: Development/Libraries
220 Requires: %{name}-devel = %{version}-%{release}
221 Requires: %{name}-openssl = %{version}-%{release}
223 %description openssl-devel
224 Header file for gnutls-openssl library.
226 %description openssl-devel -l pl.UTF-8
227 Plik nagłówkowy biblioteki gnutls-openssl.
229 %package openssl-static
230 Summary: Static gnutls-openssl library
231 Summary(pl.UTF-8): Statyczna biblioteka gnutls-openssl
232 Group: Development/Libraries
233 Requires: %{name}-openssl-devel = %{version}-%{release}
235 %description openssl-static
236 Static gnutls-openssl library.
238 %description openssl-static -l pl.UTF-8
239 Statyczna biblioteka gnutls-openssl.
241 %package -n guile-gnutls
242 Summary: Guile bindings for GnuTLS
243 Summary(pl.UTF-8): Wiązania Guile do GnuTLS
245 Group: Development/Languages
246 Requires: %{name}-libs = %{version}-%{release}
247 Requires: guile >= 5:2.2.0
249 %description -n guile-gnutls
250 Guile bindings for GnuTLS.
252 %description -n guile-gnutls -l pl.UTF-8
253 Wiązania Guile do GnuTLS.
265 %{__aclocal} -I m4 -I src/libopts/m4 -I src/gl/m4 -I lib/unistring/m4
270 %{?with_af_alg:--enable-afalg} \
271 %{!?with_doc:--disable-doc} \
272 %{!?with_guile:--disable-guile} \
273 %{?with_openssl:--enable-openssl-compatibility} \
274 --disable-silent-rules \
275 %{?with_static_libs:--enable-static} \
276 --with-default-trust-store-file=/etc/certs/ca-certificates.crt \
277 %{!?with_tpm:--without-tpm} \
278 --with-trousers-lib=%{_libdir}/libtspi.so.1
283 rm -rf $RPM_BUILD_ROOT
286 DESTDIR=$RPM_BUILD_ROOT
288 # although libgnutls.la is obsoleted by pkg-config, there is
289 # .pc file missing for libgnutls-openssl, and it needs libgnutls.la
292 # guile module - dynamic only
293 %{__rm} $RPM_BUILD_ROOT%{_libdir}/guile/2.*/extensions/guile-gnutls-*.la
294 %if %{with static_libs}
295 %{__rm} $RPM_BUILD_ROOT%{_libdir}/guile/2.*/extensions/guile-gnutls-*.a
299 # images for (not installed) htmlized infos - already packaged with infos
301 %{__rm} $RPM_BUILD_ROOT%{_docdir}/gnutls/*.png
304 %{__rm} -f $RPM_BUILD_ROOT%{_infodir}/dir
309 rm -rf $RPM_BUILD_ROOT
312 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir %{_infodir} >/dev/null 2>&1
315 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir %{_infodir} >/dev/null 2>&1
317 %post libs -p /sbin/ldconfig
318 %postun libs -p /sbin/ldconfig
320 %post c++ -p /sbin/ldconfig
321 %postun c++ -p /sbin/ldconfig
323 %post dane -p /sbin/ldconfig
324 %postun dane -p /sbin/ldconfig
326 %post openssl -p /sbin/ldconfig
327 %postun openssl -p /sbin/ldconfig
329 %post -n guile-gnutls -p /sbin/ldconfig
330 %postun -n guile-gnutls -p /sbin/ldconfig
332 %files -f %{name}.lang
333 %defattr(644,root,root,755)
334 %doc AUTHORS ChangeLog NEWS README.md THANKS
335 %attr(755,root,root) %{_bindir}/certtool
336 %attr(755,root,root) %{_bindir}/gnutls-*
337 %attr(755,root,root) %{_bindir}/ocsptool
338 %attr(755,root,root) %{_bindir}/p11tool
339 %attr(755,root,root) %{_bindir}/psktool
340 %attr(755,root,root) %{_bindir}/srptool
341 %{?with_tpm:%attr(755,root,root) %{_bindir}/tpmtool}
343 %{_mandir}/man1/certtool.1*
344 %{_mandir}/man1/gnutls-*.1*
345 %{_mandir}/man1/ocsptool.1*
346 %{_mandir}/man1/p11tool.1*
347 %{_mandir}/man1/psktool.1*
348 %{_mandir}/man1/srptool.1*
349 %{_mandir}/man1/tpmtool.1*
350 %{_infodir}/gnutls.info*
351 %{_infodir}/gnutls-*.png
352 %{_infodir}/pkcs11-vision.png
356 %defattr(644,root,root,755)
357 %attr(755,root,root) %{_libdir}/libgnutls.so.*.*.*
358 %attr(755,root,root) %ghost %{_libdir}/libgnutls.so.30
361 %defattr(644,root,root,755)
362 %attr(755,root,root) %{_libdir}/libgnutls.so
363 %{_libdir}/libgnutls.la
364 %{_includedir}/gnutls
365 %{?with_dane:%exclude %{_includedir}/gnutls/dane.h}
366 %exclude %{_includedir}/gnutls/gnutlsxx.h
367 %{?with_openssl:%exclude %{_includedir}/gnutls/openssl.h}
368 %{_pkgconfigdir}/gnutls.pc
369 %{?with_doc:%{_mandir}/man3/gnutls_*.3*}
371 %if %{with static_libs}
373 %defattr(644,root,root,755)
374 %{_libdir}/libgnutls.a
378 %defattr(644,root,root,755)
379 %attr(755,root,root) %{_libdir}/libgnutlsxx.so.*.*.*
380 %attr(755,root,root) %ghost %{_libdir}/libgnutlsxx.so.28
383 %defattr(644,root,root,755)
384 %attr(755,root,root) %{_libdir}/libgnutlsxx.so
385 %{_libdir}/libgnutlsxx.la
386 %{_includedir}/gnutls/gnutlsxx.h
388 %if %{with static_libs}
390 %defattr(644,root,root,755)
391 %{_libdir}/libgnutlsxx.a
396 %defattr(644,root,root,755)
397 %attr(755,root,root) %{_bindir}/danetool
398 %attr(755,root,root) %{_libdir}/libgnutls-dane.so.*.*.*
399 %attr(755,root,root) %ghost %{_libdir}/libgnutls-dane.so.0
400 %{?with_doc:%{_mandir}/man1/danetool.1*}
403 %defattr(644,root,root,755)
404 %attr(755,root,root) %{_libdir}/libgnutls-dane.so
405 %{_libdir}/libgnutls-dane.la
406 %{_includedir}/gnutls/dane.h
407 %{_pkgconfigdir}/gnutls-dane.pc
409 %{_mandir}/man3/dane_*.3*
412 %if %{with static_libs}
414 %defattr(644,root,root,755)
415 %{_libdir}/libgnutls-dane.a
421 %defattr(644,root,root,755)
422 %attr(755,root,root) %{_libdir}/libgnutls-openssl.so.*.*.*
423 %attr(755,root,root) %ghost %{_libdir}/libgnutls-openssl.so.27
426 %defattr(644,root,root,755)
427 %attr(755,root,root) %{_libdir}/libgnutls-openssl.so
428 %{_libdir}/libgnutls-openssl.la
429 %{_includedir}/gnutls/openssl.h
431 %if %{with static_libs}
432 %files openssl-static
433 %defattr(644,root,root,755)
434 %{_libdir}/libgnutls-openssl.a
439 %files -n guile-gnutls
440 %defattr(644,root,root,755)
441 %attr(755,root,root) %{_libdir}/guile/2.*/extensions/guile-gnutls-v-2.so*
442 %{_libdir}/guile/2.*/site-ccache/gnutls.go
443 %{_libdir}/guile/2.*/site-ccache/gnutls
444 %{_datadir}/guile/site/2.*/gnutls.scm
445 %{_datadir}/guile/site/2.*/gnutls
447 %{_infodir}/gnutls-guile.info*