aboutsummaryrefslogtreecommitdiffstats
path: root/main/vim/APKBUILD
blob: 8e3c9a9f79679b8f063679fcead9a673d805c56a (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
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=vim
pkgver=7.4.1831
pkgrel=1
pkgdesc="advanced text editor"
url="http://www.vim.org"
arch="all"
license="custom"
depends=""
makedepends="ncurses-dev lua5.2-dev python3-dev"
subpackages="$pkgname-doc ${pkgname}diff"
source="$pkgname-$pkgver.tar.gz::https://github.com/$pkgname/$pkgname/archive/v$pkgver.tar.gz
	vimrc
	"

_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
	cd "$_builddir"
	# Read vimrc from /etc/vim
	echo '#define SYS_VIMRC_FILE "/etc/vim/vimrc"' >> src/feature.h
}

build() {
	cd "$_builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--enable-luainterp \
		--enable-python3interp=dynamic \
		--without-x \
		--disable-nls \
		--enable-multibyte \
		--enable-gui=no \
		--with-lua-prefix=/usr/lua5.2 \
		--with-compiledby="Alpine Linux" \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make -j1 DESTDIR="$pkgdir/" install

	install -Dm644 runtime/doc/uganda.txt \
		"$pkgdir/usr/share/licenses/$pkgname/LICENSE" || return 1
	install -Dm644 "$srcdir"/vimrc "$pkgdir"/etc/vim/vimrc || return 1
}

vimdiff() {
	pkgdesc="view file diffs in vim"
	arch="noarch"
	depends="diffutils"

	install -d "$subpkgdir"/usr/bin || return 1
	mv "$pkgdir"/usr/bin/vimdiff "$subpkgdir"/usr/bin
}

md5sums="95e9b459dd52e92011f1438c7a7b2435  vim-7.4.1831.tar.gz
97aecde2ab504e543a96bec84b3b5638  vimrc"
sha256sums="e5b7e5acd84e1430f9b9bc51006a57defaaf2678f875c73bb323ec5492041d77  vim-7.4.1831.tar.gz
7ac7e5fd75fe315fd8b3ca4172056ebb9f06df0b5985d3ff88133dfcdd87076b  vimrc"
sha512sums="a424d19409ba3b25438bd929a18b19a05913dc227996406c090cda29b69e90bf0e8358036602f3dffac01dddaa1ecbbbd832fa02515a250a664f77b24631f9fe  vim-7.4.1831.tar.gz
d9586b777881973cb5e48e18750336a522ed72c3127b2d6b6991e2b943468ca5b694476e7fa39ab469178c1375fc8f52627484e0fe377aea5811a513e35a7b02  vimrc"