aboutsummaryrefslogtreecommitdiffstats
path: root/testing/hub/APKBUILD
blob: c0a0ccbf8ae2f413d21d3838bb774ec45288479e (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
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Contributor: Eivind Uggedal <eivind@uggedal.com>
# Maintainer: Roberto Oliveira <robertoguimaraes8@gmail.com>
pkgname=hub
pkgver=2.5.0
pkgrel=0
pkgdesc="Extends git with extra features for GitHub"
url="http://hub.github.com/"
arch="all"
license="MIT"
makedepends="go dep bash"
options="!strip"
subpackages="
	$pkgname-doc
	$pkgname-bash-completion:bashcomp:noarch
	$pkgname-zsh-completion:zshcomp:noarch"
source="$pkgname-$pkgver.tar.gz::https://github.com/github/hub/archive/v$pkgver.tar.gz"

builddir="$srcdir/src/github.com/hub/$pkgname"

prepare() {
	mkdir -p ${builddir%/*}
	mv "$srcdir"/$pkgname-$pkgver "$builddir"/
	default_prepare
}

build() {
	cd "$builddir"
	export GOPATH="$srcdir"
	dep ensure -v
	./script/build
}

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

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

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

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

	install -Dm644 "$builddir"/etc/$pkgname.zsh_completion \
		"$subpkgdir"/usr/share/zsh/site-functions/_$pkgname
}

sha512sums="100e9695ef0bc0f9ea0decdc22d01696f520d741529c1591bbd10d49e9ba14455a12c60343aefb3af619b5dded7a53574c0b2b111005fb045637bc95fb52a4cb  hub-2.5.0.tar.gz"