summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6f359f6f5c13a4a61566fed92d3034484b534a79 (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
# Contributor: Daniel YC Lin <dlin (at) gmail>
# Maintainer: Daniel YC Lin <dlin.tw at gmail>

pkgname=vim-tabular-git
pkgver=1.0.0.r1.g00e1e7f
pkgrel=1
pkgdesc="Vim script for text filtering and alignment"
arch=('any')
url="https://github.com/godlygeek/tabular"
license=('custom:BSD 3-Clause')
makedepends=('git')
depends=('vim')
provides=('vim-tabular')
install=vim-plugin.install
source=('repo::git+https://github.com/godlygeek/tabular.git')
md5sums=('SKIP')
pkgver() {
  cd "$srcdir/repo"
  ( set -o pipefail
    git describe --long --tags 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  )
}
package() {
    cd $srcdir/repo

    install -dm755 $pkgdir/usr/share/vim/vimfiles/after/plugin
    install -dm755 $pkgdir/usr/share/vim/vimfiles/{autoload,doc,plugin}

    install -Dm644 after/plugin/*  $pkgdir/usr/share/vim/vimfiles/after/plugin/
    install -Dm644 autoload/* $pkgdir/usr/share/vim/vimfiles/autoload/
    install -Dm644 doc/*    $pkgdir/usr/share/vim/vimfiles/doc/
    install -Dm644 plugin/*            $pkgdir/usr/share/vim/vimfiles/plugin/

    sed -n '/License:/,/ DAMAGE/p' plugin/Tabular.vim > LICENSE

    install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
}