diff options
author | Joost Bremmer | 2019-11-03 17:45:55 +0100 |
---|---|---|
committer | Joost Bremmer | 2019-11-03 17:45:55 +0100 |
commit | eb2904143f55e842727346e8923b09ae82a2a584 (patch) | |
tree | ef36bd6b341893e5705de9a5fca9f36e13be63eb /PKGBUILD | |
parent | 696d9213f74df2192156bbafd632887e699e3029 (diff) | |
download | aur-eb2904143f55e842727346e8923b09ae82a2a584.tar.gz |
Fix regression with GOPATH and go-pie
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 55 |
1 files changed, 28 insertions, 27 deletions
@@ -1,9 +1,9 @@ # Maintainer: Mark Wagie <yochanan dot marqos at gmail dot com> # Co-Maintainer: Jameson Pugh <imntreal at gmail dot com> -# Co-Maintainer: Joost Bremmer <toost dot b at gmail dot com> +# Co-Maintainer: Joost Bremmer <contact at madeofmagicandwires dot online> pkgname=cheat pkgver=3.0.3 -pkgrel=1 +pkgrel=2 pkgdesc="Allows you to create and view interactive cheatsheets on the command-line" arch=('x86_64') url="https://github.com/cheat/cheat" @@ -17,35 +17,36 @@ sha256sums=('a9c0d7f46fe4dd19b17fadb4c071629d8dd118a775ee842218a2e9199ec75923') prepare() { - # create gopath - mkdir -p "$srcdir/gopath" - export GOPATH="$srcdir/gopath" - - # fetch dependencies - msg "Fetching Go dependencies" - cd "$srcdir/gopath" - go get -d ./... + # create gopath + mkdir -p "$srcdir/gopath" + export GOPATH="$srcdir/gopath" + + # fetch dependencies + msg "Fetching Go dependencies" + cd "$pkgname-$pkgver" + go get -d ./... } build() { - cd "$pkgname-$pkgver" - GOOS=linux \ - GOARCH=amd64 \ - go build \ - -v \ - -trimpath \ - -gcflags "all=-trimpath=$srcdir" \ - -asmflags "all=-trimpath=$srcdir" \ - -ldflags "-extldflags $LDFLAGS" \ - -o "./dist/$pkgname" "./cmd/$pkgname" - - # Clean mod cache for makepkg -C - go clean -modcache + cd "$pkgname-$pkgver" + GOOS=linux \ + GOARCH=amd64 \ + go build \ + -v \ + -trimpath \ + -buildmode=pie \ + -gcflags "all=-trimpath=$srcdir" \ + -asmflags "all=-trimpath=$srcdir" \ + -ldflags "-extldflags $LDFLAGS" \ + -o "./dist/$pkgname" "./cmd/$pkgname" + + # Clean mod cache for makepkg -C + go clean -modcache } package() { - cd "$pkgname-$pkgver" - install -Dm755 "dist/$pkgname" "$pkgdir/usr/bin/$pkgname" - install -Dm755 scripts/fzf.bash "$pkgdir/usr/share/$pkgname/fzf.bash" - install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE.txt" + cd "$pkgname-$pkgver" + install -Dm755 "dist/$pkgname" "$pkgdir/usr/bin/$pkgname" + install -Dm755 scripts/fzf.bash "$pkgdir/usr/share/$pkgname/fzf.bash" + install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE.txt" } |