summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 66627df66adbbe600dbb3ed68bd7671f55a56848 (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
# Maintainer: Christian Hesse <mail@eworm.de
# Contributor: Eric BĂ©langer <eric@archlinux.org> ([extra] package)

pkgname=putty-git
pkgver=0.63.r847.g5da8ec5
pkgrel=1
pkgdesc="A terminal integrated SSH/Telnet client - git checkout"
arch=('i686' 'x86_64')
url="http://www.chiark.greenend.org.uk/~sgtatham/putty/"
license=('MIT')
depends=('gtk2')
makedepends=('git' 'perl' 'halibut')
conflicts=('putty')
provides=('putty')
source=('git://git.tartarus.org/simon/putty.git')
sha256sums=('SKIP')

pkgver() {
	cd putty/

	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 log -1 --format='%h')"
	else
		printf '0.r%s.g%s' \
			"$(git rev-list --count master)" \
			"$(git log -1 --format='%h')"
	fi
}

build() {
	cd putty/

	./mkfiles.pl
	autoreconf -fi
	./configure --prefix=/usr

	( cd doc && make )

	make
}

package() {
	cd putty/

	make DESTDIR="${pkgdir}" install
	install -D -m644 LICENCE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}