Name: libkcapi Version: 0.12.0 Release: 1%{?dist} Summary: User space interface to the Linux Kernel Crypto API License: BSD or GPLv2 URL: http://www.chronox.de/libkcapi/html/index.html Source0: https://github.com/smuellerDD/libkcapi/archive/v%{version}.tar.gz#/libkcapi-%{version}.tar.gz # https://github.com/smuellerDD/libkcapi/pull/5 Patch01: 0001-build-sys-do-not-recreate-man-pages-when-installing.patch Patch02: 0002-build-sys-create-all-destination-directories-and-do-.patch Patch03: 0003-Add-.gitignore-files-for-all-build-products.patch Patch04: 0004-test.sh-print-.-kcapi-command-line-on-failure.patch BuildRequires: gcc BuildRequires: make # for documentation BuildRequires: libxslt BuildRequires: xmlto BuildRequires: perl %description libkcapi allows user-space to access the Linux kernel crypto API. This library uses the netlink interface and exports easy to use APIs so that a developer does not need to consider the low-level netlink interface handling. The library does not implement any cipher algorithms. All consumer requests are sent to the kernel for processing. Results from the kernel crypto API are returned to the consumer via the library API. The kernel interface and therefore this library can be used by unprivileged processes. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description devel Header files for applications that use %{name}. %prep %autosetup -p1 %build %global cflags -std=gnu99 %optflags -fwrapv -fvisibility=hidden %make_build -C lib all man LIBDIR=%_libdir CFLAGS='-fPIC %cflags' %make_build -C test CFLAGS='%cflags -I../lib' %make_build -C speed-test CFLAGS='%cflags -I../lib' %install %make_install -C lib install maninstall LIBDIR=%_libdir ln -s libkcapi.so.0 %{buildroot}%{_libdir}/libkcapi.so %check cd test # This part is temporary, I'm working on making the tests pass ./kcapi -s -d 2 -x 1 -e -c 'cbc(aes)' -k 8d7dd9b0170ce0b5f2f8e1aa768e01e91da8bfc67fd486d081b28254c99eb423 -i 7fbc02ebf5b93322329df9bfccb635af -p 48981da18e4bb9ef7e2e3162d16b1910 %ifarch aarch64 # the tests fail on arm64 ./test.sh || : %else %ifnarch i686 armv7hl # the tests hang on 32bit ./test.sh %endif %endif %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %license COPYING COPYING.gplv2 COPYING.bsd %doc README.md CHANGES TODO %{_libdir}/*.so.* %files devel %doc %{_mandir}/man3/kcapi_*.3* %{_includedir}/kcapi.h %{_libdir}/*.so %changelog * Sun Nov 20 2016 Zbigniew Jędrzejewski-Szmek - 0.12.0-1 - Add more patches and link to upstream pull request - Update %%description - Drop valgrind invocation, it wasn't helping - Skip tests on 32 bits - Add BSD license file for completeness * Sun Nov 20 2016 Zbigniew Jędrzejewski-Szmek - 0.12.0-1 - Initial packaging