2019-01-09 15:33:18 +01:00
|
|
|
VERSION="1.30.0"
|
2017-12-09 21:51:48 +01:00
|
|
|
SRCDIR="busybox-$VERSION"
|
|
|
|
TARBALL="busybox-$VERSION.tar.bz2"
|
|
|
|
URL="https://busybox.net/downloads"
|
2019-01-09 15:33:18 +01:00
|
|
|
SHA256SUM="9553da068c0a30b1b8b72479908c1ba58672e2be7b535363a88de5e0f7bc04ce"
|
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"
|
2019-02-03 17:13:28 +01:00
|
|
|
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY"
|
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"
|
|
|
|
}
|