From 06fd4a903b11d06c66c51207883b0b8f1d4f2fb7 Mon Sep 17 00:00:00 2001 From: Mitchell Riedstra Date: Sun, 26 Sep 2021 10:48:02 -0400 Subject: Add muslbuild, a small set of shell scripts to statically build a few things against musl libc --- muslbuild/oksh | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100755 muslbuild/oksh (limited to 'muslbuild/oksh') diff --git a/muslbuild/oksh b/muslbuild/oksh new file mode 100755 index 0000000..23213cf --- /dev/null +++ b/muslbuild/oksh @@ -0,0 +1,33 @@ +#!/bin/sh +set -e +set -x +relver="6.9" +build_dir="/v/muslbuild/oksh" + +export CC="musl-gcc -static" +PREFIX="$HOME/musl" + +if ! [ -d "$build_dir" ] ; then + mkdir -p "$build_dir" +fi +cd "$build_dir" + +arLoc="https://github.com/ibara/oksh/releases/download/oksh-%s/oksh-%s.tar.gz" +arLoc="$(printf "$arLoc\n" "$relver" "$relver")" +arFn="oksh-${relver}.tar.gz" + +checksum=c08d97b2ac9ee5d88e9e508d27c75502b2d06c20d4c5ab87b496cb3b9951bd35 + +if ! [ -e "$arFn" ] ; then + curl -L -o "$arFn" "$arLoc" +fi + +echo "${checksum} $arFn" | sha256sum -c + +tar xzvf "$arFn" +cd "oksh-${relver}" +./configure --prefix="$PREFIX" --bindir="$HOME/bin" --enable-ksh \ + --enable-static +make +make install -j$(nproc) + -- cgit v1.2.3