summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4fbd95d8d69a7ed6a5e8b1b5ac0c92baefcba2d3 (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
# Maintainer: NOGISAKA Sadata <ngsksdt@gmail.com>
# Contributor: Kohei Suzuki <eagletmt@gmail.com>

pkgname=ghq
pkgver=0.17.1
pkgrel=1
pkgdesc="Remote repository management made easy"
arch=('i686' 'x86_64')
url="https://github.com/motemen/ghq"
license=('MIT')
makedepends=('go' 'git')
optdepends=('zsh: ghq function for zsh')
source=("git+https://github.com/motemen/${pkgname}.git")

prepare() {
  cd "${srcdir}/${pkgname}"
  git checkout "v${pkgver}"
}

build() {
  cd "${srcdir}/${pkgname}"
  export GOPATH="$srcdir/build"
  go get -t -d -v
  make build
}

check() {
  cd "${srcdir}/${pkgname}"
  export GOPATH="$srcdir/build"
  make test
}

package() {
  cd "${srcdir}/${pkgname}"

  install -Dm 755 ghq "$pkgdir/usr/bin/ghq"
  install -Dm 644 misc/bash/_ghq "$pkgdir/usr/share/bash-completion/completions/_ghq"
  install -Dm 644 misc/zsh/_ghq "$pkgdir/usr/share/zsh/site-functions/_ghq"
  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/ghq/LICENSE"
}

# vim: set et sw=2 sts=2:

sha512sums=('SKIP')