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