# Maintainer: Natanael Copa pkgname=cgit pkgver=0.10 pkgrel=0 _gitver=1.8.5 pkgdesc="A fast webinterface for git" url="http://git.zx2c4.com/cgit/" arch="all" license="GPL2" makedepends="openssl-dev zlib-dev lua5.2-dev" depends="" source=" http://git.zx2c4.com/cgit/snapshot/cgit-$pkgver.tar.xz http://git-core.googlecode.com/files/git-$_gitver.tar.gz lua.patch " _makeopts="NO_ICONV=YesPlease NO_GETTEXT=YesPlease NO_TCLTK=YesPlease NO_SVN_TESTS=YesPlease LUA_PKGCONFIG=lua5.2 prefix=/usr" prepare() { cd "$srcdir/$pkgname-$pkgver" # check that upstream git ver corresponds with our local _ver=$(awk -F'[ \t]*=[ \t]*' '/^GIT_VER/ { print $2 }' Makefile) if [ "$_ver" != "$_gitver" ]; then error "Please set _gitver in APKBUILD to $_ver" return 1 fi rm -rf git mv ../git-$_gitver git for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done } build() { cd "$srcdir/$pkgname-$pkgver" make $_makeopts } package() { cd "$srcdir/$pkgname-$pkgver" make $_makeopts DESTDIR="$pkgdir" \ CGIT_SCRIPT_PATH=/usr/share/webapps/cgit \ install ln -s cgit.cgi "$pkgdir"/usr/share/webapps/cgit/cgit } md5sums="19944c17ecea1b1d1944718ce8ce6b61 cgit-0.10.tar.xz 16448b1cfd62fcbe738729edc6279e14 git-1.8.5.tar.gz 6f9e6e41671ccfaa2814912ac828ed1d lua.patch" sha256sums="90c4227b7889bb268825b36e8a53cb7695895a6d63523b6ad34a670ad4e6de7a cgit-0.10.tar.xz 870f52e19bb599b2835455e62db10e4c693fdbcc154f7802512d74393cc26b23 git-1.8.5.tar.gz 2d0defeea43644e560a1f0fc4713b528b10f8b929dda81fdf9fafb9068f7f921 lua.patch" sha512sums="c00c5a9443774a58a64b0133ab1a7d9771ddf9cee53e09492ff87e79a113593ec918bdb41e60b5e12e2c455575c031d83d056fb805bbdc2c2b158178ab4f3b57 cgit-0.10.tar.xz 3ecb2ab82ed6b98e4b1400c057a837947e36900b25f7758fd4cbca7814d6d882ecbc7502b2e3cb3b1808536f333706151129f331406e1806351125e53a7d13bc git-1.8.5.tar.gz 2e1ea885787984a886c29f9702f0d94924918932f1fa4f98084943bee8f8a94f36bd5f911b2a45c4997ddb7f242de5260fc4180ec8c293d2bc21b5e00d21fad0 lua.patch"