-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
addpkg(main/languagetool-libs),addpkg(x11/languagetool-gui): language…
…tool 6.5 Closes #21086
- Loading branch information
Showing
5 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
TERMUX_PKG_HOMEPAGE=https://languagetool.org | ||
TERMUX_PKG_DESCRIPTION="Libraries needed for languagetool" | ||
TERMUX_PKG_LICENSE="LGPL-2.1" | ||
TERMUX_PKG_MAINTAINER="@termux" | ||
TERMUX_PKG_VERSION=6.5 | ||
TERMUX_PKG_SRCURL=https://languagetool.org/download/LanguageTool-${TERMUX_PKG_VERSION}.zip | ||
TERMUX_PKG_SHA256=27f3ae5a29efbc8267a5a266908dfec205d16d312af8516e0b5bcec871edea0b | ||
TERMUX_PKG_BUILD_IN_SRC=true | ||
TERMUX_PKG_PLATFORM_INDEPENDENT=true | ||
|
||
termux_step_make_install() { | ||
mkdir -p "${TERMUX_PREFIX}/share/java/languagetool/libs" | ||
mv ./languagetool-{commandline,server}.jar "${TERMUX_PREFIX}/share/java/languagetool" | ||
mv ./libs/*.jar "${TERMUX_PREFIX}/share/java/languagetool/libs" | ||
|
||
for pair in \ | ||
"languagetool org.languagetool.commandline.Main" \ | ||
"languagetool-http-server org.languagetool.server.HTTPServer" \ | ||
"languagetool-https-server org.languagetool.server.HTTPSServer"; do | ||
read -r -d' ' package bin <<<"$pair" | ||
sed "s|@MAIN@|$package|g" "${TERMUX_PKG_BUILDER_DIR}/languagetool.sh" > "${TERMUX_PREFIX}/bin/$bin" | ||
chmod 700 "${TERMUX_PREFIX}/bin/$bin" | ||
done | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
TERMUX_SUBPKG_INCLUDE="bin/languagetool-http-server bin/languagetool-https-server share/java/languagetool/languagetool-server.jar" | ||
TERMUX_SUBPKG_DEPENDS="openjdk-17" | ||
TERMUX_SUBPKG_DESCRIPTION="Server for languagetool" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/data/data/com.termux/files/usr/bin/env bash | ||
|
||
main="@MAIN@" | ||
|
||
mods="${TERMUX_PREFIX}/share/languagetool" | ||
for jar in "${TERMUX_PREFIX}/share/java/langugetool"/*.jar; do | ||
mods=$mods:$jar | ||
done | ||
|
||
exec "${JAVA_HOME}/bin/java" -cp "$mods" "$main" "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
TERMUX_SUBPKG_INCLUDE="bin/languagetool share/java/languagetool/languagetool-commandline.jar" | ||
TERMUX_SUBPKGS_DEPENDS="openjdk-17" | ||
TERMUX_SUBPKG_DESCRIPTION="Style and Grammar Checker for 25+ Languages" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
TERMUX_PKG_HOMEPAGE=https://languagetool.org | ||
TERMUX_PKG_DESCRIPTION="GUI version of languagetool" | ||
TERMUX_PKG_LICENSE="LGPL-2.1" | ||
TERMUX_PKG_MAINTAINER="@termux" | ||
TERMUX_PKG_VERSION="$( | ||
source "${TERMUX_SCRIPTDIR}/packages/languagetool-libs/build.sh" | ||
echo "${TERMUX_PKG_VERSION}" | ||
)" | ||
TERMUX_PKG_SRCURL="$( | ||
source "${TERMUX_SCRIPTDIR}/packages/languagetool-libs/build.sh" | ||
echo "${TERMUX_PKG_SRCURL}" | ||
)" | ||
TERMUX_PKG_SHA256="$( | ||
source "${TERMUX_SCRIPTDIR}/packages/languagetool-libs/build.sh" | ||
echo "${TERMUX_PKG_SHA256}" | ||
)" | ||
TERMUX_PKG_DEPENDS="openjdk-17, openjdk-17-x, languagetool-libs" | ||
TERMUX_PKG_BUILD_IN_SRC=true | ||
TERMUX_PKG_PLATFORM_INDEPENDENT=true | ||
|
||
termux_step_make_install() { | ||
mv ./languagetool.jar "${TERMUX_PREFIX}/share/java/languagetool" | ||
sed "s|@MAIN@|org.languagetool.gui.Main|g" "${TERMUX_SCRIPTDIR}/packages/languagetool-libs/languagetool.sh" > "${TERMUX_PREFIX}/bin/languagetool-gui" | ||
chmod 700 "${TERMUX_PREFIX}/bin/languagetool-gui" | ||
} |