summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Wagie2020-07-27 09:18:34 -0600
committerMark Wagie2020-07-27 09:18:34 -0600
commit7269368accafef835249b534e75218423d6003ac (patch)
treea339599612d15f92dbd6b4ebf9f205cafe276476
parent74a4bdf6992193572f8a615d488a131473474a3f (diff)
downloadaur-7269368accafef835249b534e75218423d6003ac.tar.gz
use makefile, correct arch
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD37
2 files changed, 16 insertions, 29 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 11681b47f464..a9b0846136be 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -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
diff --git a/PKGBUILD b/PKGBUILD
index aa2f6d6ee6ca..1781c18947a8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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() {