musl_root/pkgs/build-all.sh

51 lines
804 B
Bash
Raw Permalink Normal View History

2018-11-10 00:42:27 +02:00
#!/bin/bash
set -e
TARGET="${1}"
if [ -z "${TARGET}" ]; then
echo "You must specify rootfs where packages should be unpacked"
2018-11-10 02:24:52 +02:00
exit 1
2018-11-10 00:42:27 +02:00
fi
TARGET="$(realpath "${TARGET}")"
2018-11-10 02:59:39 +02:00
source ./prepare-compiler-env.sh
2018-11-10 00:42:27 +02:00
build_and_install () {
local pkg="${1}"
local ver="$(grep ^pkgver < "${pkg}/build.sh" | sed 's/pkgver="\(.*\)"/\1/')"
pushd "${pkg}" > /dev/null
local pkgfile="$(realpath "./${pkg}-${ver}.pkg.tar.xz")"
if [ ! -f "${pkgfile}" ]; then
echo ">>> Building '${pkg}'"
./build.sh
fi
tar -C "${TARGET}" -xf "${pkgfile}"
popd > /dev/null
}
b () {
build_and_install "${@}"
return "${?}"
}
# Absulutely needed
b filesystem
b musl-libc
b libexecinfo
b mksh
# Networking
b zlib
b libressl
2018-11-10 00:42:27 +02:00
b curl
# Init
b sabotage-kernel-headers
2018-11-10 02:58:37 +02:00
b openrc