1 # $Id: PKGBUILD,v 1.20 2008/01/14 04:30:46 eric Exp $
2 # Maintainer: tobias [ tobias at archlinux org ]
7 pkgver=${_srcver}.${_patchlevel}
9 pkgdesc="a highly configurable, improved version of the vi text editor (basic version)"
11 license=('custom:vim')
12 url="http://www.vim.org"
14 depends=('glibc' 'ncurses' 'coreutils')
15 makedepends=('wget' 'sed' 'grep')
17 install=${pkgname}.install
18 # we need the extra-stuff to get all patches applied smoothly
19 source=(ftp://ftp.vim.org/pub/vim/unix/vim-${_srcver}.tar.bz2 \
20 ftp://ftp.vim.org/pub/vim/extra/vim-${_srcver}-extra.tar.gz \
21 ftp://ftp.vim.org/pub/vim/extra/vim-${_srcver}-lang.tar.gz \
22 fetch_patches.sh fetch_runtime.sh)
23 md5sums=('44c6b4914f38d6f9aa959640b89da329' '605cc7ae31bcc9d7864bb0bb6025f55d' \
24 '144aa049ba70621acf4247f0459f3ee7' '0fbebfbf8464b1e65fb6a9ca4bddefe1' \
25 '92e3dc8844d446c1ecd28e7257a47cb7')
27 # pull in patches from vim.org (or the src cache alternatively) cd ${startdir}/src/vim$(echo ${_srcver} | sed "s/\.//")
28 . ${startdir}/fetch_patches.sh
29 . ${startdir}/fetch_runtime.sh
30 get_patches || return 1
31 cd ${startdir}/src/vim$(echo ${_srcver} | sed "s/\.//")
36 # set the virc different from vimrc
37 sed -i 's|^.*\(#define SYS_VIMRC_FILE.*"\) .*$|\1|' src/feature.h
38 sed -i 's|^.*\(#define VIMRC_FILE.*"\) .*$|\1|' src/feature.h
39 sed -i 's|^.*\(#define USR_VIMRC_FILE\t"\).*$|\1$HOME/.virc"|' src/feature.h
40 sed -i 's|/etc/vimrc|/etc/virc|' src/feature.h
41 sed -i 's|\.vimrc|.virc|' src/feature.h
43 ./configure --prefix=/usr --localstatedir=/var/lib/vim \
44 --with-compiledby=ArchLinux --with-features=normal \
45 --with-global-runtime=/usr/share/vim --with-vim-name=vi \
46 --disable-gpm --disable-acl --with-x=no --disable-gui --enable-multibyte
48 make VIMRCLOC=/etc DESTDIR=${startdir}/pkg VIMRTDIR= install
49 cd ${startdir}/pkg/usr/bin
50 rm -f vim rvim view rview
53 _runtimedir="${startdir}/pkg/usr/share/vim/"
55 # kill vim and x specific stuff
56 sed -i '/vms/,+4 d;/Convenient command/,+3 d;/mouse work/,+2 d'\
57 ${startdir}/pkg/usr/share/vim/vimrc_example.vim
58 install -Dm644 ${startdir}/pkg/usr/share/vim/vimrc_example.vim \
59 ${startdir}/pkg/etc/virc
60 rm -f ${startdir}/pkg/usr/share/vim/gvimrc_example.vim
61 install -dm755 ${startdir}/pkg/usr/share/licenses/vim
62 cd ${startdir}/pkg/usr/share/licenses/vim
63 ln -s ../../vim/doc/uganda.txt license.txt