summaryrefslogtreecommitdiffstats
path: root/main/cgit/APKBUILD
blob: 1f945cdd35e3d663653b226f01db11ee13bdd771 (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
ee3f36c64159790e74f3340b8476dca5  git-2.0.1.tar.gz"
sha256sums="94598e6582752659598e8086d3e2b2a2081df89ac8397460f507b15e71264c8d  cgit-0.10.2.tar.xz
70eaf47653bc631bcb98618327e31fb0d70d94c6c5b16bf6ac3488f200f54c9f  git-2.0.1.tar.gz"
sha512sums="5f4a0b65a9a802f5a464224ad4773ce6c926d0e61bb53baa4270f923570d92674b2b1b0669a74eb0e25d2b5e7fc7f637b37037c2371ebd7a3437ce28d78d650f  cgit-0.10.2.tar.xz
3ad68db7acc74a95a41ae02e553cff85be0f90d4886d8c3a67e91dbf1a917809a940e4f9b8fad5e95db16d658e9ac60171ac51018387a45aa308d0a816e3b3c9  git-2.0.1.tar.gz"