summaryrefslogtreecommitdiffstats
path: root/main/vim/APKBUILD
blob: 6c05b256390a5a9517f7add30ab91b0816dd6ab8 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=vim
_srcver=7.3
_patchver=
pkgver=7.3
pkgrel=0
pkgdesc="advanced text editor"
url="http://www.vim.org"
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
	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 \
		--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
97aecde2ab504e543a96bec84b3b5638  vimrc"