vim-numbertoggle new PKGBUILD
This commit is contained in:
parent
8d495edc6d
commit
fe8d48ab69
2 changed files with 54 additions and 0 deletions
40
pkgbuild/vim-numbertoggle/PKGBUILD
Normal file
40
pkgbuild/vim-numbertoggle/PKGBUILD
Normal 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"
|
||||||
|
}
|
||||||
|
|
14
pkgbuild/vim-numbertoggle/vimdoc.install
Normal file
14
pkgbuild/vim-numbertoggle/vimdoc.install
Normal 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
|
||||||
|
}
|
Loading…
Reference in a new issue