aboutsummaryrefslogtreecommitdiffstats
path: root/community/hub/APKBUILD
blob: 83ba5e39fa2f7574c3b754d90ea6d549ed0f3bcf (plain) (blame)
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
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Contributor: Eivind Uggedal <eivind@uggedal.com>
# Maintainer
pkgname=hub
pkgver=2.2.2
pkgrel=1
pkgdesc="Extends git with extra features for GitHub"
url="http://hub.github.com/"
arch="all"
license="MIT"
depends=""
makedepends="go bash"
install=""
options="!strip"
subpackages="
	$pkgname-doc
	$pkgname-bash-completion:bashcomp
	$pkgname-zsh-completion:zshcomp"
source="$pkgname-$pkgver.tar.gz::https://github.com/github/hub/archive/v$pkgver.tar.gz"

_builddir="$srcdir/$pkgname-$pkgver"
build() {
	# XXX this sucks a lot, it simply sets up GOPATH
	# and invokes go get afterwards thus we cannot
	# verify the integrity of the downloaded packages.
	cd "$_builddir" && ./script/build
}

package() {
	cd "$_builddir"
	install -Dm755 $pkgname "$pkgdir/usr/bin/$pkgname"
	install -D -m644 man/$pkgname.1 "$pkgdir"/usr/share/man/man1/$pkgname.1
}

bashcomp() {
	depends=""
	pkgdesc="Bash completions for $pkgname"
	install_if="$pkgname=$pkgver-r$pkgrel bash-completion"
	arch="noarch"

	install -Dm644 "$_builddir"/etc/hub.bash_completion.sh \
		"$subpkgdir"/usr/share/bash-completion/completions/$pkgname || return 1
}

zshcomp() {
	depends=""
	pkgdesc="Zsh completions for $pkgname"
	install_if="$pkgname=$pkgver-r$pkgrel zsh"
	arch="noarch"

	install -Dm644 "$_builddir"/etc/$pkgname.zsh_completion \
		"$subpkgdir"/usr/share/zsh/site-functions/_$pkgname || return 1
}

md5sums="7edc8f5b5d3c7c392ee191dd999596fc  hub-2.2.2.tar.gz"
sha256sums="610572ee903aea1fa8622c16ab7ddef2bd1bfec9f4854447ab8e0fbdbe6a0cae  hub-2.2.2.tar.gz"
sha512sums="27eb8d3b973b30ab16fa59649af55934a2543d74d5160337be881b9d6038efaac4d19e3b2d3295191e65daedafa93d36773f05b3e3a48eae312b711db34762c0  hub-2.2.2.tar.gz"