diff options
| author | Mitchell Riedstra <mitch@riedstra.dev> | 2021-09-26 10:48:02 -0400 |
|---|---|---|
| committer | Mitchell Riedstra <mitch@riedstra.dev> | 2021-09-26 10:48:02 -0400 |
| commit | 06fd4a903b11d06c66c51207883b0b8f1d4f2fb7 (patch) | |
| tree | 1d20efad6386edf655b4afaa3d98cdc2ef451092 /muslbuild/jq | |
| parent | 03976ecac8e5b062936f692f45768da512d89421 (diff) | |
| download | dotfiles-06fd4a903b11d06c66c51207883b0b8f1d4f2fb7.tar.gz dotfiles-06fd4a903b11d06c66c51207883b0b8f1d4f2fb7.tar.xz | |
Add muslbuild, a small set of shell scripts to statically build a few things against musl libc
Diffstat (limited to 'muslbuild/jq')
| -rwxr-xr-x | muslbuild/jq | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/muslbuild/jq b/muslbuild/jq new file mode 100755 index 0000000..b3873a2 --- /dev/null +++ b/muslbuild/jq @@ -0,0 +1,36 @@ +#!/bin/sh +set -e +set -x +relver="1.6" +build_dir="/v/muslbuild/jq" + +export CC="musl-gcc" +PREFIX="$HOME/musl" + +if ! [ -d "$build_dir" ] ; then + mkdir -p "$build_dir" +fi +cd "$build_dir" + +arLoc="https://github.com/stedolan/jq/releases/download/jq-%s/jq-%s.tar.gz" +arLoc="$(printf "$arLoc\n" "$relver" "$relver")" +arFn="jq-${relver}.tar.gz" + +checksum=5de8c8e29aaa3fb9cc6b47bb27299f271354ebb72514e3accadc7d38b5bbaa72 + +if ! [ -e "$arFn" ] ; then + curl -L -o "$arFn" "$arLoc" +fi + +echo "${checksum} $arFn" | sha256sum -c + +tar xzvf "$arFn" +cd "jq-${relver}" +./configure --prefix="$PREFIX" --bindir="$HOME/bin" --host=x86_64 \ + --build=x86_64-pc-linux-gnu \ + --enable-all-static --enable-static=yes --enable-shared=no --disable-docs \ + --with-oniguruma=builtin \ + --disable-maintainer-mode +make +make install -j$(nproc) + |
