aboutsummaryrefslogtreecommitdiffstats
path: root/main/cgit/APKBUILD
blob: bead1ab3a045269288583cc5869079af7f2ec0cb (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=cgit
pkgver=0.9.2
pkgrel=0
_gitver=1.8.3
pkgdesc="a fast webinterface for git"
url="http://hjemli.net/git/cgit"
arch="all"
license=GPL-2
makedepends="openssl-dev zlib-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"

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
}

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="fe11018eff8d79caad112f4fac64b90f  cgit-0.9.2.tar.xz
d91b6099fb6763cf92c696977a247060  git-1.8.3.tar.gz"
sha256sums="08c042004a7d91b1a4b0ff88dda6f94a916b7a231498c3c45056eb93033e2760  cgit-0.9.2.tar.xz
f1d3c6d683f8f15035a8d0f3eb30ed160ff6607111dfc6026d8836307aebc53a  git-1.8.3.tar.gz"
sha512sums="05a755ea1ccf5b10dae8223a25b93166b854b4522c02e05c79d6c6dbc10a181e4fab282b9c918a56732a5d0a026aaedf197e37af1636bba79ade221598c4477e  cgit-0.9.2.tar.xz
070a2e4563d11f441c075f3a1c785f5b99195f3183a7dcd4de947ce67be29137704836290589f61f10390865f3c19e5626ad1876cf9eecd987ea11740eedfba3  git-1.8.3.tar.gz"