Was supposed to be a linux distribution, now just a collection of build scripts for packages on top of (ideally) any distribution.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 lines
1.5 KiB

#!/bin/sh
# Tool to build tools to build final system
set -e
umask 022
command -v astronaut >/dev/null 2>&1 || {
echo 'Can'\''t find astronaut in $PATH' 1>&2
exit 1
}
if [ ! "$rocket" ]; then
echo 'Please set the $rocket variable' 1>&2
exit 1
fi
if [ "$(readlink /tools)" != "$(realpath "$rocket")/tools" ]; then
echo "Please create a symlink from /tools to $(realpath "$rocket")/tools" 1>&2
exit 1
fi
# Options for supported shells
if [ "$(basename "$(readlink /bin/sh)")" = "bash" ]; then
shellopts="+h"
fi
# Know where them satellites are
satellite_dir="$(dirname "$(realpath "$0")")/satellites"
envrun() {
env -i \
HOME="$HOME" \
TERM="$TERM" \
LC_ALL=C \
PATH="/tools/bin:$PATH" \
MAKEFLAGS="$MAKEFLAGS" \
rocket="$rocket" \
target="$(uname -m)-rocket-linux-gnu" \
/bin/sh "$shellopts" "$@"
}
astrobuild() {
envrun astronaut -M -i "$rocket" "$satellite_dir/$1.sat"
}
mkdir -p "$rocket/tools/lib"
ln -sf lib "$rocket/tools/lib64"
# List of packages to build
# Toolchain
astrobuild "binutils-1"
astrobuild "gcc-1"
astrobuild "linux-api"
astrobuild "glibc"
astrobuild "libstdc"
astrobuild "binutils-2"
astrobuild "gcc-2"
# Utilities
astrobuild "busybox"
10 years ago
astrobuild "bash"
astrobuild "gawk"
astrobuild "make"
astrobuild "m4"
astrobuild "tcl"
astrobuild "expect"
astrobuild "dejagnu"
astrobuild "check"
astrobuild "perl"
astrobuild "openssl"
astrobuild "ca-certificates"
astrobuild "curl"
astrobuild "stow"
astrobuild "astronaut"