2019-05-11 17:27:56 +02:00
|
|
|
TERMUX_PKG_HOMEPAGE=https://github.com/beanshell/beanshell
|
|
|
|
TERMUX_PKG_DESCRIPTION="Small, free, embeddable, source level Java interpreter with object based scripting language features written in Java"
|
|
|
|
TERMUX_PKG_LICENSE="Apache-2.0"
|
2020-05-13 10:01:25 +02:00
|
|
|
TERMUX_PKG_MAINTAINER="Leonid Pliushch <leonid.pliushch@gmail.com>"
|
2020-12-22 13:25:31 +01:00
|
|
|
TERMUX_PKG_VERSION=2.1.0
|
2019-05-11 17:27:56 +02:00
|
|
|
TERMUX_PKG_SRCURL=https://github.com/beanshell/beanshell/releases/download/$TERMUX_PKG_VERSION/bsh-$TERMUX_PKG_VERSION.jar
|
2020-12-22 13:25:31 +01:00
|
|
|
TERMUX_PKG_SHA256=e9a68515dd69d54a648c4497875264a874f6c69ff52d0ddaf4be2204f0f18652
|
2021-10-04 12:43:31 +02:00
|
|
|
TERMUX_PKG_AUTO_UPDATE=true
|
2019-05-11 17:27:56 +02:00
|
|
|
TERMUX_PKG_DEPENDS="dash, termux-tools"
|
|
|
|
TERMUX_PKG_SKIP_SRC_EXTRACT=true
|
|
|
|
TERMUX_PKG_PLATFORM_INDEPENDENT=true
|
|
|
|
TERMUX_PKG_BUILD_IN_SRC=true
|
|
|
|
|
|
|
|
termux_step_pre_configure() {
|
|
|
|
termux_download \
|
|
|
|
"$TERMUX_PKG_SRCURL" \
|
|
|
|
"$TERMUX_PKG_CACHEDIR/bsh-$TERMUX_PKG_VERSION.jar" \
|
|
|
|
"$TERMUX_PKG_SHA256"
|
|
|
|
}
|
|
|
|
|
|
|
|
termux_step_make() {
|
2019-09-23 00:56:58 +02:00
|
|
|
"$ANDROID_HOME/build-tools/${TERMUX_ANDROID_BUILD_TOOLS_VERSION}/dx" \
|
|
|
|
--dex --output=beanshell.jar "$TERMUX_PKG_CACHEDIR/bsh-$TERMUX_PKG_VERSION.jar"
|
2019-05-11 17:27:56 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
termux_step_make_install() {
|
|
|
|
install -Dm600 beanshell.jar "$TERMUX_PREFIX/share/dex/beanshell.jar"
|
|
|
|
|
|
|
|
{
|
|
|
|
echo "#!$TERMUX_PREFIX/bin/sh"
|
2020-07-26 02:25:56 +02:00
|
|
|
echo "dalvikvm -Xcompiler-option --compiler-filter=speed -cp $TERMUX_PREFIX/share/dex/beanshell.jar bsh.Interpreter \"\$@\""
|
2019-05-11 17:27:56 +02:00
|
|
|
} > "$TERMUX_PREFIX"/bin/beanshell
|
|
|
|
|
|
|
|
chmod 700 "$TERMUX_PREFIX"/bin/beanshell
|
|
|
|
ln -sfr "$TERMUX_PREFIX"/bin/beanshell "$TERMUX_PREFIX"/bin/bsh
|
|
|
|
}
|
2020-07-26 13:19:30 +02:00
|
|
|
|
|
|
|
termux_step_create_debscripts() {
|
|
|
|
cat <<- EOF > ./postinst
|
2020-07-26 19:32:34 +02:00
|
|
|
#!${TERMUX_PREFIX}/bin/bash
|
|
|
|
rm -f $TERMUX_PREFIX/share/dex/oat/*/beanshell.{art,oat,odex,vdex} >/dev/null 2>&1
|
2020-07-26 13:19:30 +02:00
|
|
|
exit 0
|
|
|
|
EOF
|
|
|
|
}
|