# $Id: PKGBUILD 72195 2012-06-10 11:11:42Z lfleischer $
# Maintainer: Kaiting Chen <kaitocracy@gmail.com>
# Maintainer: Aaron Schaefer <aaron@elasticdog.com>

pkgname=vim-supertab
pkgver=2.0
_sourceid=18075
pkgrel=1
pkgdesc='A Vim plugin that allows you to use the tab key to do all insert completion.'
arch=('any')
url='http://www.vim.org/scripts/script.php?script_id=1643'
license=('BSD')
depends=('vim')
install=vimdoc.install
source=("supertab.vmb::http://www.vim.org/scripts/download_script.php?src_id=$_sourceid"
        'LICENSE')
md5sums=('59ed0d264aed4f9dc6d198c1b9fcac27'
         'a232f3fa724b2e52e1678adcc84f67bb')

build() {
  cd "$srcdir"

  # extract the vimball
  /usr/bin/vim -n -i NONE -c ":UseVimball $srcdir" -c ":q" ./supertab.vmb

  installpath="$pkgdir/usr/share/vim/vimfiles"

  install -Dm0644 doc/supertab.txt "$installpath/doc/supertab.txt"
  install -Dm0644 plugin/supertab.vim "$installpath/plugin/supertab.vim"
  install -Dm0644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
