2017-01-23 09:58:04 +01:00
|
|
|
TERMUX_PKG_HOMEPAGE=https://busybox.net/
|
2015-06-13 01:03:31 +02:00
|
|
|
TERMUX_PKG_DESCRIPTION="Tiny versions of many common UNIX utilities into a single small executable"
|
2019-01-20 22:39:59 +01:00
|
|
|
TERMUX_PKG_LICENSE="GPL-2.0"
|
2020-07-20 21:19:40 +02:00
|
|
|
TERMUX_PKG_VERSION=1.32.0
|
2020-10-02 20:47:51 +02:00
|
|
|
TERMUX_PKG_REVISION=3
|
2017-01-23 09:58:04 +01:00
|
|
|
TERMUX_PKG_SRCURL=https://busybox.net/downloads/busybox-${TERMUX_PKG_VERSION}.tar.bz2
|
2020-07-20 21:19:40 +02:00
|
|
|
TERMUX_PKG_SHA256=c35d87f1d04b2b153d33c275c2632e40d388a88f19a9e71727e0bbbff51fe689
|
2019-08-12 17:28:41 +02:00
|
|
|
TERMUX_PKG_BUILD_IN_SRC=true
|
2020-07-08 23:53:36 +02:00
|
|
|
|
2020-01-05 15:06:16 +01:00
|
|
|
TERMUX_PKG_SERVICE_SCRIPT=(
|
|
|
|
"telnetd" 'exec busybox telnetd -F'
|
2020-08-03 17:51:43 +02:00
|
|
|
"ftpd" 'exec busybox tcpsvd -vE 0.0.0.0 8021 busybox ftpd -w $HOME'
|
2020-01-05 15:06:16 +01:00
|
|
|
)
|
2015-06-13 01:03:31 +02:00
|
|
|
|
2019-02-08 10:37:29 +01:00
|
|
|
termux_step_pre_configure() {
|
2019-08-08 14:25:54 +02:00
|
|
|
# Certain packages are not safe to build on device because their
|
|
|
|
# build.sh script deletes specific files in $TERMUX_PREFIX.
|
2019-08-12 17:28:41 +02:00
|
|
|
if $TERMUX_ON_DEVICE_BUILD; then
|
2019-08-08 14:25:54 +02:00
|
|
|
termux_error_exit "Package '$TERMUX_PKG_NAME' is not safe for on-device builds."
|
|
|
|
fi
|
2016-09-03 23:48:41 +02:00
|
|
|
}
|
2015-06-13 01:03:31 +02:00
|
|
|
|
2019-02-08 10:37:29 +01:00
|
|
|
termux_step_configure() {
|
2019-11-11 14:14:10 +01:00
|
|
|
# Prevent spamming logs with useless warnings to make them more readable.
|
|
|
|
CFLAGS+=" -Wno-ignored-optimization-argument -Wno-unused-command-line-argument"
|
|
|
|
|
2019-11-11 13:57:43 +01:00
|
|
|
sed -e "s|@TERMUX_PREFIX@|$TERMUX_PREFIX|g" \
|
|
|
|
-e "s|@TERMUX_SYSROOT@|$TERMUX_STANDALONE_TOOLCHAIN/sysroot|g" \
|
|
|
|
-e "s|@TERMUX_HOST_PLATFORM@|${TERMUX_HOST_PLATFORM}|g" \
|
2019-11-11 14:13:05 +01:00
|
|
|
-e "s|@TERMUX_CFLAGS@|$CFLAGS|g" \
|
|
|
|
-e "s|@TERMUX_LDFLAGS@|$LDFLAGS|g" \
|
2019-11-11 15:57:58 +01:00
|
|
|
-e "s|@TERMUX_LDLIBS@|log|g" \
|
2019-11-11 13:57:43 +01:00
|
|
|
$TERMUX_PKG_BUILDER_DIR/busybox.config > .config
|
2019-11-11 14:13:05 +01:00
|
|
|
|
|
|
|
unset CFLAGS LDFLAGS
|
2015-06-13 01:03:31 +02:00
|
|
|
make oldconfig
|
|
|
|
}
|
|
|
|
|
2019-02-08 10:37:29 +01:00
|
|
|
termux_step_post_make_install() {
|
2019-08-12 17:28:41 +02:00
|
|
|
if $TERMUX_DEBUG; then
|
|
|
|
install -Dm700 busybox_unstripped $PREFIX/bin/busybox
|
2018-06-07 22:19:36 +02:00
|
|
|
fi
|
2015-06-13 01:03:31 +02:00
|
|
|
|
2020-07-08 23:53:36 +02:00
|
|
|
# Install busybox man page.
|
|
|
|
install -Dm600 -t $TERMUX_PREFIX/share/man/man1 $TERMUX_PKG_SRCDIR/docs/busybox.1
|
2015-06-13 01:03:31 +02:00
|
|
|
}
|