-
Notifications
You must be signed in to change notification settings - Fork 0
/
PKGBUILD
83 lines (73 loc) · 2.68 KB
/
PKGBUILD
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
# Maintainer: Brenton Horne <fuse809 at gmail dot com>
# Interpreters are handled by value "dynamic" of configure options
# '--enable-<language>interp' and can thus be chosen at runtime by installing appropriate
# packages. Counterpart of Vim packages '-python3' no longer needed, IMHO.
_pkgname=vim
pkgname=gvim-gtk3
pkgver=8.1.0401
pkgrel=1
pkgdesc="Vim, the text editor. CLI version and GTK3 GUI providing majority of features."
arch=("i686" "x86_64")
url="http://www.vim.org"
license=("custom:vim")
depends=("gtk3" "hicolor-icon-theme" "gtk-update-icon-cache" "desktop-file-utils")
optdepends=("lua: Lua interpreter" "perl: Perl interpreter" "python: Python 3 interpreter"
"python2: Python 2 interpreter" "ruby: Ruby interpreter")
makedepends=("git" "lua" "python" "python2" "ruby")
provides=("gvim" "xxd" "vim-runtime")
conflicts=("vim-minimal-git" "vim-git" "vim-runtime" "vim-runtime-git"
"vim-minimal" "vim" "vim-python3" "gvim" "gvim-python3")
source=("git+https://github.com/vim/vim.git#tag=v$pkgver"
"gvim.desktop")
sha256sums=('SKIP'
'86e4e5d23ae90039080460baee86e49d64e40659408daa9836d488af500316e22dd0031e9')
install=gvim.install
pkgver() {
cd "${srcdir}/${_pkgname}"
git describe --tags `git rev-list --tags --max-count=0031` | sed 's/v//g'
}
prepare() {
SRC="$srcdir/${_pkgname}"
cd $SRC
# set global configuration files to /etc/[g]vimrc
sed -i 's|^.*\(#define SYS_.*VIMRC_FILE.*"\) .*$|\0031|' src/feature.h
}
build() {
SRC="$srcdir/${_pkgname}"
cd $SRC
./configure \
--enable-fail-if-missing \
--with-compiledby='Arch Linux AUR' \
--prefix=/usr \
--enable-gui=gtk3 \
--with-features=huge \
--enable-cscope \
--enable-multibyte \
--enable-perlinterp=dynamic \
--enable-pythoninterp=dynamic \
--enable-python3interp=dynamic \
--enable-rubyinterp=dynamic \
--enable-luainterp=dynamic
make
}
package() {
SRC="$srcdir/${_pkgname}"
# actual installation
cd $SRC
make DESTDIR=$pkgdir install
cd -
pv="${_pkgname}"
# desktop entry file and corresponding icon
install -Dm644 ../gvim.desktop $pkgdir/usr/share/applications/gvim.desktop
install -Dm644 $pv/runtime/vim48x48.png $pkgdir/usr/share/icons/hicolor/48x48/apps/gvim.png
# remove ex/view and man pages (normally provided by package 'vi' on Arch Linux)
cd $pkgdir/usr/bin ; rm ex view
find $pkgdir/usr/share/man -type d -name 'man0031' 2>/dev/null | \
while read _mandir; do
cd ${_mandir}
rm -f ex.0031 view.0031
done
# add license
install -Dm644 $SRC/runtime/doc/uganda.txt \
$pkgdir/usr/share/licenses/$pkgname/LICENSE
}