From: Michael Grzeschik <m.grzeschik@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH] libkcapi: add new rule
Date: Fri, 23 Nov 2018 18:12:26 +0100 [thread overview]
Message-ID: <20181123171226.8025-1-m.grzeschik@pengutronix.de> (raw)
Add the libkcapi package and include options to enable tests and install
AF_ALG based hashing functins.
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
---
rules/libkcapi.in | 58 +++++++++++++++++++++
rules/libkcapi.make | 121 ++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 179 insertions(+)
create mode 100644 rules/libkcapi.in
create mode 100644 rules/libkcapi.make
diff --git a/rules/libkcapi.in b/rules/libkcapi.in
new file mode 100644
index 000000000..c7474d61e
--- /dev/null
+++ b/rules/libkcapi.in
@@ -0,0 +1,58 @@
+## SECTION=project_specific
+
+menuconfig LIBKCAPI
+ tristate
+ prompt "libkcapi"
+ help
+ The Linux kernel exports a Netlink interface of type AF_ALG to
+ allow user space to utilize the kernel crypto API.
+
+if LIBKCAPI
+
+config LIBKCAPI_MD5SUM
+ bool
+ depends on !COREUTILS_MD5SUM
+ depends on !BUSYBOX_MD5SUM
+ prompt "md5sum"
+ help
+ support md5sum cmdline util
+
+config LIBKCAPI_SHA1SUM
+ bool
+ depends on !COREUTILS_SHA1SUM
+ depends on !BUSYBOX_SHA1SUM
+ prompt "sha1sum"
+ help
+ support sha1sum cmdline util
+
+config LIBKCAPI_SHA256SUM
+ bool
+ depends on !COREUTILS_SHA256SUM
+ depends on !BUSYBOX_SHA256SUM
+ prompt "sha256sum"
+ help
+ support sha256sum cmdline util
+
+config LIBKCAPI_SHA384SUM
+ bool
+ depends on !COREUTILS_SHA384SUM
+ prompt "sha384sum"
+ help
+ support sha384sum cmdline util
+
+config LIBKCAPI_SHA512SUM
+ bool
+ depends on !COREUTILS_SHA512SUM
+ depends on !BUSYBOX_SHA512SUM
+ prompt "sha512sum"
+ help
+ support sha512sum cmdline util
+
+config LIBKCAPI_TEST
+ bool
+ depends on OPENSSL_BIN
+ prompt "test"
+ help
+ support kcapi tests
+
+endif
diff --git a/rules/libkcapi.make b/rules/libkcapi.make
new file mode 100644
index 000000000..d8a8b88d4
--- /dev/null
+++ b/rules/libkcapi.make
@@ -0,0 +1,121 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2018 by Michael Grzeschik <mgr@pengutronix.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_LIBKCAPI) += libkcapi
+
+#
+# Paths and names
+#
+LIBKCAPI_VERSION := 1.1.3
+LIBKCAPI_MD5 := 480b78de9fe7f3f64ca7622396499e5f
+LIBKCAPI := libkcapi-$(LIBKCAPI_VERSION)
+LIBKCAPI_SUFFIX := tar.xz
+LIBKCAPI_URL := http://www.chronox.de/libkcapi//$(LIBKCAPI).$(LIBKCAPI_SUFFIX)
+LIBKCAPI_SOURCE := $(SRCDIR)/$(LIBKCAPI).$(LIBKCAPI_SUFFIX)
+LIBKCAPI_DIR := $(BUILDDIR)/$(LIBKCAPI)
+LIBKCAPI_LICENSE := GPLv2+
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+LIBKCAPI_CONF_ENV := \
+ $(CROSS_ENV) \
+ ac_cv_path_XMLTO=
+
+#
+# autoconf
+#
+LIBKCAPI_CONF_TOOL := autoconf
+LIBKCAPI_CONF_OPT := \
+ $(CROSS_AUTOCONF_USR) \
+ --enable-kcapi-hasher \
+ --enable-kcapi-rngapp \
+ --enable-kcapi-speed \
+ --$(call ptx/endis, PTXCONF_LIBKCAPI_TEST)-kcapi-test \
+ --enable-kcapi-encapp \
+ --enable-kcapi-dgstapp \
+ --disable-lib-asym \
+ --disable-lib-kpp
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/libkcapi.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, libkcapi)
+ @$(call install_fixup, libkcapi,PRIORITY,optional)
+ @$(call install_fixup, libkcapi,SECTION,base)
+ @$(call install_fixup, libkcapi,AUTHOR,"Michael Grzeschik <mgr@pengutronix.de>")
+ @$(call install_fixup, libkcapi,DESCRIPTION,missing)
+
+ @$(call install_lib, libkcapi, 0, 0, 0644, libkcapi);
+
+ @$(call install_copy, libkcapi, 0, 0, 0755, -, /usr/bin/kcapi-rng);
+ @$(call install_copy, libkcapi, 0, 0, 0755, -, /usr/bin/kcapi-speed);
+ @$(call install_copy, libkcapi, 0, 0, 0755, -, /usr/bin/kcapi-enc);
+ @$(call install_copy, libkcapi, 0, 0, 0755, -, /usr/bin/kcapi-dgst);
+
+ @$(call install_copy, libkcapi, 0, 0, 0755, $(LIBKCAPI_PKGDIR)/usr/bin/fipscheck, /usr/bin/kcapi-hasher);
+ @$(call install_link, libkcapi, /usr/bin/kcapi-hasher, /usr/bin/fipscheck);
+ @$(call install_link, libkcapi, /usr/bin/kcapi-hasher, /usr/bin/fipshmac);
+ @$(call install_link, libkcapi, /usr/bin/kcapi-hasher, /usr/bin/sha1hmac);
+ @$(call install_link, libkcapi, /usr/bin/kcapi-hasher, /usr/bin/sha224hmac);
+ @$(call install_link, libkcapi, /usr/bin/kcapi-hasher, /usr/bin/sha256hmac);
+ @$(call install_link, libkcapi, /usr/bin/kcapi-hasher, /usr/bin/sha384hmac);
+ @$(call install_link, libkcapi, /usr/bin/kcapi-hasher, /usr/bin/sha512hmac);
+
+#ifdef PTXCONF_LIBKCAPI_MD5SUM
+ @$(call install_link, libkcapi, /usr/bin/kcapi-hasher, /usr/bin/md5sum);
+#endif
+
+#ifdef PTXCONF_LIBKCAPI_SHA1SUM
+ @$(call install_link, libkcapi, /usr/bin/kcapi-hasher, /usr/bin/sha1sum);
+#endif
+
+#ifdef PTXCONF_LIBKCAPI_SHA256SUM
+ @$(call install_link, libkcapi, /usr/bin/kcapi-hasher, /usr/bin/sha256sum);
+#endif
+
+#ifdef PTXCONF_LIBKCAPI_SHA384SUM
+ @$(call install_link, libkcapi, /usr/bin/kcapi-hasher, /usr/bin/sha384sum);
+#endif
+
+#ifdef PTXCONF_LIBKCAPI_SHA512SUM
+ @$(call install_link, libkcapi, /usr/bin/kcapi-hasher, /usr/bin/sha512sum);
+#endif
+
+#ifdef PTXCONF_LIBKCAPI_TEST
+ @$(call install_copy, libkcapi, 0, 0, 0755, -, /usr/libexec/libkcapi/kcapi);
+ @$(call install_copy, libkcapi, 0, 0, 0755, -, /usr/libexec/libkcapi/kcapi-enc-test-large);
+ @$(call install_copy, libkcapi, 0, 0, 0755, -, /usr/libexec/libkcapi/kcapi-convenience);
+ @$(call install_copy, libkcapi, 0, 0, 0755, -, /usr/libexec/libkcapi/libtest.sh);
+ @$(call install_copy, libkcapi, 0, 0, 0755, -, /usr/libexec/libkcapi/test.sh);
+ @$(call install_copy, libkcapi, 0, 0, 0755, -, /usr/libexec/libkcapi/kcapi-enc-test.sh);
+ @$(call install_copy, libkcapi, 0, 0, 0755, -, /usr/libexec/libkcapi/kcapi-enc-test-large.sh);
+ @$(call install_copy, libkcapi, 0, 0, 0755, -, /usr/libexec/libkcapi/kcapi-dgst-test.sh);
+ @$(call install_copy, libkcapi, 0, 0, 0755, -, /usr/libexec/libkcapi/kcapi-convenience.sh);
+ @$(call install_copy, libkcapi, 0, 0, 0755, -, /usr/libexec/libkcapi/kcapi-fuzz-test.sh);
+ @$(call install_copy, libkcapi, 0, 0, 0755, -, /usr/libexec/libkcapi/hasher-test.sh);
+ @$(call install_copy, libkcapi, 0, 0, 0755, -, /usr/libexec/libkcapi/compile-test.sh);
+ @$(call install_copy, libkcapi, 0, 0, 0755, -, /usr/libexec/libkcapi/virttest.sh);
+ @$(call install_copy, libkcapi, 0, 0, 0755, -, /usr/libexec/libkcapi/test-invocation.sh);
+#endif
+
+ @$(call install_finish, libkcapi)
+
+ @$(call touch)
+
+# vim: syntax=make
--
2.19.1
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
next reply other threads:[~2018-11-23 17:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-23 17:12 Michael Grzeschik [this message]
2018-11-26 5:25 ` Michael Olbrich
2018-11-26 7:42 ` Michael Grzeschik
2018-11-26 12:43 ` [ptxdist] [PATCH v2] " Michael Grzeschik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181123171226.8025-1-m.grzeschik@pengutronix.de \
--to=m.grzeschik@pengutronix.de \
--cc=ptxdist@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox