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