1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-11-22 19:19:46 +01:00
build/pkg/bbstatic/build
David Oberhollenzer 4a919ad209 Merge bbstatic busybox configurations
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-02-17 03:02:16 +01:00

33 lines
868 B
Text
Executable file

VERSION="1.28.0"
SRCDIR="busybox-$VERSION"
TARBALL="busybox-$VERSION.tar.bz2"
URL="https://busybox.net/downloads"
SHA256SUM="604553b7dbd59ded9e3ad7c6af49ed2cff599adf3e54d9463e5e0027b362019c"
DEPENDS="toolchain"
prepare() {
return
}
build() {
local SYSROOT="$TCDIR/$TARGET"
cp "$SCRIPTDIR/pkg/$PKGNAME/bbstatic.config" "$PKGBUILDDIR/.config"
export KBUILD_OUTPUT="$PKGBUILDDIR"
make -C "$1" O="$PKGBUILDDIR" CROSS_COMPILE="${TARGET}-" oldconfig
sed -i "$PKGBUILDDIR/.config" -e 's,^CONFIG_CROSS_COMPILE=.*,CONFIG_CROSS_COMPILE="'$TARGET'-",'
sed -i "$PKGBUILDDIR/.config" -e 's,^CONFIG_SYSROOT=.*,CONFIG_SYSROOT="'$SYSROOT'",'
make -C "$1" O="$PKGBUILDDIR" CROSS_COMPILE="${TARGET}-" -j $NUMJOBS
}
deploy() {
local SOURCE="$1"
local DEPLOY="$2"
mkdir -p "$DEPLOY/bin"
cp "$PKGBUILDDIR/busybox" "$DEPLOY/bin"
ln -s "/bin/busybox" "$DEPLOY/bin/sh"
}