mirror of
https://github.com/termux/termux-packages.git
synced 2025-08-09 13:41:55 +00:00
- Fixes https://github.com/termux/termux-packages/issues/25027 - JDK 21 has been released for a year, so theoretically, all packages should be ready now, but it will be necessary to test each package's basic functionality with `openjdk-21` installed, to make sure that they are compatible. - Now that https://github.com/termux/termux-packages/pull/25214 has been merged, it should be easier for termux-apt users whose `java` command is set to `openjdk-17`, to get it automatically updated to `openjdk-21` without necessarily having to uninstall `openjdk-17`.
42 lines
1.3 KiB
Bash
42 lines
1.3 KiB
Bash
TERMUX_PKG_HOMEPAGE=https://github.com/mjuhasz/BDSup2Sub
|
|
TERMUX_PKG_DESCRIPTION="A subtitle conversion tool for image based stream formats"
|
|
TERMUX_PKG_LICENSE="Apache-2.0, LGPL-3.0"
|
|
TERMUX_PKG_MAINTAINER="@termux"
|
|
TERMUX_PKG_VERSION=4.0.1
|
|
TERMUX_PKG_REVISION=1
|
|
TERMUX_PKG_SRCURL=https://github.com/mjuhasz/BDSup2Sub/archive/refs/tags/${TERMUX_PKG_VERSION}.tar.gz
|
|
TERMUX_PKG_SHA256=8ad9529e58d2eeadb5c2be80bfcdaaa06a8714c3144c327491c1d19431993ad9
|
|
TERMUX_PKG_AUTO_UPDATE=false
|
|
TERMUX_PKG_DEPENDS="openjdk-21"
|
|
TERMUX_PKG_PLATFORM_INDEPENDENT=true
|
|
TERMUX_PKG_BUILD_IN_SRC=true
|
|
|
|
termux_step_post_get_source() {
|
|
cp -T $TERMUX_PKG_BUILDER_DIR/src-Manifest.txt src/Manifest.txt
|
|
}
|
|
|
|
termux_step_pre_configure() {
|
|
_BUILD_JARFILE="$TERMUX_PKG_BUILDDIR/${TERMUX_PKG_NAME}.jar"
|
|
}
|
|
|
|
termux_step_make() {
|
|
cd src
|
|
javac -encoding UTF-8 -source 1.8 -target 1.8 $(find . -name "*.java")
|
|
rm -f "${_BUILD_JARFILE}"
|
|
jar cfm "${_BUILD_JARFILE}" Manifest.txt $(find . -name "*.class")
|
|
}
|
|
|
|
termux_step_make_install() {
|
|
local _JAR_DIR=$TERMUX_PREFIX/share/java
|
|
install -Dm600 -t ${_JAR_DIR} "${_BUILD_JARFILE}"
|
|
|
|
local exe=$TERMUX_PREFIX/bin/bdsup2sub
|
|
mkdir -p $(dirname ${exe})
|
|
rm -f ${exe}
|
|
cat <<-EOF > ${exe}
|
|
#!$TERMUX_PREFIX/bin/sh
|
|
exec java -jar ${_JAR_DIR}/$(basename "${_BUILD_JARFILE}") "\$@"
|
|
EOF
|
|
chmod 0700 ${exe}
|
|
}
|