APKBUILD 1.77 KB
Newer Older
Leo's avatar
Leo committed
1
# Contributor: Leo <thinkabit.ukim@gmail.com>
Sören Tempel's avatar
Sören Tempel committed
2
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
Eivind Uggedal's avatar
Eivind Uggedal committed
3
# Contributor: Eivind Uggedal <eu@eju.no>
4
# Maintainer: Roberto Oliveira <robertoguimaraes8@gmail.com>
Eivind Uggedal's avatar
Eivind Uggedal committed
5
pkgname=hub
Leo's avatar
Leo committed
6
pkgver=2.12.0
7
pkgrel=0
Eivind Uggedal's avatar
Eivind Uggedal committed
8
pkgdesc="Extends git with extra features for GitHub"
Leo's avatar
Leo committed
9
url="https://hub.github.com/"
10
arch="all"
Eivind Uggedal's avatar
Eivind Uggedal committed
11
license="MIT"
Leo's avatar
Leo committed
12
makedepends="go util-linux bash ca-certificates groff"
13
options="net !checkroot"
Sören Tempel's avatar
Sören Tempel committed
14
15
subpackages="
	$pkgname-doc
16
	$pkgname-bash-completion:bashcomp:noarch
Leo's avatar
Leo committed
17
18
	$pkgname-zsh-completion:zshcomp:noarch
	$pkgname-fish-completion:fishcomp:noarch"
Eivind Uggedal's avatar
Eivind Uggedal committed
19
20
source="$pkgname-$pkgver.tar.gz::https://github.com/github/hub/archive/v$pkgver.tar.gz"

Leo's avatar
Leo committed
21
builddir="$srcdir/src/github.com/github/hub"
22
23

prepare() {
Leo's avatar
Leo committed
24
25
	mkdir -p "${builddir%/*}"
	mv $pkgname-$pkgver "$builddir"
26
27
	default_prepare
}
28

Eivind Uggedal's avatar
Eivind Uggedal committed
29
build() {
30
	export GOPATH="$srcdir"
Leo's avatar
Leo committed
31
32
	make
	make man-pages
Eivind Uggedal's avatar
Eivind Uggedal committed
33
34
}

Roberto Oliveira's avatar
Roberto Oliveira committed
35
check() {
Leo's avatar
Leo committed
36
	bin/hub --version
Roberto Oliveira's avatar
Roberto Oliveira committed
37
38
}

Eivind Uggedal's avatar
Eivind Uggedal committed
39
package() {
Leo's avatar
Leo committed
40
	make PREFIX="$pkgdir"/usr install
Eivind Uggedal's avatar
Eivind Uggedal committed
41
}
Sören Tempel's avatar
Sören Tempel committed
42
43
44
45

bashcomp() {
	depends=""
	pkgdesc="Bash completions for $pkgname"
46
	install_if="$pkgname=$pkgver-r$pkgrel bash-completion"
Sören Tempel's avatar
Sören Tempel committed
47

Sören Tempel's avatar
Sören Tempel committed
48
	install -Dm644 "$builddir"/etc/hub.bash_completion.sh \
49
		"$subpkgdir"/usr/share/bash-completion/completions/$pkgname
Sören Tempel's avatar
Sören Tempel committed
50
51
52
53
54
55
56
}

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

Sören Tempel's avatar
Sören Tempel committed
57
	install -Dm644 "$builddir"/etc/$pkgname.zsh_completion \
58
		"$subpkgdir"/usr/share/zsh/site-functions/_$pkgname
Sören Tempel's avatar
Sören Tempel committed
59
60
}

Leo's avatar
Leo committed
61
62
63
64
65
66
67
68
69
fishcomp() {
	depends=""
	pkgdesc="Fish completions for $pkgname"
	install_if="$pkgname=$pkgver-r$pkgrel fish"

	install -Dm644 "$builddir"/etc/$pkgname.fish_completion \
		"$subpkgdir"/usr/share/fish/completions/$pkgname.fish
}

Leo's avatar
Leo committed
70
sha512sums="5246070238e3c021b57e334989f01bde2b48c51a3a1bd8f419ea3e0bb9697048d1c8f58e2bfdac17ef3ed8996d6f1cd41a09f3d93c641c6eb404e0fcae9bae11  hub-2.12.0.tar.gz"