From 2c0abfca2eadb13b3e3ad6780c3dba6b256e694a Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Mon, 22 Jan 2018 13:03:48 +0100 Subject: [PATCH] Add OpenSSL package Signed-off-by: David Oberhollenzer --- cfg/alix/OPENSSL | 1 + cfg/rpi3/OPENSSL | 1 + pkg/openssl/build | 41 +++++++++++++++++++++++++++++++++++++++++ pkg/openssl/depends | 1 + 4 files changed, 44 insertions(+) create mode 100644 cfg/alix/OPENSSL create mode 100644 cfg/rpi3/OPENSSL create mode 100755 pkg/openssl/build create mode 100644 pkg/openssl/depends diff --git a/cfg/alix/OPENSSL b/cfg/alix/OPENSSL new file mode 100644 index 0000000..9af9af3 --- /dev/null +++ b/cfg/alix/OPENSSL @@ -0,0 +1 @@ +OPENSSL_TARGET="linux-generic32 386" diff --git a/cfg/rpi3/OPENSSL b/cfg/rpi3/OPENSSL new file mode 100644 index 0000000..aae0c7d --- /dev/null +++ b/cfg/rpi3/OPENSSL @@ -0,0 +1 @@ +OPENSSL_TARGET="linux-generic32" diff --git a/pkg/openssl/build b/pkg/openssl/build new file mode 100755 index 0000000..8828696 --- /dev/null +++ b/pkg/openssl/build @@ -0,0 +1,41 @@ +VERSION="1.1.0g" +SRCDIR="openssl-${VERSION}" +TARBALL="${SRCDIR}.tar.gz" +URL="https://www.openssl.org/source" +SHA256SUM="de4d501267da39310905cb6dc8c6121f7a2cad45a7707f76df828fe1b85073af" + +source "$SCRIPTDIR/cfg/$CFG/OPENSSL" + +prepare() { + return +} + +build() { + local SOURCE="$1" + local BUILD="$2" + + $SOURCE/Configure --prefix=/ --cross-compile-prefix="${TARGET}-" \ + --openssldir=/etc/ssl --libdir=/lib \ + -DOPENSSL_NO_HEARTBEATS \ + threads shared zlib-dynamic no-async $OPENSSL_TARGET + + make -j 1 +} + +deploy() { + local SOURCE="$1" + local BUILD="$2" + local DEPLOY="$3" + local DEVDEPLOY="$4" + + make DESTDIR="$DEPLOY" install + + mv "$DEPLOY/include" "$DEVDEPLOY" + cp -r "$DEPLOY/lib" "$DEVDEPLOY" + + rm "$DEPLOY/bin/c_rehash" + rm -r "$DEPLOY/etc/ssl/misc" + rm -r "$DEPLOY/share" + rm -r "$DEPLOY/lib/pkgconfig" + rm ${DEPLOY}/lib/*.a +} diff --git a/pkg/openssl/depends b/pkg/openssl/depends new file mode 100644 index 0000000..f22003e --- /dev/null +++ b/pkg/openssl/depends @@ -0,0 +1 @@ +zlib