AUR の ghq のインストールでエラーになったので対処

[AUR の ghq](https://aur.archlinux.org/packages/ghq/) をインストールしようとしたら上手くいかなかった。

`yay -S ghq` すると `build()` で以下のエラーが出る。
`motemen/ghq/utils` がないと言われるが、0.9.0 のソースを落としてきて自分で `make build` を叩いた場合も同様のエラーが出るのでバージョンに起因している模様。

```
==> Starting build()...
github.com/mitchellh/go-homedir (download)
created GOPATH=/home/myuser/.cache/yay/ghq/src/build; see 'go help gopath'
github.com/motemen/ghq (download)
package github.com/motemen/ghq/utils: cannot find package "github.com/motemen/ghq/utils" in an
y of:
        /usr/lib/go/src/github.com/motemen/ghq/utils (from $GOROOT)
        /home/myuser/.cache/yay/ghq/src/build/src/github.com/motemen/ghq/utils (from $GOPATH
)
github.com/urfave/cli (download)
github.com/onsi/gomega (download)
Fetching https://golang.org/x/net/html/charset?go-get=1
Parsing meta tags from https://golang.org/x/net/html/charset?go-get=1 (status code 200)
get "golang.org/x/net/html/charset": found meta tag get.metaImport{Prefix:"golang.org/x/net", 
VCS:"git", RepoRoot:"https://go.googlesource.com/net"} at https://golang.org/x/net/html/charse
t?go-get=1
get "golang.org/x/net/html/charset": verifying non-authoritative meta tag
Fetching https://golang.org/x/net?go-get=1
Parsing meta tags from https://golang.org/x/net?go-get=1 (status code 200)
golang.org/x/net (download)
Fetching https://golang.org/x/text/encoding?go-get=1
Parsing meta tags from https://golang.org/x/text/encoding?go-get=1 (status code 200)
get "golang.org/x/text/encoding": found meta tag get.metaImport{Prefix:"golang.org/x/text", VC
S:"git", RepoRoot:"https://go.googlesource.com/text"} at https://golang.org/x/text/encoding?go
-get=1
get "golang.org/x/text/encoding": verifying non-authoritative meta tag
Fetching https://golang.org/x/text?go-get=1
Parsing meta tags from https://golang.org/x/text?go-get=1 (status code 200)
golang.org/x/text (download)
Fetching https://golang.org/x/text/transform?go-get=1
Parsing meta tags from https://golang.org/x/text/transform?go-get=1 (status code 200)
get "golang.org/x/text/transform": found meta tag get.metaImport{Prefix:"golang.org/x/text", V
CS:"git", RepoRoot:"https://go.googlesource.com/text"} at https://golang.org/x/text/transform?
go-get=1
get "golang.org/x/text/transform": verifying non-authoritative meta tag
Fetching https://golang.org/x/text/encoding/charmap?go-get=1
Parsing meta tags from https://golang.org/x/text/encoding/charmap?go-get=1 (status code 200)
get "golang.org/x/text/encoding/charmap": found meta tag get.metaImport{Prefix:"golang.org/x/t
ext", VCS:"git", RepoRoot:"https://go.googlesource.com/text"} at https://golang.org/x/text/enc
oding/charmap?go-get=1
get "golang.org/x/text/encoding/charmap": verifying non-authoritative meta tag
Fetching https://golang.org/x/text/encoding/htmlindex?go-get=1
Parsing meta tags from https://golang.org/x/text/encoding/htmlindex?go-get=1 (status code 200)
get "golang.org/x/text/encoding/htmlindex": found meta tag get.metaImport{Prefix:"golang.org/x
/text", VCS:"git", RepoRoot:"https://go.googlesource.com/text"} at https://golang.org/x/text/e
ncoding/htmlindex?go-get=1
get "golang.org/x/text/encoding/htmlindex": verifying non-authoritative meta tag
Fetching https://gopkg.in/yaml.v2?go-get=1
Parsing meta tags from https://gopkg.in/yaml.v2?go-get=1 (status code 200)
get "gopkg.in/yaml.v2": found meta tag get.metaImport{Prefix:"gopkg.in/yaml.v2", VCS:"git", Re
poRoot:"https://gopkg.in/yaml.v2"} at https://gopkg.in/yaml.v2?go-get=1
gopkg.in/yaml.v2 (download)
==> ERROR: A failure occurred in build().
    Aborting...
Error making: ghq
```

そこで PKGBUILD を以下のように改変した。
バージョンをもっと新しくすることも現時点で可能だったが、とりあえずマイナーバージョンを 1 つだけ上げて実験した。

```shell
# Maintainer: NOGISAKA Sadata <ngsksdt@gmail.com>
# Contributor: Kohei Suzuki <eagletmt@gmail.com>

pkgname=ghq
pkgver=0.10.2
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=("ghq-${pkgver}.tar.gz::https://github.com/motemen/ghq/archive/v${pkgver}.tar.gz")

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

check() {
  cd "$srcdir/$pkgname-$pkgver"
  export GOPATH="$srcdir/build"
  go test -x -v .
}

package() {
  cd "$srcdir/$pkgname-$pkgver"
  install -Dm 755 ghq "$pkgdir/usr/bin/ghq"
  install -Dm 644 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=('05fb25852001f14c91eb2412d67441ce1a9e7b7e8022b2305862acd39dc692d3edfa5a7a049e8d6f4ecb9b61d134336309873d0ce7db00d73477d65dba3f0ac9')
```

diff は以下。

```diff

 pkgname=ghq
-pkgver=0.9.0
+pkgver=0.10.2
 pkgrel=1
 pkgdesc="Remote repository management made easy"
 arch=('i686' 'x86_64')
@@ -27,12 +27,11 @@
 
 package() {
   cd "$srcdir/$pkgname-$pkgver"
-  install -Dm 755 ghq-$pkgver "$pkgdir/usr/bin/ghq"
+  install -Dm 755 ghq "$pkgdir/usr/bin/ghq"
   install -Dm 644 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=('ba85652abe38f03d8eb96e6eba6393723a21710880df2a6dc3821f125a543a20e9f33b3c95f3a9d42ce7b9c263b6e96bfd5913edd088a19d31c8eaf034eaae63')
+sha512sums=('05fb25852001f14c91eb2412d67441ce1a9e7b7e8022b2305862acd39dc692d3edfa5a7a049e8d6f4ecb9b61d134336309873d0ce7db00d73477d65dba3f0ac9')
```

これで `makepkg -si` したらインストールに成功した。