aboutsummaryrefslogtreecommitdiffstats
path: root/main/vim/APKBUILD
blob: 7f517c5d19ecd88badc064057a620887b124f4f7 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=vim
pkgver=7.3.003
_srcver=${pkgver%.*}
_patchver=${pkgver##*.}
pkgrel=0
pkgdesc="advanced text editor"
url="http://www.vim.org"
arch="x86 x86_64"
license='GPL'
depends=
makedepends="ncurses-dev lua-dev"
subpackages="$pkgname-doc"

# use "abuild patchlist >> APKBUILD" to generate the list of patches
source="ftp://ftp.vim.org/pub/vim/unix/vim-${_srcver}.tar.bz2
	ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.001
	ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.002
	ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.003
	vimrc
	"

# this generates the patches list
patchlist() {
	local i j
	for i in $(seq 1 $_patchver); do
		local v=$(printf "%0.3i" $i)
		echo -e "\tftp://ftp.vim.org/pub/vim/patches/$_srcver/$_srcver.$v"
	done
}

_builddir="$srcdir"/${pkgname}73
prepare() {
	local i
	cd "$_builddir"

	for i in $source ; do
		case $i in
		*.patch)
			msg "Applying $i"
			patch -p0 < $i || return 1
			;;
		esac
	done

	# Read vimrc from /etc/vim
        echo '#define SYS_VIMRC_FILE "/etc/vim/vimrc"' >> src/feature.h
}

build() {
	cd "$_builddir"
	./configure --prefix=/usr \
		--enable-luainterp \
		--without-x \
		--disable-nls
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir/" install
	install -D "$srcdir"/vimrc "$pkgdir"/etc/vim/vimrc
}

md5sums="5b9510a17074e2b37d8bb38ae09edbf2  vim-7.3.tar.bz2
aa5582d8289b43255f45d4bb6f62e140  7.3.001
2949cbdfe86f533c487fd144c5935c7a  7.3.002
9059db41cf3a468935745242cb9c0514  7.3.003
97aecde2ab504e543a96bec84b3b5638  vimrc"