3 %bcond_without static_libs # static library
4 # these functionalities require kernel patches to work (check defines in <linux/if_alg.h>)
5 %bcond_with kernel_asym # ALG_OP_SIGN/ALG_OP_VERIFY interfaces
6 %bcond_with kernel_kpp # ALG_OP_KEYGEN/ALG_OP_SSGEN interfaces
8 Summary: Linux Kernel Crypto API User Space Interface Library
9 Summary(pl.UTF-8): Biblioteka interfejsu przestrzeni użytownika do API kryptograficznego jądra Linuksa
13 License: BSD or GPL v2
15 #Source0Download: https://www.chronox.de/libkcapi.html
16 Source0: https://www.chronox.de/libkcapi/%{name}-%{version}.tar.xz
17 # Source0-md5: f441943c07b7876ee057fb6de9efd674
18 Patch0: %{name}-32bit.patch
19 URL: https://www.chronox.de/libkcapi.html
20 BuildRequires: autoconf >= 2.50
21 BuildRequires: automake
22 BuildRequires: libtool >= 2:2
23 BuildRequires: tar >= 1:1.22
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 libkcapi allows user-space to access the Linux kernel crypto API.
31 libkcapi uses this Netlink interface and exports easy to use APIs so
32 that a developer does not need to consider the low-level Netlink
35 The library does not implement any cipher algorithms. All consumer
36 requests are sent to the kernel for processing. Results from the
37 kernel crypto API are returned to the consumer via the library API.
39 The kernel interface and therefore this library can be used by
40 unprivileged processes.
42 %description -l pl.UTF-8
43 libkcapi pozwala na dostęp z przestrzeni użytkownika do API
44 kryptograficznego jądra Linuksa.
46 libkcapi wykorzystuje ten interfejs Netlink i eksportuje łatwe w
47 użyciu API, dzięki czemu programista nie musi obsługiwać
48 niskopoziomowego interfejsu Netlink.
50 Biblioteka nie implementuje żadnych algorytmów szyfrów. Wszystkie
51 żądania konsumenckie są wysyłane do przetworzenia przez jądro.
52 Wyniki z API kryptograficznego jądra są zwracane do konsumenta
53 poprzez API biblioteki.
55 Interfejs jądra, a więc także ta biblioteka, może być używana przez
56 procesy nieuprzywilejowane.
59 Summary: Header files for libkcapi library
60 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libkcapi
61 Group: Development/Libraries
62 Requires: %{name} = %{version}-%{release}
65 Header files for libkcapi library.
67 %description devel -l pl.UTF-8
68 Pliki nagłówkowe biblioteki libkcapi.
71 Summary: Static libkcapi library
72 Summary(pl.UTF-8): Statyczna biblioteka libkcapi
73 Group: Development/Libraries
74 Requires: %{name}-devel = %{version}-%{release}
77 Static libkcapi library.
79 %description static -l pl.UTF-8
80 Statyczna biblioteka libkcapi.
92 --enable-kcapi-dgstapp \
93 --enable-kcapi-encapp \
94 --enable-kcapi-rngapp \
95 %{?with_kernel_asym:--enable-lib-asym} \
96 %{?with_kernel_kpp:--enable-lib-kpp} \
97 %{!?with_static_libs:--disable-static}
101 rm -rf $RPM_BUILD_ROOT
104 DESTDIR=$RPM_BUILD_ROOT
106 # obsoleted by pkg-config
107 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libkcapi.la
110 rm -rf $RPM_BUILD_ROOT
112 %post -p /sbin/ldconfig
113 %postun -p /sbin/ldconfig
116 %defattr(644,root,root,755)
117 %doc CHANGES.md COPYING COPYING.bsd README.md TODO
118 %attr(755,root,root) %{_bindir}/kcapi-dgst
119 %attr(755,root,root) %{_bindir}/kcapi-enc
120 %attr(755,root,root) %{_bindir}/kcapi-rng
121 %attr(755,root,root) %{_libdir}/libkcapi.so.*.*.*
122 %attr(755,root,root) %ghost %{_libdir}/libkcapi.so.1
123 %{_mandir}/man1/kcapi-dgst.1*
124 %{_mandir}/man1/kcapi-enc.1*
125 %{_mandir}/man1/kcapi-rng.1*
128 %defattr(644,root,root,755)
129 %attr(755,root,root) %{_libdir}/libkcapi.so
130 %{_includedir}/kcapi.h
131 %{_pkgconfigdir}/libkcapi.pc
132 %{_mandir}/man3/kcapi_*.3*
134 %if %{with static_libs}
136 %defattr(644,root,root,755)
137 %{_libdir}/libkcapi.a