vim-numbertoggle new PKGBUILD

This commit is contained in:
Cedric Girard 2012-01-31 11:46:02 +01:00
parent 8d495edc6d
commit fe8d48ab69
2 changed files with 54 additions and 0 deletions

View File

@ -0,0 +1,40 @@
# Maintainer: Cedric Girard <girard.cedric@gmail.com>
pkgname=vim-numbertoggle-git
pkgver=20120131
pkgrel=1
pkgdesc="Toggles between relative and absolute line numbers automatically"
arch=('any')
url="https://github.com/jeffkreeftmeijer/vim-numbertoggle"
license=('unknown')
depends=(vim)
groups=('vim-plugins')
install=vimdoc.install
_gitroot="https://github.com/jeffkreeftmeijer/vim-numbertoggle.git"
_gitname="vim-numbertoggle"
build() {
cd "$srcdir"
msg "Connecting to GIT server...."
if [[ -d "$_gitname" ]]; then
cd "$_gitname" && git pull origin
msg "The local files are updated."
else
git clone "$_gitroot" "$_gitname"
fi
msg "GIT checkout done or server timeout"
}
package() {
cd "$srcdir/$_gitname"
install -d "${pkgdir}/usr/share/vim/vimfiles/doc"
install -d "${pkgdir}/usr/share/vim/vimfiles/plugin"
install -m644 -D plugin/number_toggle.vim "${pkgdir}/usr/share/vim/vimfiles/plugin"
install -m644 -D doc/numbertoggle.txt "${pkgdir}/usr/share/vim/vimfiles/doc"
}

View File

@ -0,0 +1,14 @@
post_install() {
echo -n "Updating vim help tags..."
/usr/bin/vim --noplugins -u NONE -U NONE \
--cmd ":helptags /usr/share/vim/vimfiles/doc" --cmd ":q" > /dev/null 2>&1
echo "done."
}
post_upgrade() {
post_install $1
}
post_remove() {
post_install
}