summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4cd53c3f6b0becb14b8ad8fb8e202ca5fc63ef41 (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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Maintainer: ml <>
# Contributor: David Runge <dvzrv@archlinux.org>
# Contributor: Hugo Rodrigues <me@hugorodrigues.net>
pkgname=vim-ansible-git
pkgver=3.2.r3.g469e55b
pkgrel=1
pkgdesc="A vim plugin for syntax highlighting Ansible's common filetypes"
arch=('any')
url='https://github.com/pearofducks/ansible-vim'
license=('MIT' 'BSD')
groups=('vim-plugins')
depends=('python-jinja' 'vim')
makedepends=('git' 'ansible')
optdepends=('vim-ultisnips: for ansible snippets')
provides=('vim-ansible')
conflicts=('vim-ansible')
source=("$pkgname::git+$url.git")
sha256sums=('SKIP')

pkgver() {
  cd "$pkgname"
  git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd "$pkgname"
  # generating a reproducible UltiSnips snippet file:
  # https://github.com/pearofducks/ansible-vim/pull/105
  python UltiSnips/generate.py --style=dictionary
}

package() {
  cd "$pkgname"
  install -vDm 644 ftdetect/*.vim \
    -t "${pkgdir}/usr/share/vim/vimfiles/ftdetect/"
  install -vDm 644 ftplugin/*.vim \
    -t "${pkgdir}/usr/share/vim/vimfiles/ftplugin/"
  install -vDm 644 indent/*.vim -t "${pkgdir}/usr/share/vim/vimfiles/indent/"
  install -vDm 644 syntax/*.vim \
    -t "${pkgdir}/usr/share/vim/vimfiles/syntax/"
  install -vDm 644 ansible.snippets \
    -t "${pkgdir}/usr/share/vim/vimfiles/UltiSnips/"
  install -vDm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
  install -vDm 644 syntax/*.vim_LICENSE \
    -t "${pkgdir}/usr/share/licenses/${pkgname}"
  install -vDm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
}