]> git.pld-linux.org Git - packages/libkcapi.git/blob - libkcapi.spec
180ed809411308470d618264ef3d40945d9b730d
[packages/libkcapi.git] / libkcapi.spec
1 #
2 # Conditional build:
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
7 #
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
10 Name:           libkcapi
11 Version:        1.4.0
12 Release:        1
13 License:        BSD or GPL v2
14 Group:          Libraries
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
23 BuildRequires:  xmlto
24 BuildRequires:  xz
25 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27 %description
28 libkcapi allows user-space to access the Linux kernel crypto API.
29
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
32 interface handling.
33
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.
37
38 The kernel interface and therefore this library can be used by
39 unprivileged processes.
40
41 %description -l pl.UTF-8
42 libkcapi pozwala na dostęp z przestrzeni użytkownika do API
43 kryptograficznego jądra Linuksa.
44
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.
48
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.
53
54 Interfejs jądra, a więc także ta biblioteka, może być używana przez
55 procesy nieuprzywilejowane.
56
57 %package devel
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}
62
63 %description devel
64 Header files for libkcapi library.
65
66 %description devel -l pl.UTF-8
67 Pliki nagłówkowe biblioteki libkcapi.
68
69 %package static
70 Summary:        Static libkcapi library
71 Summary(pl.UTF-8):      Statyczna biblioteka libkcapi
72 Group:          Development/Libraries
73 Requires:       %{name}-devel = %{version}-%{release}
74
75 %description static
76 Static libkcapi library.
77
78 %description static -l pl.UTF-8
79 Statyczna biblioteka libkcapi.
80
81 %prep
82 %setup -q
83
84 %build
85 %{__libtoolize}
86 %{__aclocal} -I m4
87 %{__autoconf}
88 %{__automake}
89 %configure \
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}
96 %{__make}
97
98 %install
99 rm -rf $RPM_BUILD_ROOT
100
101 %{__make} install \
102         DESTDIR=$RPM_BUILD_ROOT
103
104 # obsoleted by pkg-config
105 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libkcapi.la
106
107 %clean
108 rm -rf $RPM_BUILD_ROOT
109
110 %post   -p /sbin/ldconfig
111 %postun -p /sbin/ldconfig
112
113 %files
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*
124
125 %files devel
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*
131
132 %if %{with static_libs}
133 %files static
134 %defattr(644,root,root,755)
135 %{_libdir}/libkcapi.a
136 %endif
This page took 0.037069 seconds and 2 git commands to generate.