summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorRichard Bradfield2020-02-14 09:36:25 +0000
committerRichard Bradfield2020-02-14 09:36:25 +0000
commit5e3fcfc9b7d87b12b732ee160706bdb95bf9461d (patch)
treee6c898cfbb6efc07869f8f8cb5c060964bf6681e /PKGBUILD
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.
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD8
1 files changed, 5 insertions, 3 deletions
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() {