aboutsummaryrefslogtreecommitdiffstats
path: root/main/cgit/APKBUILD
blob: 54cef0782902fd1e7130622d54cee3613d3bf738 (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.11.2
pkgrel=0
_gitver=2.3.2
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="dbafc4e19c715c5ee9ed0cd9d0fda9fa  cgit-0.11.2.tar.xz
1e9141d60940eeda6b3d04646b2e8d1a  git-2.3.2.tar.gz"
sha256sums="2e126e770693d7296c7eb5eb83b809410aef29870bfe8f54da072a3f4d813e3b  cgit-0.11.2.tar.xz
a35aea3a0f63f4cc3dd38fa32127e97273f335a14ea2586b649eb759ecf675a3  git-2.3.2.tar.gz"
sha512sums="a29bce6e02c61bb2683ce96f867c3050c03dc9e45b5154507e92a30f9e436f61517eeff0c5b9023727e54a9212bf9bf6692a33e791e7883976a5349ae58c0c72  cgit-0.11.2.tar.xz
ac56a8b2351e85c7c02b206ca17bf4c96569ad13bbe92dace2f8ed05f146c3e352248d52d15f3bfd33b705a816dcdd60909f1fd3e38e437130ba18e0c34925df  git-2.3.2.tar.gz"