summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4e4f52c1f00f33ddc33b842608aaf0584f9acc7a (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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# Maintainer: Egor Kovetskiy <e.kovetskiy@office.ngs.ru>
# Maintainer: Mateusz Kaczanowski <kaczanowski.mateusz@gmail.com>
pkgbase='vim-git'
pkgname=('vim-git' 'vim-git-runtime')
pkgver=10985.5e5a98d7d
pkgrel=1
pkgdesc="VIM: Vi IMproved"
arch=('i686' 'x86_64')
url="http://github.com/vim/vim"
license=('GPL')
depends=('gpm' 'ruby' 'lua' 'python2' 'python' 'acl')
optdepends=()
backup=()
options=()
source=("git://github.com/vim/vim.git")
md5sums=('SKIP')

pkgver() {
    cd "vim"
    echo $(git rev-list --count master).$(git rev-parse --short master)
}

build() {
    cd "$srcdir/vim"

    sed -i 's|^.*\(#define SYS_.*VIMRC_FILE.*"\) .*$|\1|' src/feature.h
    sed -i 's|^.*\(#define VIMRC_FILE.*"\) .*$|\1|' src/feature.h

    (cd src && autoconf)

    # with-x=yes provides FEAT_XCLIPBOARD which provides FEAT_CLIENTSERVER
    ./configure \
        --prefix=/usr \
        --localstatedir=/var/lib/vim \
        --with-features=huge \
        --with-compiledby='Arch Linux' \
        --enable-gpm \
        --enable-acl \
        --with-x=yes \
        --disable-gui \
        --enable-multibyte \
        --enable-cscope \
        --enable-netbeans \
        --enable-perlinterp \
        --enable-pythoninterp \
        --disable-python3interp \
        --enable-rubyinterp \
        --enable-luainterp

    make
}

package_vim-git-runtime() {
  provides=('vim-runtime')
  conflicts=('vim-runtime')
  pkgdesc+=' (shared runtime)'
  optdepends=('sh: support for some tools and macros'
              'python: demoserver example tool'
              'gawk: mve tools upport')
  backup=('etc/vimrc')

  cd "$srcdir/vim"

  make -j1 VIMRCLOC=/etc DESTDIR="${pkgdir}" install
  # man and bin files belong to 'vim'
  rm -r "${pkgdir}"/usr/share/man/ "${pkgdir}"/usr/bin/

  # no desktop files and icons
  rm -r "${pkgdir}"/usr/share/{applications,icons}

  # license
  install -dm 755 "${pkgdir}"/usr/share/licenses/vim-runtime
  ln -s /usr/share/vim/vim${_versiondir}/doc/uganda.txt \
    "${pkgdir}"/usr/share/licenses/vim-runtime/license.txt
}

package_vim-git() {
  provides=('vim')
  conflicts=('vim')
  cd "$srcdir/vim"

  make -j1 VIMRCLOC=/etc DESTDIR="${pkgdir}" install

  rm "${pkgdir}"/usr/bin/{ex,view}

  find "${pkgdir}"/usr/share/man -type d -name 'man1' 2>/dev/null | \
    while read _mandir; do
    cd ${_mandir}
    rm -f ex.1 view.1
    rm -f evim.1
  done

  rm -r "${pkgdir}"/usr/share/vim

  install -Dm644 runtime/doc/uganda.txt \
    "${pkgdir}"/usr/share/licenses/${pkgname}/license.txt
}