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