updated on Mon Jan 16 00:01:41 UTC 2012
[aur-mirror.git] / vim73-hg / PKGBUILD
blob52f2df5c422832a6836dcedef7c3149a871e322d
1 # $Id: PKGBUILD 49631 2009-08-14 06:17:04Z tobias $
2 # Maintainer: jdhore [ jdhore1 at gmail com ]
4 pkgname=vim73-hg
5 _basename=vim73
6 pkgver=2571
7 pkgrel=1
8 pkgdesc='Vi Improved, BETA VERSION'
9 arch=(i686 x86_64)
10 license=('custom:vim')
11 url="http://www.vim.org"
12 depends=('gpm' 'perl' 'python')
13 makedepends=('wget' 'sed' 'grep' 'gettext' 'mercurial')
14 conflicts=(vim)
15 provides=(vim=7.3)
16 source=(vimrc archlinux.vim)
17 md5sums=('6228d36c3702d4e9afc4d2a1edcc3aff'
18          '10353a61aadc3f276692d0e17db1478e')
19 backup=(etc/vimrc)
21 _hgroot="https://vim.googlecode.com/hg/"
22 _hgrepo="vim"
24 fetch() {
25   # update source
26   cd $srcdir
28   if [ -d ${_hgrepo} ]; then
29     cd $srcdir/${_hgrepo}
30     hg pull -u
31     hg update ${_basename}
32   else
33     hg clone ${_hgroot}${_hgrepo} || return 1
34     cd $srcdir/${_hgrepo}
35     hg update ${_basename}
36   fi
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"
47 build()
49   fetch
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
55   # build party
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
62   make || return 1
65 package() {
66   cd "$srcdir/$_hgrepo-build"
67   make VIMRCLOC=/etc DESTDIR=${pkgdir} install
69   cd "$pkgdir/usr/bin"
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
77   # patch runtime
78   cd $pkgdir/usr/share/vim/vim73/
79   sed -i "s/rpmsave/pacsave/;s/rpmnew/pacnew/;s/,\*\.ebuild/\0,PKGBUILD*,*.install/" filetype.vim
81   # fix FS#17216
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: