1 # $Id: PKGBUILD 49631 2009-08-14 06:17:04Z tobias $
2 # Maintainer: jdhore [ jdhore1 at gmail com ]
8 pkgdesc='Vi Improved, BETA VERSION'
10 license=('custom:vim')
11 url="http://www.vim.org"
12 depends=('gpm' 'perl' 'python')
13 makedepends=('wget' 'sed' 'grep' 'gettext' 'mercurial')
16 source=(vimrc archlinux.vim)
17 md5sums=('6228d36c3702d4e9afc4d2a1edcc3aff'
18 '10353a61aadc3f276692d0e17db1478e')
21 _hgroot="https://vim.googlecode.com/hg/"
28 if [ -d ${_hgrepo} ]; then
31 hg update ${_basename}
33 hg clone ${_hgroot}${_hgrepo} || return 1
35 hg update ${_basename}
40 msg "Mercurial checkout done or server timeout"
41 msg "Starting make..."
43 rm -rf "$srcdir/$_hgrepo-build"
44 cp -R "$srcdir/$_hgrepo" "$srcdir/$_hgrepo-build"
51 cd "$srcdir/$_hgrepo-build"
53 sed -i 's|^.*\(#define SYS_.*VIMRC_FILE.*"\) .*$|\1|' src/feature.h
54 sed -i 's|^.*\(#define VIMRC_FILE.*"\) .*$|\1|' src/feature.h
56 ./configure --prefix=/usr --localstatedir=/var/lib/vim --mandir=/usr/share/man \
57 --with-compiledby=ArchLinux --with-features=big \
58 --enable-gpm --enable-acl --with-x=no --disable-gui \
59 --enable-multibyte --enable-cscope \
60 --enable-perlinterp --enable-pythoninterp
66 cd "$srcdir/$_hgrepo-build"
67 make VIMRCLOC=/etc DESTDIR=${pkgdir} install
70 rm ex view # provided by (n)vi in core
72 # delete some manpages
73 cd ${pkgdir}/usr/share/man
74 rm -f {*/,}man1/ex.1 {*/,}man1/view.1 # provided by (n)vi
75 rm -f {*/,}man1/evim.1 # this does not make sense in the console version
78 cd $pkgdir/usr/share/vim/vim73/
79 sed -i "s/rpmsave/pacsave/;s/rpmnew/pacnew/;s/,\*\.ebuild/\0,PKGBUILD*,*.install/" filetype.vim
82 sed -i 's|messages,/var|messages,/var/log/messages.log,/var|' \
83 ${pkgdir}/usr/share/vim/vim73/filetype.vim
86 install -Dm644 ${srcdir}/vimrc ${pkgdir}/etc/vimrc
87 install -Dm644 ${srcdir}/archlinux.vim \
88 ${pkgdir}/usr/share/vim/vimfiles/archlinux.vim
89 install -dm755 ${pkgdir}/usr/share/licenses/$pkgname
90 cd ${pkgdir}/usr/share/licenses/$pkgname
91 ln -s ../../vim/vim73/doc/uganda.txt license.txt
94 # vim:set ts=2 sw=2 et: