diff options
author | Richard Bradfield | 2020-02-14 09:36:25 +0000 |
---|---|---|
committer | Richard Bradfield | 2020-02-14 09:36:25 +0000 |
commit | 5e3fcfc9b7d87b12b732ee160706bdb95bf9461d (patch) | |
tree | e6c898cfbb6efc07869f8f8cb5c060964bf6681e /PKGBUILD | |
parent | e95856b1a882f00c962bcd496963d6856814e115 (diff) | |
download | aur-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-- | PKGBUILD | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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() { |