aboutsummaryrefslogtreecommitdiffstats
path: root/main/cgit/APKBUILD
blob: d8c7b676958d9349e5e1ab46ee53c8f6804d5df8 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=cgit
pkgver=0.10.1
pkgrel=0
_gitver=1.9.0
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
	"

_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="060ef0aa95ebda6ea7daf823214bc4d0  cgit-0.10.1.tar.xz
e16c14b27c644b8e0dd72bdb5ff77450  git-1.9.0.tar.gz"
sha256sums="839ea3e330259b4b332a346007244f4b74d62c336352c272e4e9b8abd30d912d  cgit-0.10.1.tar.xz
de3097fdc36d624ea6cf4bb853402fde781acdb860f12152c5eb879777389882  git-1.9.0.tar.gz"
sha512sums="3a6afe2eb47ed718b4c0661ffbd0905118b61f6f2f10723022a9fe7d2e4b2742fcc20fd2a5ecb68de6a22b55d1c9b679d4b7305f6d622d64fa4be66117a9ad02  cgit-0.10.1.tar.xz
e81f320cf13262e08a262c9fb70d701b8d8017a5d6b10c8be959c234b99486012cb7fa808a49f97db143777cd6c4368fd08a69f8ef272f9e187f82aed32d0854  git-1.9.0.tar.gz"