[Buildroot] [PATCH v3] package/softhsm2: new package
José Pekkarinen
jose.pekkarinen at unikie.com
Mon Oct 25 08:19:55 UTC 2021
The patch adds a package for softhsm2.
Signed-off-by: José Pekkarinen <jose.pekkarinen at unikie.com>
---
[ v1 -> v2 ]
- Added hash file and license information
- Moved recipe to use tarball
- Provided support to build against different ssl libraries
- Fixed toolchain dependencies and ssl select
- Referenced the package in package/Config.in
- Added myself as developer
[ v2 -> v3 ]
- Fix indentation in Config.in and hash file
- Removed choice in Config.in
- Added dependencies to toolchain comment
- Removed autoreconf flag in recipe
DEVELOPERS | 3 +++
package/Config.in | 1 +
package/softhsm2/Config.in | 18 ++++++++++++++++++
package/softhsm2/softhsm2.hash | 4 ++++
package/softhsm2/softhsm2.mk | 15 +++++++++++++++
5 files changed, 41 insertions(+)
create mode 100644 package/softhsm2/Config.in
create mode 100644 package/softhsm2/softhsm2.hash
create mode 100644 package/softhsm2/softhsm2.mk
diff --git a/DEVELOPERS b/DEVELOPERS
index f6c39516b5..83d20d56cc 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -2927,3 +2927,6 @@ F: package/qjson/
F: package/quazip/
F: package/shapelib/
F: package/tinc/
+
+N: José Pekkarinen <jose.pekkarinen at unikie.com>
+F: package/softhsm2/
diff --git a/package/Config.in b/package/Config.in
index 7971726875..4f9cd38a97 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -2019,6 +2019,7 @@ menu "Security"
source "package/libsemanage/Config.in"
source "package/libsepol/Config.in"
source "package/safeclib/Config.in"
+ source "package/softhsm2/Config.in"
endmenu
menu "Text and terminal handling"
diff --git a/package/softhsm2/Config.in b/package/softhsm2/Config.in
new file mode 100644
index 0000000000..5d84997c07
--- /dev/null
+++ b/package/softhsm2/Config.in
@@ -0,0 +1,18 @@
+config BR2_PACKAGE_SOFTHSM2
+ bool "softhsm2"
+ depends on BR2_INSTALL_LIBSTDCPP
+ depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11
+ depends on !BR2_STATIC_LIBS # dlopen()
+ select BR2_PACKAGE_OPENSSL
+ select BR2_PACKAGE_OPENSSL_FORCE_LIBOPENSSL
+ help
+ SoftHSM is an implementation of a cryptographic store
+ accessible through a PKCS#11 interface. You can use it
+ to explore PKCS#11 without having a Hardware Security
+ Module.
+
+ https://www.opendnssec.org/softhsm
+
+comment "sofhsm2 needs a toolchain w/ C++, gcc >= 4.8 and dynamic library support"
+ depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS || \
+ !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
diff --git a/package/softhsm2/softhsm2.hash b/package/softhsm2/softhsm2.hash
new file mode 100644
index 0000000000..f59f0bf028
--- /dev/null
+++ b/package/softhsm2/softhsm2.hash
@@ -0,0 +1,4 @@
+# From https://www.opendnssec.org/2020/04/1602/
+sha256 61249473054bcd1811519ef9a989a880a7bdcc36d317c9c25457fc614df475f2 softhsm-2.6.1.tar.gz
+# Locally computed
+sha256 230cab7102816e99f7ce03ef476352fcad09d742fcbc6580d44393db6280b64c LICENSE
diff --git a/package/softhsm2/softhsm2.mk b/package/softhsm2/softhsm2.mk
new file mode 100644
index 0000000000..c418e3648e
--- /dev/null
+++ b/package/softhsm2/softhsm2.mk
@@ -0,0 +1,15 @@
+################################################################################
+#
+# softhsm2
+#
+################################################################################
+
+SOFTHSM2_VERSION = 2.6.1
+SOFTHSM2_SOURCE = softhsm-$(SOFTHSM2_VERSION).tar.gz
+SOFTHSM2_SITE = https://dist.opendnssec.org/source
+SOFTHSM2_LICENSE = BSD-2-Clause
+SOFTHSM2_LICENSE_FILES = LICENSE
+SOFTHSM2_DEPENDENCIES = openssl
+SOFTHSM2_INSTALL_STAGING = YES
+
+$(eval $(autotools-package))
--
2.25.1
More information about the buildroot
mailing list