summaryrefslogtreecommitdiffstats
path: root/vim/PKGBUILD
blob: 6e938c8c5819b43fb69cc96b82afb38032cd66fa (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
67
68
69
# $Id$
# Maintainer: tobias [ tobias at archlinux org ]

pkgname=vim
_srcver=7.2
_patchlevel=108
pkgver=${_srcver}.${_patchlevel}
pkgrel=1.1
pkgdesc="a highly configurable, improved version of the vi text editor"
arch=(i686 x86_64)
license=('custom:vim')
url="http://www.vim.org"
depends=("vi>=${pkgver}" 'perl' 'acl' 'gpm>=1.20.4' 'libxt' 'python')
makedepends=('wget' 'sed' 'grep')
backup=(etc/vimrc)
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)

build()
{
  # pull in patches from vim.org (or the src cache alternatively)
  . ${startdir}/src/fetch_patches.sh
  get_patches || return 1
  cd ${startdir}/src/vim$(echo ${_srcver} | sed "s/\.//")
  sed -i 's|^.*\(#define SYS_.*VIMRC_FILE.*"\) .*$|\1|' src/feature.h
  # build party
  ./configure --prefix=/usr --localstatedir=/var/lib/vim --mandir=/usr/share/man \
    --with-compiledby=ArchLinux --with-features=big \
    --with-x=yes --disable-gui \
    --with-global-runtime=/usr/share/vim --with-vim-name=vim \
    --enable-multibyte --enable-cscope \
    --enable-perlinterp --enable-pythoninterp 
  make || return 1
  make  VIMRCLOC=/etc DESTDIR=${startdir}/pkg VIMRTDIR= install
  cd ${startdir}/pkg/usr/bin
  rm -f ex view rview xxd vimtutor
  ln -s vitutor vimtutor

   # delete the manpages/symlinks provided by vi package
  find ${startdir}/pkg/usr/share/man -type d -name 'man1' 2> /dev/null | \
   while read mandir; do
    cd ${mandir}
    mv vimdiff.1 vimdiff.org
    rm -f *.1
    ln -s rvi.1.gz rvim.1.gz
    ln -s vi.1.gz vim.1.gz
    ln -s vitutor.1.gz vimtutor.1.gz
    mv vimdiff.org vimdiff.1
  done

  # kill the nobackup parts
  sed -i '/vms/,+4 d' ${startdir}/pkg/usr/share/vim/vimrc_example.vim
  install -Dm644 ${startdir}/pkg/usr/share/vim/vimrc_example.vim \
    ${startdir}/pkg/etc/vimrc
  # clean all settings and controls -  served by vi package
  rm -rf ${startdir}/pkg/usr/share/vim
}
md5sums=('f0901284b338e448bfd79ccca0041254'
         '35e04482f07c57221c9a751aaa3b8dac'
         'd8884786979e0e520c112faf2e176f05'
         'f16f81339ea02b6e1a736264861b7fad')
sha512sums=('e33bfb1b86b769ff4980bc48b9dc70db64c5a44d487206a387cfaefef98fbfee70359e625487c6891f64758bbea5502b2b97104cfa6eb6829a68073ae26a70b6'
            'bcf5d384002a9e9be6d84f5aeb802c3e16e17806d1c87f6687c52b3ce34684f8ad4c1aa5d67810a3205265dd401a1061ad2d0e2fc095de32391c159f6ba04e1a'
            '939571d34b941b1394a49515b359a7606adf8051079492f497d4ead64f58e287ea5ed695473db8ec1f90fdfe57b028f574c6541417025b468d1818ce0bfd9f5a'
            '7e94b6235e35c9b894863925d3a52a4723dbc9956989636c337776c0f327aaf183a6e16e91e1841c6618a9fc91a798253fbc5d95c94379a93da323f4cd4f2306')