2018-08-14 20:11:16 +02:00
|
|
|
VERSION="1.29.2"
|
2017-12-09 21:51:48 +01:00
|
|
|
SRCDIR="busybox-$VERSION"
|
|
|
|
TARBALL="busybox-$VERSION.tar.bz2"
|
|
|
|
URL="https://busybox.net/downloads"
|
2018-08-14 20:11:16 +02:00
|
|
|
SHA256SUM="67d2fa6e147a45875fe972de62d907ef866fe784c495c363bf34756c444a5d61"
|
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"
|
|
|
|
}
|