Skip to content

Instantly share code, notes, and snippets.

@Cilyan
Created January 20, 2016 00:41
Show Gist options
  • Save Cilyan/d08ad69601cfee9ab227 to your computer and use it in GitHub Desktop.
Save Cilyan/d08ad69601cfee9ab227 to your computer and use it in GitHub Desktop.
PKGBUILD for libreoffice-extension-languagetool-nofr, a package that offers the LanguageTool LibO extension without french registered for compatibility with Grammalecte
# Maintainer: 3ED <krzysztof1987 /at/ gmail /dot/ com>
# Contributor: jtts
pkgname=libreoffice-extension-languagetool-nofr
_pkgname=languagetool
pkgver=3.2
pkgrel=1
pkgdesc="An Open Source style and grammar checker. Will not register for french and can this be installed in parallel to Grammalecte"
arch=('any')
url="http://www.languagetool.org/"
license=('LGPL')
groups=('libreoffice-extensions')
depends=('libreoffice')
source=("http://www.languagetool.org/download/LanguageTool-${pkgver}.oxt")
noextract=("LanguageTool-${pkgver}.oxt")
sha512sums=('33635511b1f1c4fab832f3d8dfdcd6c31481f56d9626696a5c2a8b5e99719c55203c9d054faa9d1db56e43de12e9f04256ef175dc1d2dbc843661c90f289858f')
package() {
_DESTDIR="${pkgdir}/usr/lib/libreoffice/share/extensions/${_pkgname}/"
install -dm755 "${_DESTDIR}"
bsdtar -xf LanguageTool-${pkgver}.oxt -C "${_DESTDIR}"
chmod -R a=r,a+X,u+w "${_DESTDIR}"
# Do not register LT for french (will be handled by e.g. Grammalecte)
sed -re '\@prop oor:name="Locales"@ {;N; s@fr(\-..)? @@g;}' -i "${_DESTDIR}/Linguistic.xcu"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment