aboutsummaryrefslogtreecommitdiffstats
path: root/main/cgit/APKBUILD
blob: 0f4abd33d02946e2a2c032a0842cb06fe3d59494 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=cgit
pkgver=0.10.2
pkgrel=1
_gitver=2.0.1
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/cgit/snapshot/cgit-$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"

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 all doc-man
}

package() {
	cd "$srcdir/$pkgname-$pkgver"
	make $_makeopts DESTDIR="$pkgdir" \
		CGIT_SCRIPT_PATH=/usr/share/webapps/cgit \
		install install-man
	ln -s cgit.cgi "$pkgdir"/usr/share/webapps/cgit/cgit
}

md5sums="6682d597f6e3e76645a254c7be537bd3  cgit-0.10.2.tar.xz
981f5937840716cb563be1cc6292c8d7  git-2.0.1.tar.gz"
sha256sums="94598e6582752659598e8086d3e2b2a2081df89ac8397460f507b15e71264c8d  cgit-0.10.2.tar.xz
02609a06fb40db1f6a968867c0e82bcb959b85902747830de0fda53228712daf  git-2.0.1.tar.gz"
sha512sums="5f4a0b65a9a802f5a464224ad4773ce6c926d0e61bb53baa4270f923570d92674b2b1b0669a74eb0e25d2b5e7fc7f637b37037c2371ebd7a3437ce28d78d650f  cgit-0.10.2.tar.xz
61bd1e250a8f01bdfed10d243fb6d95968795d7ebf8452f26ca778f0b99f2e13b35d0963004798b251c9ae300300c22dff79a0de21b5a3f1faebe51f557f33b2  git-2.0.1.tar.gz"