summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 68448d562ee03d79f80e6cc37d21558b0b6dbc4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Maintainer: Rhinoceros <https://aur.archlinux.org/account/rhinoceros>

pkgname=vim-grammarous
pkgver=r197.083cbee
pkgrel=1
pkgdesc='A powerful grammar checker for Vim using LanguageTool'
arch=('any')
url='https://github.com/rhysd/vim-grammarous'
license=('MIT')
groups=('vim-plugins')
depends=('vim' 'java-runtime=8' 'languagetool')
source=(https://github.com/rhysd/vim-grammarous/archive/master.zip)
sha256sums=('02dd5faac6c651f57fd0e2229c69a6dd6dfd10cf0a73571908faf1088b905ad8')

package () {
  cd "${pkgname}-master"

  # Install primary files
  install -d "$pkgdir/usr/share/vim/vimfiles"
  for _dir in autoload doc plugin; do
    cp -r "$_dir" "$pkgdir/usr/share/vim/vimfiles/$_dir"
  done

  # Use system-wide installation of LanguageTool
  echo "let g:grammarous#languagetool_cmd = 'languagetool'" > "$pkgdir/usr/share/vim/vimfiles/plugin/grammarous.system_languagetool.vim"

  # Install licence
  install -d "${pkgdir}/usr/share/licenses/${pkgname%-git}"
  grep '## License' README.md -A 100 > "${pkgdir}/usr/share/licenses/${pkgname%-git}/LICENCE"
}