blob: 5d6d984970bfa1bcd4d70ac7c0e34a40af77b25b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
# $Id: PKGBUILD 17437 2008-10-29 18:56:25Z tobias $
# Maintainer: tobias [ tobias at archlinux org ]
pkgname=vi
_srcver=7.2
_patchlevel=65
pkgver=${_srcver}.${_patchlevel}
pkgrel=1
pkgdesc="a highly configurable, improved version of the vi text editor (basic version)"
arch=(i686 x86_64)
license=('custom:vim')
url="http://www.vim.org"
groups=('base')
depends=('glibc' 'ncurses' 'coreutils')
makedepends=('wget' 'sed' 'grep' 'gettext')
backup=(etc/virc)
install=${pkgname}.install
# we need the extra-stuff to get all patches applied smoothly
source=(ftp://ftp.vim.org/pub/vim/unix/vim-${_srcver}.tar.bz2 \
ftp://ftp.vim.org/pub/vim/extra/vim-${_srcver}-extra.tar.gz \
ftp://ftp.vim.org/pub/vim/extra/vim-${_srcver}-lang.tar.gz \
fetch_patches.sh fetch_runtime.sh)
md5sums=('f0901284b338e448bfd79ccca0041254' '35e04482f07c57221c9a751aaa3b8dac' \
'd8884786979e0e520c112faf2e176f05' 'a3b03cd44b8ed78a99850d4cbfaafe55' \
'92e3dc8844d446c1ecd28e7257a47cb7')
build()
{
# pull in patches from vim.org (or the src cache alternatively)
. ${startdir}/src/fetch_patches.sh
. ${startdir}/src/fetch_runtime.sh
get_patches || return 1
cd ${startdir}/src/vim$(echo ${_srcver} | sed "s/\.//")
# set the virc different from vimrc
sed -i 's|^.*\(#define SYS_VIMRC_FILE.*"\) .*$|\1|' src/feature.h
sed -i 's|^.*\(#define VIMRC_FILE.*"\) .*$|\1|' src/feature.h
sed -i 's|^.*\(#define USR_VIMRC_FILE\t"\).*$|\1$HOME/.virc"|' src/feature.h
sed -i 's|/etc/vimrc|/etc/virc|' src/feature.h
sed -i 's|\.vimrc|.virc|' src/feature.h
# build party
./configure --prefix=/usr --localstatedir=/var/lib/vim --mandir=/usr/share/man \
--with-compiledby=ArchLinux --with-features=normal \
--with-global-runtime=/usr/share/vim --with-vim-name=vi \
--disable-gpm --disable-acl --with-x=no --disable-gui --enable-multibyte
make || return 1
make VIMRCLOC=/etc DESTDIR=${startdir}/pkg VIMRTDIR= install
cd ${startdir}/pkg/usr/bin
rm -f vim rvim view rview vidiff
ln -s vi evi
# delete the manpages for vidiff, we don't bother with that symlink since vidiff doesn't work
find ${startdir}/pkg/usr/share/man -type d -name 'man1' 2> /dev/null | \
while read mandir; do
cd ${mandir}
rm -f vidiff.1
done
_runtimedir="${startdir}/pkg/usr/share/vim/"
update_runtime
install -Dm644 ${startdir}/pkg/usr/share/vim/vimrc_example.vim \
${startdir}/pkg/etc/virc
rm -f ${startdir}/pkg/usr/share/vim/gvimrc_example.vim
install -dm755 ${startdir}/pkg/usr/share/licenses/vim
cd ${startdir}/pkg/usr/share/licenses/vim
ln -s ../../vim/doc/uganda.txt license.txt
}
|