summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorNOGISAKA Sadata2020-07-26 20:30:20 +0900
committerNOGISAKA Sadata2020-07-26 20:43:54 +0900
commit1f2f509a5502e96f44f015c51da8b25b5748d9d3 (patch)
tree977cc4a06bc705bfdd07c452654df50b3414afcc
parent2064e2d4a099f79b0b9ff9b953e54fbfdb1ccb9c (diff)
downloadaur-1f2f509a5502e96f44f015c51da8b25b5748d9d3.tar.gz
Use source properly instead of `git checkout` in git tree on prepare()
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD19
2 files changed, 10 insertions, 15 deletions
diff --git a/.SRCINFO b/.SRCINFO
index fceddb985ef9..0e98de40b499 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = ghq
pkgdesc = Remote repository management made easy
pkgver = 1.1.5
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/x-motemen/ghq
arch = i686
arch = x86_64
@@ -9,8 +9,8 @@ pkgbase = ghq
makedepends = go
makedepends = git
optdepends = zsh: ghq function for zsh
- source = git+https://github.com/x-motemen/ghq.git
- sha512sums = SKIP
+ source = https://github.com/x-motemen/ghq/archive/v1.1.5.tar.gz
+ sha512sums = 09c8ef1bcb357c92b4baf691d92f57fb641735a3560517c05e94860f1204cba6652df77d57d79eea419ea8578fbcc0b07a0de95a5636d42765d6ac3c01117352
pkgname = ghq
diff --git a/PKGBUILD b/PKGBUILD
index 5a8841b4ca5b..06dd19373660 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,35 +3,30 @@
pkgname=ghq
pkgver=1.1.5
-pkgrel=1
+pkgrel=2
pkgdesc="Remote repository management made easy"
arch=('i686' 'x86_64')
url="https://github.com/x-motemen/ghq"
license=('MIT')
-makedepends=('go' 'git')
+makedepends=('go' 'git') # Yes, you're right; no git-depended lines in the PKGBUILD but `make test` requires git...
optdepends=('zsh: ghq function for zsh')
-source=("git+https://github.com/x-motemen/${pkgname}.git")
-
-prepare() {
- cd "${srcdir}/${pkgname}"
- git checkout "v${pkgver}"
-}
+source=("https://github.com/x-motemen/${pkgname}/archive/v${pkgver}.tar.gz")
build() {
- cd "${srcdir}/${pkgname}"
+ cd "${srcdir}/${pkgname}-${pkgver}"
export GOPATH="$srcdir/build"
go get -t -d -v
make build
}
check() {
- cd "${srcdir}/${pkgname}"
+ cd "${srcdir}/${pkgname}-${pkgver}"
export GOPATH="$srcdir/build"
make test
}
package() {
- cd "${srcdir}/${pkgname}"
+ cd "${srcdir}/${pkgname}-${pkgver}"
install -Dm 755 ghq "$pkgdir/usr/bin/ghq"
install -Dm 644 misc/bash/_ghq "$pkgdir/usr/share/bash-completion/completions/_ghq"
@@ -41,4 +36,4 @@ package() {
# vim: set et sw=2 sts=2:
-sha512sums=('SKIP')
+sha512sums=('09c8ef1bcb357c92b4baf691d92f57fb641735a3560517c05e94860f1204cba6652df77d57d79eea419ea8578fbcc0b07a0de95a5636d42765d6ac3c01117352')