package/bearssl: new package
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Thu, 27 Feb 2020 16:30:42 +0000 (17:30 +0100)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sun, 8 Mar 2020 15:20:22 +0000 (16:20 +0100)
BearSSL is an implementation of the SSL/TLS protocol (RFC 5246) written
in C

https://bearssl.org

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
DEVELOPERS
package/Config.in
package/bearssl/Config.in [new file with mode: 0644]
package/bearssl/bearssl.hash [new file with mode: 0644]
package/bearssl/bearssl.mk [new file with mode: 0644]

index 8085cfb83dd021583e7f01f502cf50a4f48ddae0..e25e563ea3a8d6865df15e7d52d3ed72e7c9b2cb 100644 (file)
@@ -826,6 +826,7 @@ F:  package/libmaxminddb/
 F:     package/openzwave/
 
 N:     Fabrice Fontaine <fontaine.fabrice@gmail.com>
+F:     package/bearssl/
 F:     package/boinc/
 F:     package/cairo/
 F:     package/duktape/
index 5be5f3726b6dd9fe3841b5523123ffe6f92bebf9..3da42ba78fb7774bf08106c90f1f0d2416962a5a 100644 (file)
@@ -1279,6 +1279,7 @@ menu "Compression and decompression"
 endmenu
 
 menu "Crypto"
+       source "package/bearssl/Config.in"
        source "package/beecrypt/Config.in"
        source "package/botan/Config.in"
        source "package/ca-certificates/Config.in"
diff --git a/package/bearssl/Config.in b/package/bearssl/Config.in
new file mode 100644 (file)
index 0000000..b10ce60
--- /dev/null
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_BEARSSL
+       bool "bearssl"
+       help
+         BearSSL is an implementation of the SSL/TLS protocol
+         (RFC 5246) written in C.
+
+         https://bearssl.org
diff --git a/package/bearssl/bearssl.hash b/package/bearssl/bearssl.hash
new file mode 100644 (file)
index 0000000..e000762
--- /dev/null
@@ -0,0 +1,3 @@
+# Locally computed:
+sha256  6705bba1714961b41a728dfc5debbe348d2966c117649392f8c8139efc83ff14  bearssl-0.6.tar.gz
+sha256  771bf18c8633ea69ec9b07d2e604c4b99b7bef41b0f5ce6385d24df4448f61ca  LICENSE.txt
diff --git a/package/bearssl/bearssl.mk b/package/bearssl/bearssl.mk
new file mode 100644 (file)
index 0000000..549b000
--- /dev/null
@@ -0,0 +1,42 @@
+################################################################################
+#
+# bearssl
+#
+################################################################################
+
+BEARSSL_VERSION = 0.6
+BEARSSL_SITE = https://bearssl.org
+BEARSSL_LICENSE = MIT
+BEARSSL_LICENSE_FILES = LICENSE.txt
+BEARSSL_INSTALL_STAGING = YES
+
+BEARSSL_MAKE_OPTS = \
+       $(TARGET_CONFIGURE_OPTS) \
+       LDDLL=$(TARGET_CC)
+
+ifeq ($(BR2_SHARED_LIBS)$(BR2_SHARED_STATIC_LIBS),y)
+BEARSSL_TARGETS = dll
+endif
+
+ifeq ($(BR2_STATIC_LIBS)$(BR2_SHARED_STATIC_LIBS),y)
+BEARSSL_TARGETS = lib
+endif
+
+define BEARSSL_BUILD_CMDS
+       $(TARGET_MAKE_ENV) $(MAKE) $(BEARSSL_MAKE_OPTS) -C $(@D) \
+               $(BEARSSL_TARGETS)
+endef
+
+define BEARSSL_INSTALL_STAGING_CMDS
+       mkdir -p $(STAGING_DIR)/usr/include
+       cp -dpfr $(@D)/inc/*.h $(STAGING_DIR)/usr/include
+       mkdir -p $(STAGING_DIR)/usr/lib
+       cp -dpfr $(@D)/build/lib* $(STAGING_DIR)/usr/lib
+endef
+
+define BEARSSL_INSTALL_TARGET_CMDS
+       mkdir -p $(TARGET_DIR)/usr/lib
+       cp -dpfr $(@D)/build/lib* $(TARGET_DIR)/usr/lib
+endef
+
+$(eval $(generic-package))