package/bearssl: new package

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>
This commit is contained in:
Fabrice Fontaine 2020-02-27 17:30:42 +01:00 committed by Thomas Petazzoni
parent 4b5970a93f
commit 4ebb58a655
5 changed files with 54 additions and 0 deletions

View 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/

View 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"

View file

@ -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

View file

@ -0,0 +1,3 @@
# Locally computed:
sha256 6705bba1714961b41a728dfc5debbe348d2966c117649392f8c8139efc83ff14 bearssl-0.6.tar.gz
sha256 771bf18c8633ea69ec9b07d2e604c4b99b7bef41b0f5ce6385d24df4448f61ca LICENSE.txt

View file

@ -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))