]> git.pld-linux.org Git - packages/gnutls.git/blob - gnutls.spec
ddefca3388916bbad6d90c4630aaf20a667b2844
[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:        3
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:       gmp-devel
105 Requires:       libidn2-devel
106 Requires:       libtasn1-devel >= 4.11
107 Requires:       libunistring-devel
108 Requires:       nettle-devel >= 3.6
109 #Requires:      opencdk-devel >= 0.6.6
110 Requires:       p11-kit-devel >= 0.23.1
111 %{?with_tpm2:Requires:  tpm2-tss-devel}
112 %{?with_tpm:Requires:   trousers-devel >= 0.3.11}
113 Requires:       zlib-devel
114
115 %description devel
116 Header files etc to develop gnutls applications.
117
118 %description devel -l pl.UTF-8
119 Pliki nagłówkowe i inne do gnutls.
120
121 %package static
122 Summary:        Static gnutls library
123 Summary(pl.UTF-8):      Biblioteka statyczna gnutls
124 License:        LGPL v2.1+ (libgnutls), GPL v3+ (openssl library)
125 Group:          Development/Libraries
126 Requires:       %{name}-devel = %{version}-%{release}
127
128 %description static
129 Static gnutls library.
130
131 %description static -l pl.UTF-8
132 Biblioteka statyczna gnutls.
133
134 %package c++
135 Summary:        libgnutlsxx - C++ interface to gnutls library
136 Summary(pl.UTF-8):      libgnutlsxx - interfejs C++ do biblioteki gnutls
137 License:        LGPL v2.1+
138 Group:          Libraries
139 Requires:       %{name}-libs = %{version}-%{release}
140
141 %description c++
142 libgnutlsxx - C++ interface to gnutls library.
143
144 %description c++ -l pl.UTF-8
145 libgnutlsxx - interfejs C++ do biblioteki gnutls.
146
147 %package c++-devel
148 Summary:        Header files for libgnutlsxx, a C++ interface to gnutls library
149 Summary(pl.UTF-8):      Pliki nagłówkowe libgnutlsxx - interfejsu C++ do biblioteki gnutls
150 License:        LGPL v2.1+
151 Group:          Development/Libraries
152 Requires:       %{name}-c++ = %{version}-%{release}
153 Requires:       %{name}-devel = %{version}-%{release}
154 Requires:       libstdc++-devel
155
156 %description c++-devel
157 Header files for libgnutlsxx, a C++ interface to gnutls library.
158
159 %description c++-devel -l pl.UTF-8
160 Pliki nagłówkowe libgnutlsxx - interfejsu C++ do biblioteki gnutls.
161
162 %package c++-static
163 Summary:        Static version of libgnutlsxx, a C++ interface to gnutls library
164 Summary(pl.UTF-8):      Statyczna wersja libgnutlsxx - interfejsu C++ do biblioteki gnutls
165 License:        LGPL v2.1+
166 Group:          Development/Libraries
167 Requires:       %{name}-c++-devel = %{version}-%{release}
168
169 %description c++-static
170 Static version of libgnutlsxx, a C++ interface to gnutls library.
171
172 %description c++-static -l pl.UTF-8
173 Statyczna wersja libgnutlsxx - interfejsu C++ do biblioteki gnutls.
174
175 %package dane
176 Summary:        DANE security library
177 Summary(pl.UTF-8):      Biblioteka bezpieczeństwa DANE
178 Group:          Libraries
179 Requires:       %{name}-libs = %{version}-%{release}
180
181 %description dane
182 DANE security library.
183
184 %description dane -l pl.UTF-8
185 Biblioteka bezpieczeństwa DANE.
186
187 %package dane-devel
188 Summary:        Header file for DANE security library
189 Summary(pl.UTF-8):      Plik nagłówkowy biblioteki bezpieczeństwa DANE
190 Group:          Development/Libraries
191 Requires:       %{name}-dane = %{version}-%{release}
192 Requires:       %{name}-devel = %{version}-%{release}
193 Requires:       unbound-devel
194
195 %description dane-devel
196 Header file for DANE security library.
197
198 %description dane-devel -l pl.UTF-8
199 Plik nagłówkowy biblioteki bezpieczeństwa DANE.
200
201 %package dane-static
202 Summary:        Static DANE security library
203 Summary(pl.UTF-8):      Statyczna biblioteka bezpieczeństwa DANE
204 Group:          Development/Libraries
205 Requires:       %{name}-dane-devel = %{version}-%{release}
206
207 %description dane-static
208 Static DANE security library.
209
210 %description dane-static -l pl.UTF-8
211 Statyczna biblioteka bezpieczeństwa DANE.
212
213 %package openssl
214 Summary:        OpenSSL compatibility library for GnuTLS
215 Summary(pl.UTF-8):      Biblioteka zgodności z OpenSSL dla GnuTLS
216 Group:          Libraries
217 Requires:       %{name}-libs = %{version}-%{release}
218
219 %description openssl
220 OpenSSL compatibility library for GnuTLS.
221
222 %description openssl -l pl.UTF-8
223 Biblioteka zgodności z OpenSSL dla GnuTLS.
224
225 %package openssl-devel
226 Summary:        Header file for gnutls-openssl library
227 Summary(pl.UTF-8):      Plik nagłówkowy biblioteki gnutls-openssl
228 Group:          Development/Libraries
229 Requires:       %{name}-devel = %{version}-%{release}
230 Requires:       %{name}-openssl = %{version}-%{release}
231
232 %description openssl-devel
233 Header file for gnutls-openssl library.
234
235 %description openssl-devel -l pl.UTF-8
236 Plik nagłówkowy biblioteki gnutls-openssl.
237
238 %package openssl-static
239 Summary:        Static gnutls-openssl library
240 Summary(pl.UTF-8):      Statyczna biblioteka gnutls-openssl
241 Group:          Development/Libraries
242 Requires:       %{name}-openssl-devel = %{version}-%{release}
243
244 %description openssl-static
245 Static gnutls-openssl library.
246
247 %description openssl-static -l pl.UTF-8
248 Statyczna biblioteka gnutls-openssl.
249
250 %package -n guile-gnutls
251 Summary:        Guile bindings for GnuTLS
252 Summary(pl.UTF-8):      Wiązania Guile do GnuTLS
253 License:        LGPL v2.1+
254 Group:          Development/Languages
255 Requires:       %{name}-libs = %{version}-%{release}
256 Requires:       guile >= 5:2.2.0
257
258 %description -n guile-gnutls
259 Guile bindings for GnuTLS.
260
261 %description -n guile-gnutls -l pl.UTF-8
262 Wiązania Guile do GnuTLS.
263
264 %prep
265 %setup -q
266 %patch0 -p1
267 %patch1 -p1
268 %patch2 -p1
269 %patch3 -p1
270
271 %{__rm} po/stamp-po
272
273 %build
274 %{__libtoolize}
275 %{__aclocal} -I m4 -I src/gl/m4 -I lib/unistring/m4
276 %{__autoconf}
277 %{__autoheader}
278 %{__automake}
279 %configure \
280         %{?with_af_alg:--enable-afalg} \
281         %{!?with_doc:--disable-doc} \
282         %{!?with_guile:--disable-guile} \
283         %{__enable_disable ktls} \
284         %{?with_openssl:--enable-openssl-compatibility} \
285         --disable-silent-rules \
286         %{?with_static_libs:--enable-static} \
287         --with-default-trust-store-file=/etc/certs/ca-certificates.crt \
288         %{!?with_tpm:--without-tpm} \
289         %{__with_without tpm2} \
290         --with-trousers-lib=%{_libdir}/libtspi.so.1
291
292 %{__make}
293
294 %install
295 rm -rf $RPM_BUILD_ROOT
296
297 %{__make} install \
298         DESTDIR=$RPM_BUILD_ROOT
299
300 # although libgnutls.la is obsoleted by pkg-config, there is
301 # .pc file missing for libgnutls-openssl, and it needs libgnutls.la
302
303 %if %{with guile}
304 # guile module - dynamic only
305 %{__rm} $RPM_BUILD_ROOT%{_libdir}/guile/3.*/extensions/guile-gnutls-*.la
306 %if %{with static_libs}
307 %{__rm} $RPM_BUILD_ROOT%{_libdir}/guile/3.*/extensions/guile-gnutls-*.a
308 %endif
309 %endif
310
311 # images for (not installed) htmlized infos - already packaged with infos
312 %if %{with doc}
313 %{__rm} $RPM_BUILD_ROOT%{_docdir}/gnutls/*.png
314 %endif
315
316 %{__rm} -f $RPM_BUILD_ROOT%{_infodir}/dir
317
318 %find_lang %{name}
319
320 %clean
321 rm -rf $RPM_BUILD_ROOT
322
323 %post
324 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir %{_infodir} >/dev/null 2>&1
325
326 %postun
327 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir %{_infodir} >/dev/null 2>&1
328
329 %post   libs -p /sbin/ldconfig
330 %postun libs -p /sbin/ldconfig
331
332 %post   c++ -p /sbin/ldconfig
333 %postun c++ -p /sbin/ldconfig
334
335 %post   dane -p /sbin/ldconfig
336 %postun dane -p /sbin/ldconfig
337
338 %post   openssl -p /sbin/ldconfig
339 %postun openssl -p /sbin/ldconfig
340
341 %post   -n guile-gnutls -p /sbin/ldconfig
342 %postun -n guile-gnutls -p /sbin/ldconfig
343
344 %files -f %{name}.lang
345 %defattr(644,root,root,755)
346 %doc AUTHORS ChangeLog NEWS README.md THANKS
347 %attr(755,root,root) %{_bindir}/certtool
348 %attr(755,root,root) %{_bindir}/gnutls-*
349 %attr(755,root,root) %{_bindir}/ocsptool
350 %attr(755,root,root) %{_bindir}/p11tool
351 %attr(755,root,root) %{_bindir}/psktool
352 %attr(755,root,root) %{_bindir}/srptool
353 %{?with_tpm:%attr(755,root,root) %{_bindir}/tpmtool}
354 %if %{with doc}
355 %{_mandir}/man1/certtool.1*
356 %{_mandir}/man1/gnutls-*.1*
357 %{_mandir}/man1/ocsptool.1*
358 %{_mandir}/man1/p11tool.1*
359 %{_mandir}/man1/psktool.1*
360 %{_mandir}/man1/srptool.1*
361 %{_mandir}/man1/tpmtool.1*
362 %{_infodir}/gnutls.info*
363 %{_infodir}/gnutls-*.png
364 %{_infodir}/pkcs11-vision.png
365 %endif
366
367 %files libs
368 %defattr(644,root,root,755)
369 %attr(755,root,root) %{_libdir}/libgnutls.so.*.*.*
370 %attr(755,root,root) %ghost %{_libdir}/libgnutls.so.30
371
372 %files devel
373 %defattr(644,root,root,755)
374 %attr(755,root,root) %{_libdir}/libgnutls.so
375 %{_libdir}/libgnutls.la
376 %{_includedir}/gnutls
377 %{?with_dane:%exclude %{_includedir}/gnutls/dane.h}
378 %exclude %{_includedir}/gnutls/gnutlsxx.h
379 %{?with_openssl:%exclude %{_includedir}/gnutls/openssl.h}
380 %{_pkgconfigdir}/gnutls.pc
381 %{?with_doc:%{_mandir}/man3/gnutls_*.3*}
382
383 %if %{with static_libs}
384 %files static
385 %defattr(644,root,root,755)
386 %{_libdir}/libgnutls.a
387 %endif
388
389 %files c++
390 %defattr(644,root,root,755)
391 %attr(755,root,root) %{_libdir}/libgnutlsxx.so.*.*.*
392 %attr(755,root,root) %ghost %{_libdir}/libgnutlsxx.so.28
393
394 %files c++-devel
395 %defattr(644,root,root,755)
396 %attr(755,root,root) %{_libdir}/libgnutlsxx.so
397 %{_libdir}/libgnutlsxx.la
398 %{_includedir}/gnutls/gnutlsxx.h
399
400 %if %{with static_libs}
401 %files c++-static
402 %defattr(644,root,root,755)
403 %{_libdir}/libgnutlsxx.a
404 %endif
405
406 %if %{with dane}
407 %files dane
408 %defattr(644,root,root,755)
409 %attr(755,root,root) %{_bindir}/danetool
410 %attr(755,root,root) %{_libdir}/libgnutls-dane.so.*.*.*
411 %attr(755,root,root) %ghost %{_libdir}/libgnutls-dane.so.0
412 %{?with_doc:%{_mandir}/man1/danetool.1*}
413
414 %files dane-devel
415 %defattr(644,root,root,755)
416 %attr(755,root,root) %{_libdir}/libgnutls-dane.so
417 %{_libdir}/libgnutls-dane.la
418 %{_includedir}/gnutls/dane.h
419 %{_pkgconfigdir}/gnutls-dane.pc
420 %if %{with doc}
421 %{_mandir}/man3/dane_*.3*
422 %endif
423
424 %if %{with static_libs}
425 %files dane-static
426 %defattr(644,root,root,755)
427 %{_libdir}/libgnutls-dane.a
428 %endif
429 %endif
430
431 %if %{with openssl}
432 %files openssl
433 %defattr(644,root,root,755)
434 %attr(755,root,root) %{_libdir}/libgnutls-openssl.so.*.*.*
435 %attr(755,root,root) %ghost %{_libdir}/libgnutls-openssl.so.27
436
437 %files openssl-devel
438 %defattr(644,root,root,755)
439 %attr(755,root,root) %{_libdir}/libgnutls-openssl.so
440 %{_libdir}/libgnutls-openssl.la
441 %{_includedir}/gnutls/openssl.h
442
443 %if %{with static_libs}
444 %files openssl-static
445 %defattr(644,root,root,755)
446 %{_libdir}/libgnutls-openssl.a
447 %endif
448 %endif
449
450 %if %{with guile}
451 %files -n guile-gnutls
452 %defattr(644,root,root,755)
453 %attr(755,root,root) %{_libdir}/guile/3.*/extensions/guile-gnutls-v-2.so*
454 %{_libdir}/guile/3.*/site-ccache/gnutls.go
455 %{_libdir}/guile/3.*/site-ccache/gnutls
456 %{_datadir}/guile/site/3.*/gnutls.scm
457 %{_datadir}/guile/site/3.*/gnutls
458 %if %{with doc}
459 %{_infodir}/gnutls-guile.info*
460 %endif
461 %endif
This page took 0.080676 seconds and 2 git commands to generate.