[ create a new paste ] login | about

Link: http://codepad.org/DeLl9joR    [ raw code | fork ]

Plain Text, pasted on Aug 28:
pkgname=eihort
pkgver=0.3.10
pkgrel=3
pkgdesc='A OpenGL world renderer for minecraft with a really long view distance'
license=('BSD')
url="http://www.minecraftforum.net/topic/438878-/"
arch=('i686' 'x86_64')
depends=("lua")
makedepends=("mercurial")

build() {
	cd "${srcdir}"
	if [ -d ${pkgname} ]; then
		if [ -d ${pkgname}-build ]; then
			rm -r ${pkgname}-build
		fi
	else 
		hg clone -r 1aad1304475a https://bitbucket.org/lloigor/eihort/
	fi

	hg clone ${pkgname} ${pkgname}-build

	cd ${pkgname}-build
	sed -i 's|python|python2|;s|lua5.1|lua|' makefile.gnu
	unset CFLAGS
	unset CXXFLAGS
	make -f makefile.gnu ${pkgname}-${pkgver}-linux-$(uname -m)
}

package() {
	cd "$pkgdir"
	
	mkdir -p "usr/share/$pkgname/"
	cp "${srcdir}"/${pkgname}-build/deploy/* usr/share/$pkgname/
	cp "${srcdir}"/${pkgname}-build/${pkgname}-${pkgver}-linux-$(uname -m) usr/share/$pkgname/

	mkdir -p "usr/bin"
	cat > "usr/bin/$pkgname" <<EOF
#!/bin/sh
cd /usr/share/$pkgname/
./${pkgname}-${pkgver}-linux-$(uname -m) "\$@"
EOF
	chmod +x "usr/bin/$pkgname"
}



Create a new paste based on this one


Comments: