summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4064770dda6b0def45b389b44b898d7ab2897380 (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: Christian Hesse <mail@eworm.de
# Contributor: Lukas Fleischer <lfleischer at archlinux dot org>
# Contributor: Loui Chang <louipc dot ist at gmail company>
# Contributor: Geoffroy Carrier <geoffroy.carrier@koon.fr>
# Contributor: Nathan Jones <nathanj@insightbb.com>

pkgname=tig-git
pkgver=2.5.5.r12.g06dd7a8b
pkgrel=1
pkgdesc='Text-mode interface for Git - git checkout'
depends=('git' 'ncurses')
makedepends=('asciidoc' 'xmlto')
url='http://jonas.nitro.dk/tig/'
license=('GPL')
arch=('i686' 'x86_64')
conflicts=('tig')
provides=('tig')
backup=('etc/tigrc')
source=('git+https://github.com/jonas/tig.git')
sha256sums=('SKIP')

pkgver() {
	cd tig/

	if GITTAG="$(git describe --abbrev=0 --tags 2>/dev/null)"; then
		printf '%s.r%s.g%s' \
			"$(sed -e "s/^${pkgname%%-git}//" -e 's/^[-_/a-zA-Z]\+//' -e 's/[-_+]/./g' <<< ${GITTAG})" \
			"$(git rev-list --count ${GITTAG}..)" \
			"$(git rev-parse --short HEAD)"
	else
		printf '0.r%s.g%s' \
			"$(git rev-list --count master)" \
			"$(git rev-parse --short HEAD)"
	fi
}

build() {
	cd tig/

	./autogen.sh
	./configure --prefix=/usr --sysconfdir=/etc
	make
}

package() {
	cd tig/

	make DESTDIR="${pkgdir}" install install-doc-man

	install -Dm0644 contrib/tig-completion.bash "${pkgdir}/usr/share/bash-completion/completions/tig"
}