Package Details: languagetool-snapshot 6.4.20240218-1

Git Clone URL: https://aur.archlinux.org/languagetool-snapshot.git (read-only, click to copy)
Package Base: languagetool-snapshot
Description: Style and Grammar Checker for 25+ Languages (daily snapshot)
Upstream URL: https://www.languagetool.org
Licenses: LGPL
Conflicts: languagetool
Provides: languagetool
Submitter: None
Maintainer: None
Last Packager: None
Votes: 0
Popularity: 0.000000
First Submitted: 2023-08-28 02:56 (UTC)
Last Updated: 2024-02-19 15:13 (UTC)

Dependencies (4)

Required by (17)

Sources (3)

Latest Comments

MaximGun commented on 2025-10-29 13:08 (UTC)

For anyone interested, I updated the PKGBUILD to automatically download the latest available snapshot from Languagetool's servers:

pkgname=languagetool-snapshot
_pkgname="${pkgname%-snapshot}"
pkgver=6.8.20251028  # will be set by pkgver()
pkgrel=1
pkgdesc='Style and Grammar Checker for 25+ Languages (daily snapshot)'
arch=(any)
url='https://www.languagetool.org'
license=(LGPL)
depends=(java-runtime-headless)
optdepends=('java-runtime: needed for the GUI version'
            'libxtst: needed for the GUI version'
            'gtk3: GTK style for the GUI')
provides=("$_pkgname")
conflicts=("$_pkgname")

# Find the latest snapshot file and set it as a source
_snapshot_url_base="https://internal1.languagetool.org/snapshots"
_snapshot_file=$(curl -s "$_snapshot_url_base/" | grep -oP 'LanguageTool-\d{8}-snapshot\.zip' | sort -r | head -n1)
_date=$(echo "$_snapshot_file" | grep -oP '\d{8}')

source=("${_snapshot_url_base}/${_snapshot_file}"
        'languagetool.service'
        'languagetool.sh')
sha256sums=('SKIP'
            '628e59208af02dd41c678135ef6dd8b328905701301d8257316b388d36d6c52b'
            'e395fe51eb107365bb6e5456a2e1a144a60296e52554b8407f241e195e434359')
noextract=("$_snapshot_file")

# helper: extract the top-level directory name from the archive (e.g., LanguageTool-6.8-SNAPSHOT)
_get_topdir() {
bsdtar -tf "$_snapshot_file" \
    | awk -F/ '/^LanguageTool-.*-SNAPSHOT\/$/ {print $1; exit}'
}

pkgver() {
local topdir rev
topdir=$(_get_topdir)
# topdir is like "LanguageTool-6.8-SNAPSHOT"
rev=${topdir#LanguageTool-}
rev=${rev%-SNAPSHOT}
printf '%s.%s\n' "$rev" "$_date"
}

package() {
install -d "$pkgdir/usr/share/java/$_pkgname"

# Extract the snapshot
bsdtar -xpf "$_snapshot_file" -C "$srcdir"

# Discover the directory name dynamically
local topdir
topdir=$(_get_topdir)

# Install the whole tree to /usr/share/languagetool
mv "$srcdir/$topdir" "$pkgdir/usr/share/$_pkgname"

# Wrapper + service
install -D -m755 "$_pkgname.sh" "$pkgdir/usr/bin/$_pkgname"
install -D -m644 "$_pkgname.service" "$pkgdir/usr/lib/systemd/system/$_pkgname.service"

# Move jars/libs under /usr/share/java/languagetool
cd "$pkgdir/usr/share/$_pkgname"
mv languagetool{,-server,-commandline}.jar libs/ "$pkgdir/usr/share/java/$_pkgname"
}