2018-09-15 16:06:55 +02:00
|
|
|
VERSION="1.29.3"
|
2017-12-09 21:51:48 +01:00
|
|
|
SRCDIR="busybox-$VERSION"
|
|
|
|
TARBALL="busybox-$VERSION.tar.bz2"
|
|
|
|
URL="https://busybox.net/downloads"
|
2018-09-15 16:06:55 +02:00
|
|
|
SHA256SUM="97648636e579462296478e0218e65e4bc1e9cd69089a3b1aeb810bff7621efb7"
|
2018-02-15 23:47:54 +01:00
|
|
|
DEPENDS="toolchain"
|
2017-12-09 21:51:48 +01:00
|
|
|
|
|
|
|
prepare() {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
local SYSROOT="$TCDIR/$TARGET"
|
|
|
|
|
2018-02-17 00:09:25 +01:00
|
|
|
cp "$SCRIPTDIR/pkg/$PKGNAME/bbstatic.config" "$PKGBUILDDIR/.config"
|
2017-12-09 21:51:48 +01:00
|
|
|
|
2018-02-16 23:22:04 +01:00
|
|
|
export KBUILD_OUTPUT="$PKGBUILDDIR"
|
2017-12-09 21:51:48 +01:00
|
|
|
|
2018-02-16 23:22:04 +01:00
|
|
|
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'",'
|
2017-12-09 21:51:48 +01:00
|
|
|
|
2018-02-16 23:22:04 +01:00
|
|
|
make -C "$1" O="$PKGBUILDDIR" CROSS_COMPILE="${TARGET}-" -j $NUMJOBS
|
2017-12-09 21:51:48 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
deploy() {
|
|
|
|
local SOURCE="$1"
|
2018-02-16 23:22:04 +01:00
|
|
|
local DEPLOY="$2"
|
2017-12-09 21:51:48 +01:00
|
|
|
|
|
|
|
mkdir -p "$DEPLOY/bin"
|
2018-02-16 23:22:04 +01:00
|
|
|
cp "$PKGBUILDDIR/busybox" "$DEPLOY/bin"
|
2017-12-09 21:51:48 +01:00
|
|
|
}
|
2018-05-06 17:23:31 +02:00
|
|
|
|
|
|
|
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"
|
|
|
|
}
|