updated on Thu Jan 26 12:02:26 UTC 2012
[aur-mirror.git] / vimmpc-git / PKGBUILD
blob3b628d9e920ac4cb1c0034c7c3516816b10c354f
1 # Maintainer: wido <widomaker2k7@gmail.com>
3 pkgname=vimmpc-git
4 _pkgname=vimmpc
5 pkgver=20101020
6 pkgrel=1
7 pkgdesc="MPD controller from within Vim"
8 url="http://gavin.brokentrain.net/projects/vimmpc/"
9 license=("GPL")
10 arch=('any')
11 conflicts=('vimmpc')
12 provides=('vimmpc')
13 depends=('mpc' 'gvim' 'python-mpd' 'python2')
14 install=vimdoc.install
15 #source=(http://svn.navi.cx/misc/trunk/python/bemused/mpdclient2.py)
16 md5sums=()
18 _gitroot="git://github.com/gaving/vimmpc.git"
19 _gitname="vimmpc"
21 build() {
22   cd $srcdir
23   msg "Connecting to the GIT server...."
25   if [[ -d $srcdir/$_gitname ]] ; then
26     cd $_gitname
27     git pull origin
28     msg "The local files are updated."
29   else
30     git clone $_gitroot $_gitname
31   fi
33   msg "GIT checkout done"
34   msg "Starting make..."
36   git clone $srcdir/$_gitname $srcdir/$_gitname-build
38   cd ${srcdir}
39     # python2 fix
40     for file in $(find . -name '*.py' -print); do
41     sed -i 's_^#!.*/usr/bin/python_#!/usr/bin/python2_' $file
42     sed -i 's_^#!.*/usr/bin/env.*python_#!/usr/bin/env python2_' $file
43     done
45   cd $srcdir/$_gitname-build
46     install -d ${pkgdir}/usr/share/vim/vimfiles/plugin/
47     sed -i 's/function TrackFoldText/function! TrackFoldText/g' $_pkgname.vim
48     install -Dm 755 $_pkgname.{vim,py} ${pkgdir}/usr/share/vim/vimfiles/plugin/