added grep toolchain step

This commit is contained in:
ag-tsotetsi
2026-02-08 11:56:16 +02:00
parent 1f0a0d700b
commit f898735c15
2 changed files with 49 additions and 0 deletions

42
build/grep/build.bash Normal file
View File

@@ -0,0 +1,42 @@
. "$PROJECTDIR/build/grep/package.env"
fetch $GREP_URL
cd "$SOURCES" && tar xf grep-$GREP_VERSION.tar.xz && cd grep-$GREP_VERSION
bootstrap() {
echo bootstrap
}
toolchain() {
./configure \
--prefix=/usr \
--host=$TARGET \
--build=$(build-aux/config.guess) > /dev/null
make > /dev/null && make DESTDIR="$SYSROOT" install > /dev/null
}
final() {
echo final
}
case $1 in
bootstrap)
bootstrap
;;
toolchain)
toolchain
;;
setup)
setup
;;
final)
final
;;
esac
rm -rf "$SOURCES/grep-$GREP_VERSION"

7
build/grep/package.env Normal file
View File

@@ -0,0 +1,7 @@
export GREP_VERSION=3.12
IFS='.' read -r GREP_VERSION_MAJOR GREP_VERSION_MINOR <<< $GREP_VERSION
export GREP_VERSION_MAJOR GREP_VERSION_MINOR
export GREP_URL=https://mirror.ufs.ac.za/gnu/grep/grep-$GREP_VERSION.tar.xz