aboutsummaryrefslogtreecommitdiffstats
path: root/main/cgit/APKBUILD
blob: 56420e9029102ad8ddbf4bcb4c7f8a7c3ec5f5b4 (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
62
63
64
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=cgit
pkgver=0.12
pkgrel=0
_gitver=2.7.0 # 2.7.1 and 2.7.0 are compatible
pkgdesc="A fast webinterface for git"
url="http://git.zx2c4.com/cgit/"
arch="all"
license="GPL2"
makedepends="openssl-dev zlib-dev lua5.2-dev asciidoc"
depends=""
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
	LUA_PKGCONFIG=lua5.2
	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

	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

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
}

md5sums="192efcca82bf3bf07cd2746685a9f87a  cgit-0.12.tar.xz
f3c3ed131e37e5e07cc0b81e9b539908  git-2.7.0.tar.gz"
sha256sums="2ee233849335a64529a01cf2b6165ed492e20268e6e2526d7a7529ef1e24a5b7  cgit-0.12.tar.xz
db9df4435c70a9b25d20a9ee20d65101692dc907a5a4b30e8343c9ae1b913ead  git-2.7.0.tar.gz"
sha512sums="59c9189b5713184b07a7db65c30e26987bd14d76ccb998be52fb2d1cca0ae0d1637391c4d14ab58d29c0b58b586c1294ae865e140eda2a031ca1f175d83abc34  cgit-0.12.tar.xz
d79933dbf4d993e14a9e4e3201cb64aa2be064692381daa9caa558f4369d471c4f3ea0aab35bccb4bfa684e188ed0fd0c6d1a497217a539e2959e2eca4d52e41  git-2.7.0.tar.gz"