aboutsummaryrefslogtreecommitdiffstats
path: root/main/cgit/APKBUILD
blob: 256bd333f07828b39191ca93526068a9df4d24d1 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=cgit
pkgver=0.8.3.4
pkgrel=0
_gitver=1.7.3
pkgdesc="a fast webinterface for git"
url="http://hjemli.net/git/cgit"
arch="x86 x86_64"
license=GPL-2
makedepends="openssl-dev zlib-dev"
depends=
source="
	http://hjemli.net/git/cgit/snapshot/$pkgname-$pkgver.tar.bz2
	http://www.kernel.org/pub/software/scm/git/git-$_gitver.tar.bz2
	"

_makeopts="NO_ICONV=YesPlease
	NO_TCLTK=YesPlease
	NO_SVN_TESTS=YesPlease"

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
	ln -s ../git-$_gitver git
}

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="712e4d3013d754aa5752e0101188cf32  cgit-0.8.3.4.tar.bz2
c18eb252ce63a688071f10c3f7bc28e1  git-1.7.3.tar.bz2"