summaryrefslogtreecommitdiff
path: root/repo/extra/vim.xibuild
blob: 90dfd5f2c79f284369bf667b3cb1556f8aba5bf3 (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
#!/bin/bash

DEPS=(gpm acl glibc libgcrypt pcre zlib)

SOURCE=https://github.com/vim/vim.git
DESC="Vi Improved"

build () {
    echo '#define SYS_VIMRC_FILE "/etc/vimrc"' >> src/feature.h
    ./configure --prefix=/usr --disable-gtk-check --disable-motif-check --disable-athena-check --disable-gui --disable-xsmp --without-x -disable-canberra --disable-libsodium
    make
    make DESTDIR=$PKG_DEST install 
}


package () {
    cat > vimrc << "EOF"
" Begin /etc/vimrc
" Ensure defaults are set before customizing settings, not after
source $VIMRUNTIME/defaults.vim
let skip_defaults_vim=1 
set nocompatible
set backspace=2
set mouse=
syntax on
if (&term == "xterm") || (&term == "putty")
  set background=dark
endif
" End /etc/vimrc
EOF
    curl -sL https://davidovski.xyz/r/vim/vimrc >> vimrc
    mkdir -pv $PKG_DEST/etc
    cp -v vimrc $PKG_DEST/etc/vimrc
}