summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Wagie2020-07-27 09:19:00 -0600
committerMark Wagie2020-07-27 09:19:00 -0600
commit06f89b3c72db26dbe95d87c1953468f0da5ffd07 (patch)
tree6cc2db90ca98551a61b9da1f7999389f264ccfc3
parent5cd7e96c6b53a80704300fffd3c3f0a59df58b96 (diff)
downloadaur-06f89b3c72db26dbe95d87c1953468f0da5ffd07.tar.gz
use makefile, correct arch
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD34
2 files changed, 19 insertions, 23 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 7cededd0a21e..69409da716ee 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,13 @@
pkgbase = cheat
pkgdesc = Allows you to create and view interactive cheatsheets on the command-line
pkgver = 4.0.2
- pkgrel = 2
+ pkgrel = 3
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 = go
diff --git a/PKGBUILD b/PKGBUILD
index 8ad4ac2c7961..9ca6e855a0e4 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,9 +3,9 @@
# Contributor: Bogdan <d0xi at inbox dot ru>
pkgname=cheat
pkgver=4.0.2
-pkgrel=2
+pkgrel=3
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=('go' 'git' 'pandoc')
@@ -23,27 +23,19 @@ sha256sums=('87c832b25794d7acac2fa4bd3389c81819535f32242d5e99284da76a1a86f1f3'
'SKIP'
'a2010f343487d3f7618affe54f789f5487602331c0a8d03f49e9a7c547cf0499')
-build() {
- export GOPATH="$srcdir"/gopath
- cd "$pkgname-$pkgver"
- 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" "./cmd/$pkgname"
-
- # Clean mod cache for makepkg -C
+prepare() {
+ export GOPATH="$srcdir/gopath"
go clean -modcache
+}
- # Generate man page
- pandoc -s -t man "doc/$pkgname.1.md" -o "doc/$pkgname.1"
+build() {
+ cd "$pkgname-$pkgver"
+ 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() {