mirror of
https://github.com/pygos/build.git
synced 2024-11-22 11:09:46 +01:00
34 lines
936 B
Text
Executable file
34 lines
936 B
Text
Executable file
VERSION="1.31.1"
|
|
SRCDIR="busybox-$VERSION"
|
|
TARBALL="busybox-$VERSION.tar.bz2"
|
|
URL="https://busybox.net/downloads"
|
|
SHA256SUM="d0f940a72f648943c1f2211e0e3117387c31d765137d92bd8284a3fb9752a998"
|
|
DEPENDS="toolchain"
|
|
|
|
prepare() {
|
|
apply_patches
|
|
}
|
|
|
|
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"
|
|
}
|