# Contributor: Leo # Contributor: Sören Tempel # Contributor: Eivind Uggedal # Maintainer: Roberto Oliveira pkgname=hub pkgver=2.12.3 pkgrel=1 pkgdesc="Extends git with extra features for GitHub" url="https://hub.github.com/" arch="all" license="MIT" makedepends="go util-linux bash ca-certificates groff" options="net !checkroot" subpackages=" $pkgname-doc $pkgname-bash-completion:bashcomp:noarch $pkgname-zsh-completion:zshcomp:noarch $pkgname-fish-completion:fishcomp:noarch" source="$pkgname-$pkgver.tar.gz::https://github.com/github/hub/archive/v$pkgver.tar.gz" builddir="$srcdir/src/github.com/github/hub" prepare() { mkdir -p "${builddir%/*}" mv $pkgname-$pkgver "$builddir" default_prepare } build() { export GOPATH="$srcdir" make make man-pages } check() { bin/hub --version } package() { make PREFIX="$pkgdir"/usr install } 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 } 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 } sha512sums="8bb433d4a0079cb6f30014650bb5e2dafc1ba7b8c65340886f157ae9b6785f170b13c6db1b11f6334835fc312470f5b0f57b563d665af4bbe44f116fd7af75cf hub-2.12.3.tar.gz"