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