diff options
author | Mark Wagie | 2020-07-27 09:18:34 -0600 |
---|---|---|
committer | Mark Wagie | 2020-07-27 09:18:34 -0600 |
commit | 7269368accafef835249b534e75218423d6003ac (patch) | |
tree | a339599612d15f92dbd6b4ebf9f205cafe276476 | |
parent | 74a4bdf6992193572f8a615d488a131473474a3f (diff) | |
download | aur-7269368accafef835249b534e75218423d6003ac.tar.gz |
use makefile, correct arch
-rw-r--r-- | .SRCINFO | 8 | ||||
-rw-r--r-- | PKGBUILD | 37 |
2 files changed, 16 insertions, 29 deletions
@@ -1,9 +1,13 @@ pkgbase = cheat-git pkgdesc = Allows you to create and view interactive cheatsheets on the command-line pkgver = 4.0.2.r0.gad7ad64 - pkgrel = 1 + pkgrel = 2 url = https://github.com/cheat/cheat - arch = any + arch = i686 + arch = x86_64 + arch = arm + arch = armv6h + arch = armv7h license = MIT license = CC0 1.0 Universal makedepends = git @@ -4,9 +4,9 @@ # Contributor: Quan Guo <guotsuan@gmail.com> pkgname=cheat-git pkgver=4.0.2.r0.gad7ad64 -pkgrel=1 +pkgrel=2 pkgdesc="Allows you to create and view interactive cheatsheets on the command-line" -arch=('any') +arch=('i686' 'x86_64' 'arm' 'armv6h' 'armv7h') url="https://github.com/cheat/cheat" license=('MIT' 'CC0 1.0 Universal') makedepends=('git' 'go' 'pandoc') @@ -30,34 +30,17 @@ pkgver() { } prepare() { - - # Add /etc/cheat/ to config file path - cd "$srcdir/${pkgname%-git}" - sed -i '43 i\ - path.Join("/etc/cheat/conf.yml"),' internal/config/paths.go + export GOPATH="$srcdir/gopath" + go clean -modcache } build() { - export GOPATH="$srcdir"/gopath - cd "$srcdir/${pkgname%-git}" - GOOS=linux \ - GOARCH=$(go env GOHOSTARCH) \ - go build \ - -v \ - -trimpath \ - -buildmode=pie \ - -mod=readonly \ - -modcacherw \ - -gcflags "all=-trimpath=$srcdir" \ - -asmflags "all=-trimpath=$srcdir" \ - -ldflags "-extldflags \"${LDFLAGS}\"" \ - -o "./dist/${pkgname%-git}" "./cmd/${pkgname%-git}" - - # Clean mod cache for makepkg -C - go clean -modcache - - # Generate man page - pandoc -s -t man "doc/${pkgname%-git}.1.md" -o "doc/${pkgname%-git}.1" + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export CGO_LDFLAGS="${LDFLAGS}" + export GOFLAGS="-buildmode=pie -mod=readonly -modcacherw" + make } package() { |