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 | |
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.
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 8 |
2 files changed, 7 insertions, 5 deletions
@@ -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 @@ -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() { |