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: ca877231a346dfeefb50fe4311d2df5d
18 URL: https://www.chronox.de/libkcapi.html
19 BuildRequires: autoconf >= 2.50
20 BuildRequires: automake
21 BuildRequires: libtool >= 2:2
22 BuildRequires: tar >= 1:1.22
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28 libkcapi allows user-space to access the Linux kernel crypto API.
30 libkcapi uses this Netlink interface and exports easy to use APIs so
31 that a developer does not need to consider the low-level Netlink
34 The library does not implement any cipher algorithms. All consumer
35 requests are sent to the kernel for processing. Results from the
36 kernel crypto API are returned to the consumer via the library API.
38 The kernel interface and therefore this library can be used by
39 unprivileged processes.
41 %description -l pl.UTF-8
42 libkcapi pozwala na dostęp z przestrzeni użytkownika do API
43 kryptograficznego jądra Linuksa.
45 libkcapi wykorzystuje ten interfejs Netlink i eksportuje łatwe w
46 użyciu API, dzięki czemu programista nie musi obsługiwać
47 niskopoziomowego interfejsu Netlink.
49 Biblioteka nie implementuje żadnych algorytmów szyfrów. Wszystkie
50 żądania konsumenckie są wysyłane do przetworzenia przez jądro.
51 Wyniki z API kryptograficznego jądra są zwracane do konsumenta
52 poprzez API biblioteki.
54 Interfejs jądra, a więc także ta biblioteka, może być używana przez
55 procesy nieuprzywilejowane.
58 Summary: Header files for libkcapi library
59 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libkcapi
60 Group: Development/Libraries
61 Requires: %{name} = %{version}-%{release}
64 Header files for libkcapi library.
66 %description devel -l pl.UTF-8
67 Pliki nagłówkowe biblioteki libkcapi.
70 Summary: Static libkcapi library
71 Summary(pl.UTF-8): Statyczna biblioteka libkcapi
72 Group: Development/Libraries
73 Requires: %{name}-devel = %{version}-%{release}
76 Static libkcapi library.
78 %description static -l pl.UTF-8
79 Statyczna biblioteka libkcapi.
90 --enable-kcapi-dgstapp \
91 --enable-kcapi-encapp \
92 --enable-kcapi-rngapp \
93 %{?with_kernel_asym:--enable-lib-asym} \
94 %{?with_kernel_kpp:--enable-lib-kpp} \
95 %{!?with_static_libs:--disable-static}
99 rm -rf $RPM_BUILD_ROOT
102 DESTDIR=$RPM_BUILD_ROOT
104 # obsoleted by pkg-config
105 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libkcapi.la
108 rm -rf $RPM_BUILD_ROOT
110 %post -p /sbin/ldconfig
111 %postun -p /sbin/ldconfig
114 %defattr(644,root,root,755)
115 %doc CHANGES.md COPYING COPYING.bsd README.md TODO
116 %attr(755,root,root) %{_bindir}/kcapi-dgst
117 %attr(755,root,root) %{_bindir}/kcapi-enc
118 %attr(755,root,root) %{_bindir}/kcapi-rng
119 %attr(755,root,root) %{_libdir}/libkcapi.so.*.*.*
120 %attr(755,root,root) %ghost %{_libdir}/libkcapi.so.1
121 %{_mandir}/man1/kcapi-dgst.1*
122 %{_mandir}/man1/kcapi-enc.1*
123 %{_mandir}/man1/kcapi-rng.1*
126 %defattr(644,root,root,755)
127 %attr(755,root,root) %{_libdir}/libkcapi.so
128 %{_includedir}/kcapi.h
129 %{_pkgconfigdir}/libkcapi.pc
130 %{_mandir}/man3/kcapi_*.3*
132 %if %{with static_libs}
134 %defattr(644,root,root,755)
135 %{_libdir}/libkcapi.a