summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorbbyte2023-09-14 18:13:15 +0300
committerbbyte2023-09-14 18:13:15 +0300
commit6fa5dbef2030da08fbb354d2792cdfc759c84a86 (patch)
treee76c57cf2ae6611fcf839eeb6615bfd9bf18cbf2
parente35a2caa084f37c1fadefcb9d502216840efd7a4 (diff)
downloadaur-6fa5dbef2030da08fbb354d2792cdfc759c84a86.tar.gz
Change the source of service and shell script
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD10
-rw-r--r--languagetool.service14
-rw-r--r--languagetool.sh74
4 files changed, 9 insertions, 97 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f71467cb98af..a1823b3857bd 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = languagetool-snapshot
pkgdesc = Style and Grammar Checker for 25+ Languages (daily snapshot)
pkgver = 6.3.20230913
- pkgrel = 1
+ pkgrel = 2
url = https://www.languagetool.org
arch = any
license = LGPL
@@ -12,10 +12,10 @@ pkgbase = languagetool-snapshot
provides = languagetool
conflicts = languagetool
source = https://www.languagetool.org/download/snapshots/LanguageTool-20230913-snapshot.zip
- source = languagetool.sh
- source = languagetool.service
+ source = https://gitlab.archlinux.org/archlinux/packaging/packages/languagetool/-/raw/2079fd41/languagetool.service
+ source = https://gitlab.archlinux.org/archlinux/packaging/packages/languagetool/-/raw/2079fd41/languagetool.sh
sha256sums = 75fef67e39d586cfd986716bf1d59652c0aadff80501ccdcf31ce722b5ff73bd
- sha256sums = e395fe51eb107365bb6e5456a2e1a144a60296e52554b8407f241e195e434359
sha256sums = 628e59208af02dd41c678135ef6dd8b328905701301d8257316b388d36d6c52b
+ sha256sums = e395fe51eb107365bb6e5456a2e1a144a60296e52554b8407f241e195e434359
pkgname = languagetool-snapshot
diff --git a/PKGBUILD b/PKGBUILD
index 07289df02859..5c6c276c7a4f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -7,7 +7,7 @@ _pkgname="${pkgname%-snapshot}"
_date=20230913
_revision=6.3
pkgver=$_revision.$_date
-pkgrel=1
+pkgrel=2
pkgdesc='Style and Grammar Checker for 25+ Languages (daily snapshot)'
arch=(any)
url='https://www.languagetool.org'
@@ -19,11 +19,11 @@ optdepends=('java-runtime: needed for the GUI version'
provides=("${pkgname%-snapshot}")
conflicts=("${pkgname%-snapshot}")
source=(https://www.languagetool.org/download/snapshots/LanguageTool-"$_date"-snapshot.zip
- languagetool.sh
- languagetool.service)
+ https://gitlab.archlinux.org/archlinux/packaging/packages/languagetool/-/raw/2079fd41/languagetool.service
+ https://gitlab.archlinux.org/archlinux/packaging/packages/languagetool/-/raw/2079fd41/languagetool.sh)
sha256sums=('75fef67e39d586cfd986716bf1d59652c0aadff80501ccdcf31ce722b5ff73bd'
- 'e395fe51eb107365bb6e5456a2e1a144a60296e52554b8407f241e195e434359'
- '628e59208af02dd41c678135ef6dd8b328905701301d8257316b388d36d6c52b')
+ '628e59208af02dd41c678135ef6dd8b328905701301d8257316b388d36d6c52b'
+ 'e395fe51eb107365bb6e5456a2e1a144a60296e52554b8407f241e195e434359')
package() {
install -d "$pkgdir"/usr/share/java/"$_pkgname"
diff --git a/languagetool.service b/languagetool.service
deleted file mode 100644
index c96a0193acc9..000000000000
--- a/languagetool.service
+++ /dev/null
@@ -1,14 +0,0 @@
-[Unit]
-Description=Languagetool HTTP server
-
-[Service]
-Type=simple
-PIDFile=/run/language-tool.pid
-Restart=always
-ExecStart=/usr/bin/languagetool --http --allow-origin "*"
-ExecReload=/bin/kill -HUP $MAINPID
-ExecStop=/bin/kill -QUIT $MAINPID
-DynamicUser=yes
-
-[Install]
-WantedBy=multi-user.target
diff --git a/languagetool.sh b/languagetool.sh
deleted file mode 100644
index d5003eeb2319..000000000000
--- a/languagetool.sh
+++ /dev/null
@@ -1,74 +0,0 @@
-#!/bin/bash
-
-file_present=false
-asked_for_help=false
-start_server=false
-http_server=false
-force_cli=false
-
-declare -a argv=("$@")
-
-i=0
-for arg in "$@"; do
- if [[ $arg != -* ]]; then
- file_present=true
- fi
- if [[ $arg == --config* ]]; then
- start_server=true
- fi
- if [[ $arg == --http ]]; then
- start_server=true
- http_server=true
- unset argv[$i]
- fi
- if [[ $arg == -h ]]; then
- asked_for_help=true
- unset argv[$i]
- fi
- if [[ $arg == --help ]]; then
- asked_for_help=true
- unset argv[$i]
- fi
- if [[ $arg == --list || $arg == --version ]]; then
- force_cli=true
- fi
- ((i++))
-done
-
-CP=/usr/share/languagetool
-for name in /usr/share/java/languagetool/*.jar ; do
- CP=$CP:$name
-done
-
-CLI_command='org.languagetool.commandline.Main'
-GUI_command='org.languagetool.gui.Main'
-NSRV_command='org.languagetool.server.HTTPServer'
-SSRV_command='org.languagetool.server.HTTPSServer'
-
-if $asked_for_help; then
- echo "Command-line interface (CLI) help:"
- "$JAVA_HOME/bin/java" -cp $CP $CLI_command -h | sed "s/java -jar languagetool-commandline.jar/languagetool/"
- echo
- echo "Graphical user interface (GUI) help:"
- "$JAVA_HOME/bin/java" -cp $CP $GUI_command -h | sed "s/java org.languagetool.gui.Main/languagetool/"
- echo
- echo "HTTP server help:"
- "$JAVA_HOME/bin/java" -cp $CP $NSRV_command -h | sed "s/HTTPServer/languagetool --http/"
- echo
- echo "HTTPS server help:"
- "$JAVA_HOME/bin/java" -cp $CP $SSRV_command -h | sed "s/HTTPSServer/languagetool/"
-else
- if $start_server; then
- if $http_server; then
- "$JAVA_HOME/bin/java" -cp $CP $NSRV_command "${argv[@]}"
- else
- "$JAVA_HOME/bin/java" -cp $CP $SSRV_command "${argv[@]}"
- fi
- else
- if ( $file_present || $force_cli ); then
- "$JAVA_HOME/bin/java" -cp $CP $CLI_command "${argv[@]}"
- else
- "$JAVA_HOME/bin/java" -cp $CP $GUI_command "${argv[@]}"
- fi
- fi
-fi