From fe8d48ab69738f9d6c9e6d128161f3b0cfff56f1 Mon Sep 17 00:00:00 2001 From: Cedric Girard Date: Tue, 31 Jan 2012 11:46:02 +0100 Subject: [PATCH] vim-numbertoggle new PKGBUILD --- pkgbuild/vim-numbertoggle/PKGBUILD | 40 ++++++++++++++++++++++++ pkgbuild/vim-numbertoggle/vimdoc.install | 14 +++++++++ 2 files changed, 54 insertions(+) create mode 100644 pkgbuild/vim-numbertoggle/PKGBUILD create mode 100644 pkgbuild/vim-numbertoggle/vimdoc.install diff --git a/pkgbuild/vim-numbertoggle/PKGBUILD b/pkgbuild/vim-numbertoggle/PKGBUILD new file mode 100644 index 0000000..038cfc7 --- /dev/null +++ b/pkgbuild/vim-numbertoggle/PKGBUILD @@ -0,0 +1,40 @@ +# Maintainer: Cedric Girard + +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" +} + diff --git a/pkgbuild/vim-numbertoggle/vimdoc.install b/pkgbuild/vim-numbertoggle/vimdoc.install new file mode 100644 index 0000000..4bf6316 --- /dev/null +++ b/pkgbuild/vim-numbertoggle/vimdoc.install @@ -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 +}