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
10 Summary: The GNU Transport Layer Security Library
11 Summary(pl.UTF-8): Biblioteka GNU TLS (Transport Layer Security)
15 License: LGPL v2.1+ (libgnutls), LGPL v3+ (libdane), GPL v3+ (openssl library and tools)
17 Source0: ftp://ftp.gnutls.org/gcrypt/gnutls/v3.7/%{name}-%{version}.tar.xz
18 # Source0-md5: 278e1f50d79cd13727733adbf01fde8f
19 Patch0: %{name}-info.patch
20 Patch1: %{name}-link.patch
21 Patch2: %{name}-pl.po-update.patch
22 URL: https://www.gnutls.org/
23 BuildRequires: autoconf >= 2.63
24 BuildRequires: autogen >= 5.16
25 BuildRequires: autogen-devel >= 5.16
26 BuildRequires: automake >= 1:1.12.2
27 BuildRequires: gcc >= 5:3.2
28 BuildRequires: gettext-tools >= 0.19
29 BuildRequires: gmp-devel
30 %{?with_doc:BuildRequires: gtk-doc >= 1.14}
31 %{?with_guile:BuildRequires: guile-devel >= 5:2.2.0}
32 BuildRequires: libidn2-devel >= 2.0.0
33 BuildRequires: libstdc++-devel
34 BuildRequires: libtasn1-devel >= 4.11
35 BuildRequires: libunistring-devel
36 BuildRequires: libtool >= 2:2
37 BuildRequires: nettle-devel >= 3.6
38 # miniopencdk is included in sources and currently maintained
39 # as part of gnutls, not external package
40 #BuildRequires: opencdk-devel >= 0.6.6
41 BuildRequires: p11-kit-devel >= 0.23.1
42 BuildRequires: pkgconfig
43 BuildRequires: readline-devel
44 BuildRequires: rpmbuild(macros) >= 1.383
45 BuildRequires: sed >= 4.0
46 BuildRequires: tar >= 1:1.22
47 %{?with_doc:BuildRequires: texinfo >= 4.8}
48 %{?with_tpm:BuildRequires: trousers-devel >= 0.3.11}
49 %{?with_dane:BuildRequires: unbound-devel}
51 BuildRequires: zlib-devel
52 Requires: %{name}-libs = %{version}-%{release}
53 %{?with_dane:Requires: %{name}-dane = %{version}-%{release}}
54 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
56 %define _noautostrip .*\.go
59 GnuTLS is a project that aims to develop a library which provides a
60 secure layer, over a reliable transport layer (ie. TCP/IP). Currently
61 the gnuTLS library implements the proposed standards by the IETF's TLS
64 %description -l pl.UTF-8
65 GnuTLS to projekt mający na celu stworzenie biblioteki udostępniającej
66 powłokę bezpieczeństwa ponad powłoką transportową (np. TCP/IP).
67 Aktualnie biblioteka gnuTLS implementuje standardy proponowane przez
68 grupę roboczą IETF TLS.
71 Summary: GnuTLS shared libraries
72 Summary(pl.UTF-8): Biblioteki współdzielone GnuTLS
74 Requires: libidn2 >= 2.0.0
75 Requires: libtasn1 >= 4.11
76 Requires: nettle >= 3.6
77 #Requires: opencdk >= 0.6.6
78 Requires: p11-kit >= 0.23.1
79 %{?with_tpm:Requires: trousers-libs >= 0.3.11}
80 Conflicts: gnutls < 3.2.0
83 GnuTLS shared libraries.
85 %description libs -l pl.UTF-8
86 Biblioteki współdzielone GnuTLS.
89 Summary: Header files etc to develop gnutls applications
90 Summary(pl.UTF-8): Pliki nagłówkowe i inne do gnutls
91 License: LGPL v2.1+ (libgnutls), GPL v3+ (openssl library)
92 Group: Development/Libraries
93 Requires: %{name}-libs = %{version}-%{release}
94 Requires: libidn2-devel
95 Requires: libtasn1-devel >= 4.11
96 Requires: libunistring-devel
97 Requires: nettle-devel >= 3.6
98 #Requires: opencdk-devel >= 0.6.6
99 Requires: p11-kit-devel >= 0.23.1
100 %{?with_tpm:Requires: trousers-devel >= 0.3.11}
104 Header files etc to develop gnutls applications.
106 %description devel -l pl.UTF-8
107 Pliki nagłówkowe i inne do gnutls.
110 Summary: Static gnutls library
111 Summary(pl.UTF-8): Biblioteka statyczna gnutls
112 License: LGPL v2.1+ (libgnutls), GPL v3+ (openssl library)
113 Group: Development/Libraries
114 Requires: %{name}-devel = %{version}-%{release}
117 Static gnutls library.
119 %description static -l pl.UTF-8
120 Biblioteka statyczna gnutls.
123 Summary: libgnutlsxx - C++ interface to gnutls library
124 Summary(pl.UTF-8): libgnutlsxx - interfejs C++ do biblioteki gnutls
127 Requires: %{name}-libs = %{version}-%{release}
130 libgnutlsxx - C++ interface to gnutls library.
132 %description c++ -l pl.UTF-8
133 libgnutlsxx - interfejs C++ do biblioteki gnutls.
136 Summary: Header files for libgnutlsxx, a C++ interface to gnutls library
137 Summary(pl.UTF-8): Pliki nagłówkowe libgnutlsxx - interfejsu C++ do biblioteki gnutls
139 Group: Development/Libraries
140 Requires: %{name}-c++ = %{version}-%{release}
141 Requires: %{name}-devel = %{version}-%{release}
142 Requires: libstdc++-devel
144 %description c++-devel
145 Header files for libgnutlsxx, a C++ interface to gnutls library.
147 %description c++-devel -l pl.UTF-8
148 Pliki nagłówkowe libgnutlsxx - interfejsu C++ do biblioteki gnutls.
151 Summary: Static version of libgnutlsxx, a C++ interface to gnutls library
152 Summary(pl.UTF-8): Statyczna wersja libgnutlsxx - interfejsu C++ do biblioteki gnutls
154 Group: Development/Libraries
155 Requires: %{name}-c++-devel = %{version}-%{release}
157 %description c++-static
158 Static version of libgnutlsxx, a C++ interface to gnutls library.
160 %description c++-static -l pl.UTF-8
161 Statyczna wersja libgnutlsxx - interfejsu C++ do biblioteki gnutls.
164 Summary: DANE security library
165 Summary(pl.UTF-8): Biblioteka bezpieczeństwa DANE
167 Requires: %{name}-libs = %{version}-%{release}
170 DANE security library.
172 %description dane -l pl.UTF-8
173 Biblioteka bezpieczeństwa DANE.
176 Summary: Header file for DANE security library
177 Summary(pl.UTF-8): Plik nagłówkowy biblioteki bezpieczeństwa DANE
178 Group: Development/Libraries
179 Requires: %{name}-dane = %{version}-%{release}
180 Requires: %{name}-devel = %{version}-%{release}
181 Requires: unbound-devel
183 %description dane-devel
184 Header file for DANE security library.
186 %description dane-devel -l pl.UTF-8
187 Plik nagłówkowy biblioteki bezpieczeństwa DANE.
190 Summary: Static DANE security library
191 Summary(pl.UTF-8): Statyczna biblioteka bezpieczeństwa DANE
192 Group: Development/Libraries
193 Requires: %{name}-dane-devel = %{version}-%{release}
195 %description dane-static
196 Static DANE security library.
198 %description dane-static -l pl.UTF-8
199 Statyczna biblioteka bezpieczeństwa DANE.
202 Summary: OpenSSL compatibility library for GnuTLS
203 Summary(pl.UTF-8): Biblioteka zgodności z OpenSSL dla GnuTLS
205 Requires: %{name}-libs = %{version}-%{release}
208 OpenSSL compatibility library for GnuTLS.
210 %description openssl -l pl.UTF-8
211 Biblioteka zgodności z OpenSSL dla GnuTLS.
213 %package openssl-devel
214 Summary: Header file for gnutls-openssl library
215 Summary(pl.UTF-8): Plik nagłówkowy biblioteki gnutls-openssl
216 Group: Development/Libraries
217 Requires: %{name}-devel = %{version}-%{release}
218 Requires: %{name}-openssl = %{version}-%{release}
220 %description openssl-devel
221 Header file for gnutls-openssl library.
223 %description openssl-devel -l pl.UTF-8
224 Plik nagłówkowy biblioteki gnutls-openssl.
226 %package openssl-static
227 Summary: Static gnutls-openssl library
228 Summary(pl.UTF-8): Statyczna biblioteka gnutls-openssl
229 Group: Development/Libraries
230 Requires: %{name}-openssl-devel = %{version}-%{release}
232 %description openssl-static
233 Static gnutls-openssl library.
235 %description openssl-static -l pl.UTF-8
236 Statyczna biblioteka gnutls-openssl.
238 %package -n guile-gnutls
239 Summary: Guile bindings for GnuTLS
240 Summary(pl.UTF-8): Wiązania Guile do GnuTLS
242 Group: Development/Languages
243 Requires: %{name}-libs = %{version}-%{release}
244 Requires: guile >= 5:2.2.0
246 %description -n guile-gnutls
247 Guile bindings for GnuTLS.
249 %description -n guile-gnutls -l pl.UTF-8
250 Wiązania Guile do GnuTLS.
262 %{__aclocal} -I m4 -I src/libopts/m4 -I src/gl/m4 -I lib/unistring/m4
267 %{!?with_doc:--disable-doc} \
268 %{!?with_guile:--disable-guile} \
269 %{?with_openssl:--enable-openssl-compatibility} \
270 --disable-silent-rules \
271 %{?with_static_libs:--enable-static} \
272 --with-default-trust-store-file=/etc/certs/ca-certificates.crt \
273 %{!?with_tpm:--without-tpm} \
274 --with-trousers-lib=%{_libdir}/libtspi.so.1
279 rm -rf $RPM_BUILD_ROOT
282 DESTDIR=$RPM_BUILD_ROOT
284 # although libgnutls.la is obsoleted by pkg-config, there is
285 # .pc file missing for libgnutls-openssl, and it needs libgnutls.la
288 # guile module - dynamic only
289 %{__rm} $RPM_BUILD_ROOT%{_libdir}/guile/2.*/extensions/guile-gnutls-*.la
290 %if %{with static_libs}
291 %{__rm} $RPM_BUILD_ROOT%{_libdir}/guile/2.*/extensions/guile-gnutls-*.a
295 # images for (not installed) htmlized infos - already packaged with infos
297 %{__rm} $RPM_BUILD_ROOT%{_docdir}/gnutls/*.png
300 %{__rm} -f $RPM_BUILD_ROOT%{_infodir}/dir
305 rm -rf $RPM_BUILD_ROOT
308 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir %{_infodir} >/dev/null 2>&1
311 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir %{_infodir} >/dev/null 2>&1
313 %post libs -p /sbin/ldconfig
314 %postun libs -p /sbin/ldconfig
316 %post c++ -p /sbin/ldconfig
317 %postun c++ -p /sbin/ldconfig
319 %post dane -p /sbin/ldconfig
320 %postun dane -p /sbin/ldconfig
322 %post openssl -p /sbin/ldconfig
323 %postun openssl -p /sbin/ldconfig
325 %post -n guile-gnutls -p /sbin/ldconfig
326 %postun -n guile-gnutls -p /sbin/ldconfig
328 %files -f %{name}.lang
329 %defattr(644,root,root,755)
330 %doc AUTHORS ChangeLog NEWS README.md THANKS
331 %attr(755,root,root) %{_bindir}/certtool
332 %attr(755,root,root) %{_bindir}/gnutls-*
333 %attr(755,root,root) %{_bindir}/ocsptool
334 %attr(755,root,root) %{_bindir}/p11tool
335 %attr(755,root,root) %{_bindir}/psktool
336 %attr(755,root,root) %{_bindir}/srptool
337 %{?with_tpm:%attr(755,root,root) %{_bindir}/tpmtool}
339 %{_mandir}/man1/certtool.1*
340 %{_mandir}/man1/gnutls-*.1*
341 %{_mandir}/man1/ocsptool.1*
342 %{_mandir}/man1/p11tool.1*
343 %{_mandir}/man1/psktool.1*
344 %{_mandir}/man1/srptool.1*
345 %{_mandir}/man1/tpmtool.1*
346 %{_infodir}/gnutls.info*
347 %{_infodir}/gnutls-*.png
348 %{_infodir}/pkcs11-vision.png
352 %defattr(644,root,root,755)
353 %attr(755,root,root) %{_libdir}/libgnutls.so.*.*.*
354 %attr(755,root,root) %ghost %{_libdir}/libgnutls.so.30
357 %defattr(644,root,root,755)
358 %attr(755,root,root) %{_libdir}/libgnutls.so
359 %{_libdir}/libgnutls.la
360 %{_includedir}/gnutls
361 %{?with_dane:%exclude %{_includedir}/gnutls/dane.h}
362 %exclude %{_includedir}/gnutls/gnutlsxx.h
363 %{?with_openssl:%exclude %{_includedir}/gnutls/openssl.h}
364 %{_pkgconfigdir}/gnutls.pc
365 %{?with_doc:%{_mandir}/man3/gnutls_*.3*}
367 %if %{with static_libs}
369 %defattr(644,root,root,755)
370 %{_libdir}/libgnutls.a
374 %defattr(644,root,root,755)
375 %attr(755,root,root) %{_libdir}/libgnutlsxx.so.*.*.*
376 %attr(755,root,root) %ghost %{_libdir}/libgnutlsxx.so.28
379 %defattr(644,root,root,755)
380 %attr(755,root,root) %{_libdir}/libgnutlsxx.so
381 %{_libdir}/libgnutlsxx.la
382 %{_includedir}/gnutls/gnutlsxx.h
384 %if %{with static_libs}
386 %defattr(644,root,root,755)
387 %{_libdir}/libgnutlsxx.a
392 %defattr(644,root,root,755)
393 %attr(755,root,root) %{_bindir}/danetool
394 %attr(755,root,root) %{_libdir}/libgnutls-dane.so.*.*.*
395 %attr(755,root,root) %ghost %{_libdir}/libgnutls-dane.so.0
396 %{?with_doc:%{_mandir}/man1/danetool.1*}
399 %defattr(644,root,root,755)
400 %attr(755,root,root) %{_libdir}/libgnutls-dane.so
401 %{_libdir}/libgnutls-dane.la
402 %{_includedir}/gnutls/dane.h
403 %{_pkgconfigdir}/gnutls-dane.pc
405 %{_mandir}/man3/dane_*.3*
408 %if %{with static_libs}
410 %defattr(644,root,root,755)
411 %{_libdir}/libgnutls-dane.a
417 %defattr(644,root,root,755)
418 %attr(755,root,root) %{_libdir}/libgnutls-openssl.so.*.*.*
419 %attr(755,root,root) %ghost %{_libdir}/libgnutls-openssl.so.27
422 %defattr(644,root,root,755)
423 %attr(755,root,root) %{_libdir}/libgnutls-openssl.so
424 %{_libdir}/libgnutls-openssl.la
425 %{_includedir}/gnutls/openssl.h
427 %if %{with static_libs}
428 %files openssl-static
429 %defattr(644,root,root,755)
430 %{_libdir}/libgnutls-openssl.a
435 %files -n guile-gnutls
436 %defattr(644,root,root,755)
437 %attr(755,root,root) %{_libdir}/guile/2.*/extensions/guile-gnutls-v-2.so*
438 %{_libdir}/guile/2.*/site-ccache/gnutls.go
439 %{_libdir}/guile/2.*/site-ccache/gnutls
440 %{_datadir}/guile/site/2.*/gnutls.scm
441 %{_datadir}/guile/site/2.*/gnutls
443 %{_infodir}/gnutls-guile.info*