summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Bradfield2020-02-14 09:36:25 +0000
committerRichard Bradfield2020-02-14 09:36:25 +0000
commit5e3fcfc9b7d87b12b732ee160706bdb95bf9461d (patch)
treee6c898cfbb6efc07869f8f8cb5c060964bf6681e
parente95856b1a882f00c962bcd496963d6856814e115 (diff)
downloadaur-5e3fcfc9b7d87b12b732ee160706bdb95bf9461d.tar.gz
Adhere to Wiki Go Packaging Guidelines
Change makedepends to request go-pie instead of go, honour system LDFLAGS and supply -trimpath.
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD8
2 files changed, 7 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index cef1fdd15077..407af5b4454b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,12 +1,12 @@
pkgbase = github-cli
pkgdesc = The GitHub CLI
pkgver = 0.5.5
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/cli/cli
arch = any
license = MIT
makedepends = glibc
- makedepends = go
+ makedepends = go-pie
depends = glibc
optdepends = git: To interact with repositories
source = github-cli-0.5.5.tar.gz::https://github.com/cli/cli/archive/v0.5.5.tar.gz
diff --git a/PKGBUILD b/PKGBUILD
index 96c40cb294ca..48d6bb8d7b08 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,13 +3,13 @@
pkgname=github-cli
pkgver=0.5.5
-pkgrel=1
+pkgrel=2
pkgdesc="The GitHub CLI"
arch=("any")
url="https://github.com/cli/cli"
license=("MIT")
depends=("glibc")
-makedepends=("glibc" "go")
+makedepends=("glibc" "go-pie")
optdepends=("git: To interact with repositories")
source=("$pkgname-$pkgver.tar.gz::https://github.com/cli/cli/archive/v${pkgver}.tar.gz")
sha256sums=(
@@ -18,7 +18,9 @@ sha256sums=(
build() {
cd "cli-$pkgver"
- go build -ldflags "-X github.com/cli/cli/command.Version=v${pkgver} -X github.com/cli/cli/command.BuildDate=$(date +%Y-%m-%d)" -o "bin/gh" ./cmd/gh
+ go build \
+ -trimpath \
+ -ldflags "-extldflags ${LDFLAGS} -X github.com/cli/cli/command.Version=v${pkgver} -X github.com/cli/cli/command.BuildDate=$(date +%Y-%m-%d)" -o "bin/gh" ./cmd/gh
}
package() {