Files
axe-os/build/coreutils/build.bash
2026-02-08 11:43:43 +02:00

53 lines
805 B
Bash

. "$PROJECTDIR/build/coreutils/package.env"
fetch $COREUTILS_URL
cd "$SOURCES" && tar xf coreutils-$COREUTILS_VERSION.tar.xz && cd coreutils-$COREUTILS_VERSION
bootstrap() {
echo bootstrap
}
toolchain() {
sed -r '/_GL_EXTERN_C/s/w?memchr|bsearch/(&)/' -i $(find -name \*.in.h)
./configure \
--prefix=/usr \
--host=$TARGET \
--build=$(build-aux/config.guess) \
--enable-install-program=hostname \
--enable-no-install-program=kill,uptime > /dev/null
make > /dev/null && make DESTDIR="$SYSROOT" install > /dev/null
mv "$SYSROOT/usr/bin/chroot" "$SYSROOT/usr/sbin"
}
setup() {
echo setup
}
final() {
echo final
}
case $1 in
bootstrap)
bootstrap
;;
toolchain)
toolchain
;;
setup)
setup
;;
final)
final
;;
esac
rm -rf "$SOURCES/coreutils-$COREUTILS_VERSION"