aboutsummaryrefslogtreecommitdiff
path: root/muslbuild/libevent
diff options
context:
space:
mode:
authorMitchell Riedstra <mitch@riedstra.dev>2021-09-26 10:48:02 -0400
committerMitchell Riedstra <mitch@riedstra.dev>2021-09-26 10:48:02 -0400
commit06fd4a903b11d06c66c51207883b0b8f1d4f2fb7 (patch)
tree1d20efad6386edf655b4afaa3d98cdc2ef451092 /muslbuild/libevent
parent03976ecac8e5b062936f692f45768da512d89421 (diff)
downloaddotfiles-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/libevent')
-rwxr-xr-xmuslbuild/libevent33
1 files changed, 33 insertions, 0 deletions
diff --git a/muslbuild/libevent b/muslbuild/libevent
new file mode 100755
index 0000000..ccd24ec
--- /dev/null
+++ b/muslbuild/libevent
@@ -0,0 +1,33 @@
+#!/bin/sh
+set -e
+set -x
+relver="2.1.12"
+build_dir="/v/muslbuild/libevent"
+
+export CC="musl-gcc"
+PREFIX="$HOME/musl"
+
+if ! [ -d "$build_dir" ] ; then
+ mkdir -p "$build_dir"
+fi
+cd "$build_dir"
+
+arLoc="https://github.com/libevent/libevent/releases/download/release-%s-stable/libevent-%s-stable.tar.gz"
+arLoc="$(printf "$arLoc\n" "$relver" "$relver")"
+arFn="libevent-${relver}-stable.tar.gz"
+
+checksum=92e6de1be9ec176428fd2367677e61ceffc2ee1cb119035037a27d346b0403bb
+
+if ! [ -e "$arFn" ] ; then
+ curl -L -o "$arFn" "$arLoc"
+fi
+
+echo "${checksum} libevent-${relver}-stable.tar.gz" | sha256sum -c
+
+tar xzvf "$arFn"
+cd "libevent-${relver}-stable"
+./configure --prefix="$PREFIX" --host=x86_64 \
+ --disable-doxygen-doc --enable-static=yes --enable-shared=no \
+ --disable-openssl
+make
+make install -j1