diff network/openssl/openssl.sh @ 22:a0391540d20b

network/openssl: initial import, closes #1106
author David Demelier <markand@malikania.fr>
date Sun, 24 Feb 2019 10:38:20 +0100
parents
children c3705b1f0f32
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/network/openssl/openssl.sh	Sun Feb 24 10:38:20 2019 +0100
@@ -0,0 +1,53 @@
+#!/bin/sh
+#
+# Copyright (c) 2019 David Demelier <markand@malikania.fr>
+#
+# Permission to use, copy, modify, and/or distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+
+source ./openssl.info
+
+case $(uname -m) in
+x86_64)
+	CFLAGS="-O2 -fPIC"
+	TRIPLET="linux-x86_64"
+	;;
+arm*)
+	CFLAGS="-O2"
+	TRIPLET="linux-armv4"
+	;;
+aarch*)
+	CFLAGS="-O2"
+	TRIPLET="linux-aarch64"
+	;;
+esac
+
+set -e
+
+rm -rf $PKGNAME-$PKGVERSION
+tar xvaf $PKGNAME-$PKGVERSION.tar.gz
+pushd $PKGNAME-$PKGVERSION
+
+patch -p0 < ../ca-directory.patch
+./Configure \
+	--prefix=/usr \
+	--openssldir=/etc/ssl \
+	--libdir=lib \
+	shared linux-x86_64
+	CFLAGS="$CFLAGS"
+make depend
+make
+make install DESTDIR=$DESTDIR
+
+popd
+rm -rf $PKGNAME-$PKGVERSION