aboutsummaryrefslogtreecommitdiffstats
path: root/main/cgit/APKBUILD
blob: 2e29c491273297bd22e81945933c5330ce933ac0 (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=1.0
pkgrel=0
_gitver=2.8.3 # 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="1dbd155da1c4adc89703fb1faf249dff  cgit-1.0.tar.xz
b181fc82592d6b5adf3d3226b4e9e757  git-2.8.3.tar.gz"
sha256sums="a89754610922f122468c791888ed6309a81fa0f3ae948d118284b673cb40704d  cgit-1.0.tar.xz
2dad50c758339d6f5235309db620e51249e0000ff34aa2f2acbcb84c2123ed09  git-2.8.3.tar.gz"
sha512sums="de31418e80210ea02d4de7f4bbef09f72312d08fcd4739b2136a92b501898b11235d4598f05d317bdc4b146928372e1cd24b818113ce34064a9d75c803a627b7  cgit-1.0.tar.xz
eb677dc5c1974919d225cdb7c6cad97cc1d4fd63cb5be4ed5ad82ef0a9d56ac4514268b436f0a9218694f801afdc2b5d3b89fb88e5258dce93056f6d9cf27acb  git-2.8.3.tar.gz"