# Description:  a vim like text editor
# URL:  https://github.com/martanne/vis
# Maintainer:  z3bra <dev at z3bra dot org>
# Depends on: ncurses libtermkey lpeg

name=vis
version=git-cad2b9a
release=1
source=

gitsource=https://github.com/martanne/vis

build() {
	cd $PKGMK_SOURCE_DIR
	
	if cd $name; then
		git reset --hard
		git pull $gitsource
		rm -f config.h
	else
		git clone $gitsource $name
		cd $name
	fi
	
	git checkout $sversion
	
	./configure --prefix=/usr
	make
	make DESTDIR=$PKG PREFIX=/usr MANPREFIX=/usr/share/man install
	mkdir -p $PKG/etc/vis
	cp lua/visrc.lua $PKG/etc/vis/visrc.lua
	chmod 644 $PKG/etc/vis/visrc.lua
}
