summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a34e91541573fedbad37a42a3b8006ffe02121e1 (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: Petron <petron@archlinuxcn.org>
pkgname=vim-tern
pkgver=94.3cffc28
pkgrel=2
pkgdesc="Tern plugin for Vim"
arch=('any')
url="https://github.com/ternjs/tern_for_vim"
license=('MIT')
depends=('vim' 'nodejs' 'npm')
makedepends=('git')
source=("git+https://github.com/ternjs/tern_for_vim")
sha256sums=('SKIP')
_gitname='tern_for_vim'

pkgver() {
    cd $_gitname
    echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
    cd $srcdir/$_gitname
    npm install
}

package() {
    cd $srcdir/$_gitname
    mkdir -p $pkgdir/usr/share/vim/vimfiles
    rm -f README.md package.json
    cp -r * $pkgdir/usr/share/vim/vimfiles
}