# Contributor: Sören Tempel # Contributor: Eivind Uggedal # Maintainer pkgname=hub pkgver=2.2.3 pkgrel=0 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:noarch $pkgname-zsh-completion:zshcomp:noarch" source="$pkgname-$pkgver.tar.gz::https://github.com/github/hub/archive/v$pkgver.tar.gz" builddir="$srcdir/$pkgname-$pkgver" build() { 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" 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" install -Dm644 "$builddir"/etc/$pkgname.zsh_completion \ "$subpkgdir"/usr/share/zsh/site-functions/_$pkgname || return 1 } sha512sums="a255f7006fcf442d6ff1cb35fe3e9d37a1db2dd61125653b7b4713d3a41309a8f2a2076ac791101a46cb5bcd3d46ca33969f0e0817ef62ff3a57fc72f5acae82 hub-2.2.3.tar.gz"