2020-07-16 19:42:05 +02:00
|
|
|
TERMUX_PKG_HOMEPAGE=https://developer.android.com/studio/command-line/apksigner
|
2021-07-30 16:08:07 +02:00
|
|
|
TERMUX_PKG_DESCRIPTION="APK signing tool from Android SDK"
|
|
|
|
TERMUX_PKG_LICENSE="Apache-2.0"
|
2020-12-20 14:16:34 +01:00
|
|
|
TERMUX_PKG_MAINTAINER="@termux"
|
2020-07-16 19:42:05 +02:00
|
|
|
TERMUX_PKG_VERSION=${TERMUX_ANDROID_BUILD_TOOLS_VERSION}
|
2021-07-30 17:53:56 +02:00
|
|
|
TERMUX_PKG_REVISION=5
|
2021-07-30 16:08:07 +02:00
|
|
|
TERMUX_PKG_DEPENDS="openjdk-17"
|
2019-08-12 17:28:41 +02:00
|
|
|
TERMUX_PKG_BUILD_IN_SRC=true
|
2016-10-07 01:38:12 +02:00
|
|
|
TERMUX_PKG_PLATFORM_INDEPENDENT=true
|
2020-07-21 10:19:54 +02:00
|
|
|
TERMUX_PKG_SKIP_SRC_EXTRACT=true
|
2016-10-07 01:38:12 +02:00
|
|
|
|
2020-07-16 19:42:05 +02:00
|
|
|
termux_step_pre_configure() {
|
|
|
|
# Requires Android SDK, not available on device
|
|
|
|
if $TERMUX_ON_DEVICE_BUILD; then
|
2021-07-30 16:08:07 +02:00
|
|
|
termux_error_exit "Package '$TERMUX_PKG_NAME' is not available for on-device builds."
|
2020-07-16 19:42:05 +02:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
termux_step_make_install() {
|
2021-07-30 16:08:07 +02:00
|
|
|
install -Dm600 $ANDROID_HOME/build-tools/${TERMUX_PKG_VERSION}/lib/apksigner.jar \
|
|
|
|
$TERMUX_PREFIX/share/java/apksigner.jar
|
|
|
|
cat <<- EOF > $TERMUX_PREFIX/bin/apksigner
|
|
|
|
#!${TERMUX_PREFIX}/bin/sh
|
|
|
|
exec java -jar $TERMUX_PREFIX/share/java/apksigner.jar "\$@"
|
2020-07-26 13:19:30 +02:00
|
|
|
EOF
|
2021-07-30 17:53:56 +02:00
|
|
|
chmod 700 $TERMUX_PREFIX/bin/apksigner
|
2020-07-26 13:19:30 +02:00
|
|
|
}
|