mirror of
https://github.com/pygos/build.git
synced 2024-11-14 15:37:11 +01:00
37 lines
1 KiB
Text
Executable file
37 lines
1 KiB
Text
Executable file
VERSION="1.30.0"
|
|
SRCDIR="busybox-$VERSION"
|
|
TARBALL="busybox-$VERSION.tar.bz2"
|
|
URL="https://busybox.net/downloads"
|
|
SHA256SUM="9553da068c0a30b1b8b72479908c1ba58672e2be7b535363a88de5e0f7bc04ce"
|
|
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() {
|
|
curl --silent -L "$URL" | \
|
|
grep -o ">busybox-[0-9.]*tar.bz2<" | \
|
|
sed 's/>busybox-//g' | sed 's/.tar.bz2<//g' | \
|
|
verson_find_greatest "$VERSION"
|
|
}
|