]> git.pld-linux.org Git - packages/gnutls.git/blob - gnutls.spec
upstream fixes for ktls support
[packages/gnutls.git] / gnutls.spec
1 #
2 # Conditional build:
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
12
13 %if %{with tpm2}
14 %undefine       with_tpm
15 %endif
16
17 Summary:        The GNU Transport Layer Security Library
18 Summary(pl.UTF-8):      Biblioteka GNU TLS (Transport Layer Security)
19 Name:           gnutls
20 Version:        3.7.3
21 Release:        1
22 License:        LGPL v2.1+ (libgnutls), LGPL v3+ (libdane), GPL v3+ (openssl library and tools)
23 Group:          Libraries
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 Patch3:         ktls.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}
59 BuildRequires:  xz
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)
64
65 %define         _noautostrip    .*\.go
66
67 %description
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
71 working group.
72
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.
78
79 %package libs
80 Summary:        GnuTLS shared libraries
81 Summary(pl.UTF-8):      Biblioteki współdzielone GnuTLS
82 Group:          Libraries
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
91
92 %description libs
93 GnuTLS shared libraries.
94
95 %description libs -l pl.UTF-8
96 Biblioteki współdzielone GnuTLS.
97
98 %package devel
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}
111 Requires:       zlib-devel
112
113 %description devel
114 Header files etc to develop gnutls applications.
115
116 %description devel -l pl.UTF-8
117 Pliki nagłówkowe i inne do gnutls.
118
119 %package static
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}
125
126 %description static
127 Static gnutls library.
128
129 %description static -l pl.UTF-8
130 Biblioteka statyczna gnutls.
131
132 %package c++
133 Summary:        libgnutlsxx - C++ interface to gnutls library
134 Summary(pl.UTF-8):      libgnutlsxx - interfejs C++ do biblioteki gnutls
135 License:        LGPL v2.1+
136 Group:          Libraries
137 Requires:       %{name}-libs = %{version}-%{release}
138
139 %description c++
140 libgnutlsxx - C++ interface to gnutls library.
141
142 %description c++ -l pl.UTF-8
143 libgnutlsxx - interfejs C++ do biblioteki gnutls.
144
145 %package c++-devel
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
148 License:        LGPL v2.1+
149 Group:          Development/Libraries
150 Requires:       %{name}-c++ = %{version}-%{release}
151 Requires:       %{name}-devel = %{version}-%{release}
152 Requires:       libstdc++-devel
153
154 %description c++-devel
155 Header files for libgnutlsxx, a C++ interface to gnutls library.
156
157 %description c++-devel -l pl.UTF-8
158 Pliki nagłówkowe libgnutlsxx - interfejsu C++ do biblioteki gnutls.
159
160 %package c++-static
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
163 License:        LGPL v2.1+
164 Group:          Development/Libraries
165 Requires:       %{name}-c++-devel = %{version}-%{release}
166
167 %description c++-static
168 Static version of libgnutlsxx, a C++ interface to gnutls library.
169
170 %description c++-static -l pl.UTF-8
171 Statyczna wersja libgnutlsxx - interfejsu C++ do biblioteki gnutls.
172
173 %package dane
174 Summary:        DANE security library
175 Summary(pl.UTF-8):      Biblioteka bezpieczeństwa DANE
176 Group:          Libraries
177 Requires:       %{name}-libs = %{version}-%{release}
178
179 %description dane
180 DANE security library.
181
182 %description dane -l pl.UTF-8
183 Biblioteka bezpieczeństwa DANE.
184
185 %package dane-devel
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
192
193 %description dane-devel
194 Header file for DANE security library.
195
196 %description dane-devel -l pl.UTF-8
197 Plik nagłówkowy biblioteki bezpieczeństwa DANE.
198
199 %package dane-static
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}
204
205 %description dane-static
206 Static DANE security library.
207
208 %description dane-static -l pl.UTF-8
209 Statyczna biblioteka bezpieczeństwa DANE.
210
211 %package openssl
212 Summary:        OpenSSL compatibility library for GnuTLS
213 Summary(pl.UTF-8):      Biblioteka zgodności z OpenSSL dla GnuTLS
214 Group:          Libraries
215 Requires:       %{name}-libs = %{version}-%{release}
216
217 %description openssl
218 OpenSSL compatibility library for GnuTLS.
219
220 %description openssl -l pl.UTF-8
221 Biblioteka zgodności z OpenSSL dla GnuTLS.
222
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}
229
230 %description openssl-devel
231 Header file for gnutls-openssl library.
232
233 %description openssl-devel -l pl.UTF-8
234 Plik nagłówkowy biblioteki gnutls-openssl.
235
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}
241
242 %description openssl-static
243 Static gnutls-openssl library.
244
245 %description openssl-static -l pl.UTF-8
246 Statyczna biblioteka gnutls-openssl.
247
248 %package -n guile-gnutls
249 Summary:        Guile bindings for GnuTLS
250 Summary(pl.UTF-8):      Wiązania Guile do GnuTLS
251 License:        LGPL v2.1+
252 Group:          Development/Languages
253 Requires:       %{name}-libs = %{version}-%{release}
254 Requires:       guile >= 5:2.2.0
255
256 %description -n guile-gnutls
257 Guile bindings for GnuTLS.
258
259 %description -n guile-gnutls -l pl.UTF-8
260 Wiązania Guile do GnuTLS.
261
262 %prep
263 %setup -q
264 %patch0 -p1
265 %patch1 -p1
266 %patch2 -p1
267 %patch3 -p1
268
269 %{__rm} po/stamp-po
270
271 %build
272 %{__libtoolize}
273 %{__aclocal} -I m4 -I src/gl/m4 -I lib/unistring/m4
274 %{__autoconf}
275 %{__autoheader}
276 %{__automake}
277 %configure \
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
289
290 %{__make}
291
292 %install
293 rm -rf $RPM_BUILD_ROOT
294
295 %{__make} install \
296         DESTDIR=$RPM_BUILD_ROOT
297
298 # although libgnutls.la is obsoleted by pkg-config, there is
299 # .pc file missing for libgnutls-openssl, and it needs libgnutls.la
300
301 %if %{with guile}
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
306 %endif
307 %endif
308
309 # images for (not installed) htmlized infos - already packaged with infos
310 %if %{with doc}
311 %{__rm} $RPM_BUILD_ROOT%{_docdir}/gnutls/*.png
312 %endif
313
314 %{__rm} -f $RPM_BUILD_ROOT%{_infodir}/dir
315
316 %find_lang %{name}
317
318 %clean
319 rm -rf $RPM_BUILD_ROOT
320
321 %post
322 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir %{_infodir} >/dev/null 2>&1
323
324 %postun
325 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir %{_infodir} >/dev/null 2>&1
326
327 %post   libs -p /sbin/ldconfig
328 %postun libs -p /sbin/ldconfig
329
330 %post   c++ -p /sbin/ldconfig
331 %postun c++ -p /sbin/ldconfig
332
333 %post   dane -p /sbin/ldconfig
334 %postun dane -p /sbin/ldconfig
335
336 %post   openssl -p /sbin/ldconfig
337 %postun openssl -p /sbin/ldconfig
338
339 %post   -n guile-gnutls -p /sbin/ldconfig
340 %postun -n guile-gnutls -p /sbin/ldconfig
341
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}
352 %if %{with doc}
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
363 %endif
364
365 %files libs
366 %defattr(644,root,root,755)
367 %attr(755,root,root) %{_libdir}/libgnutls.so.*.*.*
368 %attr(755,root,root) %ghost %{_libdir}/libgnutls.so.30
369
370 %files devel
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*}
380
381 %if %{with static_libs}
382 %files static
383 %defattr(644,root,root,755)
384 %{_libdir}/libgnutls.a
385 %endif
386
387 %files c++
388 %defattr(644,root,root,755)
389 %attr(755,root,root) %{_libdir}/libgnutlsxx.so.*.*.*
390 %attr(755,root,root) %ghost %{_libdir}/libgnutlsxx.so.28
391
392 %files c++-devel
393 %defattr(644,root,root,755)
394 %attr(755,root,root) %{_libdir}/libgnutlsxx.so
395 %{_libdir}/libgnutlsxx.la
396 %{_includedir}/gnutls/gnutlsxx.h
397
398 %if %{with static_libs}
399 %files c++-static
400 %defattr(644,root,root,755)
401 %{_libdir}/libgnutlsxx.a
402 %endif
403
404 %if %{with dane}
405 %files dane
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*}
411
412 %files dane-devel
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
418 %if %{with doc}
419 %{_mandir}/man3/dane_*.3*
420 %endif
421
422 %if %{with static_libs}
423 %files dane-static
424 %defattr(644,root,root,755)
425 %{_libdir}/libgnutls-dane.a
426 %endif
427 %endif
428
429 %if %{with openssl}
430 %files openssl
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
434
435 %files openssl-devel
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
440
441 %if %{with static_libs}
442 %files openssl-static
443 %defattr(644,root,root,755)
444 %{_libdir}/libgnutls-openssl.a
445 %endif
446 %endif
447
448 %if %{with guile}
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
456 %if %{with doc}
457 %{_infodir}/gnutls-guile.info*
458 %endif
459 %endif
This page took 0.08141 seconds and 4 git commands to generate.