summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 44dd010c963a111a08032afdc1e8ae6615415603 (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
31
32
# Maintainer: lilydjwg <lilydjwg@gmail.com>

pkgname=vim-rust-git
pkgver=20200918
pkgrel=1
pkgdesc="Rust language support for Vim"
arch=('any')
depends=('vim')
makedepends=('git')
url="https://github.com/rust-lang/rust.vim"
license=('MIT' 'Apache')
source=(${pkgname%-git}::git+https://github.com/rust-lang/rust.vim)
sha256sums=('SKIP')
provides=('vim-rust')
conflicts=('vim-rust')
optdepends=('rust: for RustRun and similar commands'
            'vim-syntastic: syntax checking')

pkgver() {
  cd ${pkgname%-git}
  TZ=UTC git log -1 --format="%cd" --date=short-local | sed "s|-||g"
}

package() {
  cd ${pkgname%-git}

  msg 'Installing dirs...'
  install -dm 755 "$pkgdir/usr/share/vim/vimfiles"
  for _dir in after autoload compiler doc ftdetect ftplugin indent plugin syntax syntax_checkers ctags; do
    cp -dpr --no-preserve=ownership $_dir "$pkgdir/usr/share/vim/vimfiles/$_dir"
  done
}