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