1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-11-25 12:20:42 +01:00
build/pkg/bbstatic/build

35 lines
930 B
Text
Raw Normal View History

VERSION="1.30.1"
SRCDIR="busybox-$VERSION"
TARBALL="busybox-$VERSION.tar.bz2"
URL="https://busybox.net/downloads"
SHA256SUM="3d1d04a4dbd34048f4794815a5c48ebb9eb53c5277e09ffffc060323b95dfbdc"
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() {
mkdir -p "$PKGDEPLOYDIR/bin"
cp "$PKGBUILDDIR/busybox" "$PKGDEPLOYDIR/bin"
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
}
check_update() {
check_update_simple "$URL" "busybox-" "tar.bz2"
}