]> git.pld-linux.org Git - packages/gnutls.git/blob - gnutls.spec
up to 3.7.4 (new libgnutlsxx soname)
[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 Summary:        The GNU Transport Layer Security Library
14 Summary(pl.UTF-8):      Biblioteka GNU TLS (Transport Layer Security)
15 Name:           gnutls
16 Version:        3.7.4
17 Release:        1
18 License:        LGPL v2.1+ (libgnutls), LGPL v3+ (libdane), GPL v3+ (openssl library and tools)
19 Group:          Libraries
20 Source0:        ftp://ftp.gnutls.org/gcrypt/gnutls/v3.7/%{name}-%{version}.tar.xz
21 # Source0-md5:  4bce06332c525eae540bb237433d4225
22 Patch0:         %{name}-info.patch
23 Patch1:         %{name}-link.patch
24 Patch2:         %{name}-pl.po-update.patch
25 Patch3:         zstd.patch
26 URL:            https://www.gnutls.org/
27 BuildRequires:  autoconf >= 2.63
28 BuildRequires:  automake >= 1:1.12.2
29 BuildRequires:  gcc >= 5:3.2
30 BuildRequires:  gettext-tools >= 0.19
31 BuildRequires:  gmp-devel
32 %{?with_doc:BuildRequires:      gtk-doc >= 1.14}
33 %{?with_guile:BuildRequires:    guile-devel >= 5:2.2.0}
34 BuildRequires:  libidn2-devel >= 2.0.0
35 BuildRequires:  libbrotli-devel >= 1.0.0
36 %{?with_af_alg:BuildRequires:   libkcapi-devel >= 1.3.0}
37 BuildRequires:  libstdc++-devel
38 BuildRequires:  libtasn1-devel >= 4.11
39 BuildRequires:  libunistring-devel
40 BuildRequires:  libtool >= 2:2
41 %{?with_ktls:BuildRequires:     linux-libc-headers >= 7:4.13}
42 BuildRequires:  nettle-devel >= 3.6
43 # miniopencdk is included in sources and currently maintained
44 # as part of gnutls, not external package
45 #BuildRequires: opencdk-devel >= 0.6.6
46 BuildRequires:  p11-kit-devel >= 0.23.1
47 BuildRequires:  pkgconfig
48 BuildRequires:  readline-devel
49 BuildRequires:  rpmbuild(macros) >= 1.527
50 BuildRequires:  sed >= 4.0
51 BuildRequires:  tar >= 1:1.22
52 %{?with_doc:BuildRequires:      texinfo >= 4.8}
53 %{?with_tpm2:BuildRequires:     tpm2-tss-devel}
54 %{?with_tpm:BuildRequires:      trousers-devel >= 0.3.11}
55 %{?with_dane:BuildRequires:     unbound-devel}
56 BuildRequires:  xz
57 BuildRequires:  zlib-devel
58 BuildRequires:  zstd-devel >= 1.3.0
59 Requires:       %{name}-libs = %{version}-%{release}
60 %{?with_dane:Requires:  %{name}-dane = %{version}-%{release}}
61 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
62
63 %define         _noautostrip    .*\.go
64
65 %description
66 GnuTLS is a project that aims to develop a library which provides a
67 secure layer, over a reliable transport layer (ie. TCP/IP). Currently
68 the gnuTLS library implements the proposed standards by the IETF's TLS
69 working group.
70
71 %description -l pl.UTF-8
72 GnuTLS to projekt mający na celu stworzenie biblioteki udostępniającej
73 powłokę bezpieczeństwa ponad powłoką transportową (np. TCP/IP).
74 Aktualnie biblioteka gnuTLS implementuje standardy proponowane przez
75 grupę roboczą IETF TLS.
76
77 %package libs
78 Summary:        GnuTLS shared libraries
79 Summary(pl.UTF-8):      Biblioteki współdzielone GnuTLS
80 Group:          Libraries
81 Requires:       libbrotli >= 1.0.0
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 Requires:       zstd >= 1.3.0
89 # dlopened libtss2-*
90 %{?with_tpm2:Suggests:  tpm2-tss}
91 # dlopened libtspi
92 %{?with_tpm:Suggests:   trousers-libs >= 0.3.11}
93 Conflicts:      gnutls < 3.2.0
94
95 %description libs
96 GnuTLS shared libraries.
97
98 %description libs -l pl.UTF-8
99 Biblioteki współdzielone GnuTLS.
100
101 %package devel
102 Summary:        Header files etc to develop gnutls applications
103 Summary(pl.UTF-8):      Pliki nagłówkowe i inne do gnutls
104 License:        LGPL v2.1+ (libgnutls), GPL v3+ (openssl library)
105 Group:          Development/Libraries
106 Requires:       %{name}-libs = %{version}-%{release}
107 Requires:       gmp-devel
108 Requires:       libbrotli-devel >= 1.0.0
109 Requires:       libidn2-devel
110 Requires:       libtasn1-devel >= 4.11
111 Requires:       libunistring-devel
112 Requires:       nettle-devel >= 3.6
113 #Requires:      opencdk-devel >= 0.6.6
114 Requires:       p11-kit-devel >= 0.23.1
115 %{?with_tpm:Requires:   trousers-devel >= 0.3.11}
116 Requires:       zlib-devel
117 Requires:       zstd-devel >= 1.3.0
118
119 %description devel
120 Header files etc to develop gnutls applications.
121
122 %description devel -l pl.UTF-8
123 Pliki nagłówkowe i inne do gnutls.
124
125 %package static
126 Summary:        Static gnutls library
127 Summary(pl.UTF-8):      Biblioteka statyczna gnutls
128 License:        LGPL v2.1+ (libgnutls), GPL v3+ (openssl library)
129 Group:          Development/Libraries
130 Requires:       %{name}-devel = %{version}-%{release}
131
132 %description static
133 Static gnutls library.
134
135 %description static -l pl.UTF-8
136 Biblioteka statyczna gnutls.
137
138 %package c++
139 Summary:        libgnutlsxx - C++ interface to gnutls library
140 Summary(pl.UTF-8):      libgnutlsxx - interfejs C++ do biblioteki gnutls
141 License:        LGPL v2.1+
142 Group:          Libraries
143 Requires:       %{name}-libs = %{version}-%{release}
144
145 %description c++
146 libgnutlsxx - C++ interface to gnutls library.
147
148 %description c++ -l pl.UTF-8
149 libgnutlsxx - interfejs C++ do biblioteki gnutls.
150
151 %package c++-devel
152 Summary:        Header files for libgnutlsxx, a C++ interface to gnutls library
153 Summary(pl.UTF-8):      Pliki nagłówkowe libgnutlsxx - interfejsu C++ do biblioteki gnutls
154 License:        LGPL v2.1+
155 Group:          Development/Libraries
156 Requires:       %{name}-c++ = %{version}-%{release}
157 Requires:       %{name}-devel = %{version}-%{release}
158 Requires:       libstdc++-devel
159
160 %description c++-devel
161 Header files for libgnutlsxx, a C++ interface to gnutls library.
162
163 %description c++-devel -l pl.UTF-8
164 Pliki nagłówkowe libgnutlsxx - interfejsu C++ do biblioteki gnutls.
165
166 %package c++-static
167 Summary:        Static version of libgnutlsxx, a C++ interface to gnutls library
168 Summary(pl.UTF-8):      Statyczna wersja libgnutlsxx - interfejsu C++ do biblioteki gnutls
169 License:        LGPL v2.1+
170 Group:          Development/Libraries
171 Requires:       %{name}-c++-devel = %{version}-%{release}
172
173 %description c++-static
174 Static version of libgnutlsxx, a C++ interface to gnutls library.
175
176 %description c++-static -l pl.UTF-8
177 Statyczna wersja libgnutlsxx - interfejsu C++ do biblioteki gnutls.
178
179 %package dane
180 Summary:        DANE security library
181 Summary(pl.UTF-8):      Biblioteka bezpieczeństwa DANE
182 Group:          Libraries
183 Requires:       %{name}-libs = %{version}-%{release}
184
185 %description dane
186 DANE security library.
187
188 %description dane -l pl.UTF-8
189 Biblioteka bezpieczeństwa DANE.
190
191 %package dane-devel
192 Summary:        Header file for DANE security library
193 Summary(pl.UTF-8):      Plik nagłówkowy biblioteki bezpieczeństwa DANE
194 Group:          Development/Libraries
195 Requires:       %{name}-dane = %{version}-%{release}
196 Requires:       %{name}-devel = %{version}-%{release}
197 Requires:       unbound-devel
198
199 %description dane-devel
200 Header file for DANE security library.
201
202 %description dane-devel -l pl.UTF-8
203 Plik nagłówkowy biblioteki bezpieczeństwa DANE.
204
205 %package dane-static
206 Summary:        Static DANE security library
207 Summary(pl.UTF-8):      Statyczna biblioteka bezpieczeństwa DANE
208 Group:          Development/Libraries
209 Requires:       %{name}-dane-devel = %{version}-%{release}
210
211 %description dane-static
212 Static DANE security library.
213
214 %description dane-static -l pl.UTF-8
215 Statyczna biblioteka bezpieczeństwa DANE.
216
217 %package openssl
218 Summary:        OpenSSL compatibility library for GnuTLS
219 Summary(pl.UTF-8):      Biblioteka zgodności z OpenSSL dla GnuTLS
220 Group:          Libraries
221 Requires:       %{name}-libs = %{version}-%{release}
222
223 %description openssl
224 OpenSSL compatibility library for GnuTLS.
225
226 %description openssl -l pl.UTF-8
227 Biblioteka zgodności z OpenSSL dla GnuTLS.
228
229 %package openssl-devel
230 Summary:        Header file for gnutls-openssl library
231 Summary(pl.UTF-8):      Plik nagłówkowy biblioteki gnutls-openssl
232 Group:          Development/Libraries
233 Requires:       %{name}-devel = %{version}-%{release}
234 Requires:       %{name}-openssl = %{version}-%{release}
235
236 %description openssl-devel
237 Header file for gnutls-openssl library.
238
239 %description openssl-devel -l pl.UTF-8
240 Plik nagłówkowy biblioteki gnutls-openssl.
241
242 %package openssl-static
243 Summary:        Static gnutls-openssl library
244 Summary(pl.UTF-8):      Statyczna biblioteka gnutls-openssl
245 Group:          Development/Libraries
246 Requires:       %{name}-openssl-devel = %{version}-%{release}
247
248 %description openssl-static
249 Static gnutls-openssl library.
250
251 %description openssl-static -l pl.UTF-8
252 Statyczna biblioteka gnutls-openssl.
253
254 %package -n guile-gnutls
255 Summary:        Guile bindings for GnuTLS
256 Summary(pl.UTF-8):      Wiązania Guile do GnuTLS
257 License:        LGPL v2.1+
258 Group:          Development/Languages
259 Requires:       %{name}-libs = %{version}-%{release}
260 Requires:       guile >= 5:2.2.0
261
262 %description -n guile-gnutls
263 Guile bindings for GnuTLS.
264
265 %description -n guile-gnutls -l pl.UTF-8
266 Wiązania Guile do GnuTLS.
267
268 %prep
269 %setup -q
270 %patch0 -p1
271 %patch1 -p1
272 %patch2 -p1
273 %patch3 -p1
274
275 %{__rm} po/stamp-po
276
277 %build
278 %{__libtoolize}
279 %{__aclocal} -I m4 -I src/gl/m4 -I lib/unistring/m4
280 %{__autoconf}
281 %{__autoheader}
282 %{__automake}
283 %configure \
284         %{?with_af_alg:--enable-afalg} \
285         %{!?with_doc:--disable-doc} \
286         %{!?with_guile:--disable-guile} \
287         %{__enable_disable ktls} \
288         %{?with_openssl:--enable-openssl-compatibility} \
289         --disable-silent-rules \
290         %{?with_static_libs:--enable-static} \
291         --with-default-trust-store-file=/etc/certs/ca-certificates.crt \
292         %{!?with_tpm:--without-tpm} \
293         %{__with_without tpm2} \
294         --with-trousers-lib=%{_libdir}/libtspi.so.1
295
296 %{__make}
297
298 %install
299 rm -rf $RPM_BUILD_ROOT
300
301 %{__make} install \
302         DESTDIR=$RPM_BUILD_ROOT
303
304 # although libgnutls.la is obsoleted by pkg-config, there is
305 # .pc file missing for libgnutls-openssl, and it needs libgnutls.la
306
307 %if %{with guile}
308 # guile module - dynamic only
309 %{__rm} $RPM_BUILD_ROOT%{_libdir}/guile/3.*/extensions/guile-gnutls-*.la
310 %if %{with static_libs}
311 %{__rm} $RPM_BUILD_ROOT%{_libdir}/guile/3.*/extensions/guile-gnutls-*.a
312 %endif
313 %endif
314
315 # images for (not installed) htmlized infos - already packaged with infos
316 %if %{with doc}
317 %{__rm} $RPM_BUILD_ROOT%{_docdir}/gnutls/*.png
318 %endif
319
320 %{__rm} -f $RPM_BUILD_ROOT%{_infodir}/dir
321
322 %find_lang %{name}
323
324 %clean
325 rm -rf $RPM_BUILD_ROOT
326
327 %post
328 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir %{_infodir} >/dev/null 2>&1
329
330 %postun
331 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir %{_infodir} >/dev/null 2>&1
332
333 %post   libs -p /sbin/ldconfig
334 %postun libs -p /sbin/ldconfig
335
336 %post   c++ -p /sbin/ldconfig
337 %postun c++ -p /sbin/ldconfig
338
339 %post   dane -p /sbin/ldconfig
340 %postun dane -p /sbin/ldconfig
341
342 %post   openssl -p /sbin/ldconfig
343 %postun openssl -p /sbin/ldconfig
344
345 %post   -n guile-gnutls -p /sbin/ldconfig
346 %postun -n guile-gnutls -p /sbin/ldconfig
347
348 %files -f %{name}.lang
349 %defattr(644,root,root,755)
350 %doc AUTHORS ChangeLog NEWS README.md THANKS
351 %attr(755,root,root) %{_bindir}/certtool
352 %attr(755,root,root) %{_bindir}/gnutls-*
353 %attr(755,root,root) %{_bindir}/ocsptool
354 %attr(755,root,root) %{_bindir}/p11tool
355 %attr(755,root,root) %{_bindir}/psktool
356 %attr(755,root,root) %{_bindir}/srptool
357 %{?with_tpm:%attr(755,root,root) %{_bindir}/tpmtool}
358 %if %{with doc}
359 %{_mandir}/man1/certtool.1*
360 %{_mandir}/man1/gnutls-*.1*
361 %{_mandir}/man1/ocsptool.1*
362 %{_mandir}/man1/p11tool.1*
363 %{_mandir}/man1/psktool.1*
364 %{_mandir}/man1/srptool.1*
365 %{_mandir}/man1/tpmtool.1*
366 %{_infodir}/gnutls.info*
367 %{_infodir}/gnutls-*.png
368 %{_infodir}/pkcs11-vision.png
369 %endif
370
371 %files libs
372 %defattr(644,root,root,755)
373 %attr(755,root,root) %{_libdir}/libgnutls.so.*.*.*
374 %attr(755,root,root) %ghost %{_libdir}/libgnutls.so.30
375
376 %files devel
377 %defattr(644,root,root,755)
378 %attr(755,root,root) %{_libdir}/libgnutls.so
379 %{_libdir}/libgnutls.la
380 %{_includedir}/gnutls
381 %{?with_dane:%exclude %{_includedir}/gnutls/dane.h}
382 %exclude %{_includedir}/gnutls/gnutlsxx.h
383 %{?with_openssl:%exclude %{_includedir}/gnutls/openssl.h}
384 %{_pkgconfigdir}/gnutls.pc
385 %{?with_doc:%{_mandir}/man3/gnutls_*.3*}
386
387 %if %{with static_libs}
388 %files static
389 %defattr(644,root,root,755)
390 %{_libdir}/libgnutls.a
391 %endif
392
393 %files c++
394 %defattr(644,root,root,755)
395 %attr(755,root,root) %{_libdir}/libgnutlsxx.so.*.*.*
396 %attr(755,root,root) %ghost %{_libdir}/libgnutlsxx.so.30
397
398 %files c++-devel
399 %defattr(644,root,root,755)
400 %attr(755,root,root) %{_libdir}/libgnutlsxx.so
401 %{_libdir}/libgnutlsxx.la
402 %{_includedir}/gnutls/gnutlsxx.h
403
404 %if %{with static_libs}
405 %files c++-static
406 %defattr(644,root,root,755)
407 %{_libdir}/libgnutlsxx.a
408 %endif
409
410 %if %{with dane}
411 %files dane
412 %defattr(644,root,root,755)
413 %attr(755,root,root) %{_bindir}/danetool
414 %attr(755,root,root) %{_libdir}/libgnutls-dane.so.*.*.*
415 %attr(755,root,root) %ghost %{_libdir}/libgnutls-dane.so.0
416 %{?with_doc:%{_mandir}/man1/danetool.1*}
417
418 %files dane-devel
419 %defattr(644,root,root,755)
420 %attr(755,root,root) %{_libdir}/libgnutls-dane.so
421 %{_libdir}/libgnutls-dane.la
422 %{_includedir}/gnutls/dane.h
423 %{_pkgconfigdir}/gnutls-dane.pc
424 %if %{with doc}
425 %{_mandir}/man3/dane_*.3*
426 %endif
427
428 %if %{with static_libs}
429 %files dane-static
430 %defattr(644,root,root,755)
431 %{_libdir}/libgnutls-dane.a
432 %endif
433 %endif
434
435 %if %{with openssl}
436 %files openssl
437 %defattr(644,root,root,755)
438 %attr(755,root,root) %{_libdir}/libgnutls-openssl.so.*.*.*
439 %attr(755,root,root) %ghost %{_libdir}/libgnutls-openssl.so.27
440
441 %files openssl-devel
442 %defattr(644,root,root,755)
443 %attr(755,root,root) %{_libdir}/libgnutls-openssl.so
444 %{_libdir}/libgnutls-openssl.la
445 %{_includedir}/gnutls/openssl.h
446
447 %if %{with static_libs}
448 %files openssl-static
449 %defattr(644,root,root,755)
450 %{_libdir}/libgnutls-openssl.a
451 %endif
452 %endif
453
454 %if %{with guile}
455 %files -n guile-gnutls
456 %defattr(644,root,root,755)
457 %attr(755,root,root) %{_libdir}/guile/3.*/extensions/guile-gnutls-v-2.so*
458 %{_libdir}/guile/3.*/site-ccache/gnutls.go
459 %{_libdir}/guile/3.*/site-ccache/gnutls
460 %{_datadir}/guile/site/3.*/gnutls.scm
461 %{_datadir}/guile/site/3.*/gnutls
462 %if %{with doc}
463 %{_infodir}/gnutls-guile.info*
464 %endif
465 %endif
This page took 0.070028 seconds and 3 git commands to generate.