# Contributor: Sören Tempel # Maintainer: Natanael Copa pkgname=cgit pkgver=1.1 pkgrel=3 _gitver=2.10.2 pkgdesc="A fast webinterface for git" url="https://git.zx2c4.com/cgit/" arch="all" license="GPL-2.0" makedepends="libressl-dev zlib-dev lua5.3-dev asciidoc" subpackages="$pkgname-doc" source="http://git.zx2c4.com/$pkgname/snapshot/$pkgname-$pkgver.tar.xz https://www.kernel.org/pub/software/scm/git/git-$_gitver.tar.gz " _makeopts="NO_ICONV=YesPlease NO_GETTEXT=YesPlease NO_TCLTK=YesPlease NO_SVN_TESTS=YesPlease NO_REGEX=NeedsStartEnd LUA_PKGCONFIG=lua5.3 prefix=/usr" builddir="$srcdir"/$pkgname-$pkgver prepare() { cd "$builddir" # 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 default_prepare || return 1 } build() { cd "$builddir" make $_makeopts all doc-man || return 1 } package() { cd "$builddir" make $_makeopts DESTDIR="$pkgdir" \ CGIT_SCRIPT_PATH=/usr/share/webapps/cgit \ install install-man || return 1 ln -s cgit.cgi "$pkgdir"/usr/share/webapps/cgit/cgit || return 1 } sha512sums="8f2ec418716d7a6f0880a713b622f2ee41217dc2d5462903841d59d978a021a8bc2be667ca65c25baee2b9dcd4a76bddd0c813bda0486109cc694e7610827051 cgit-1.1.tar.xz d8ee88732eed027f5cb822f003a17e4cf249c23927a6c6ff55cff49aa3b6951396375576d25f635bebe34ddbdfae5885cd69cee2c48d3848bed0ed9bebb60fb0 git-2.10.2.tar.gz"