summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorfrealgagu2020-06-19 17:11:29 -0500
committerfrealgagu2020-06-19 17:11:29 -0500
commit9480789bab86792d814bd2a6b9260c8493d69f19 (patch)
tree16d459d9c7326be4e0ea62d6457ae50f9d559ce7
parentc0ef94a1ba2daa8d36bc8cbf22ef0402f9e6768a (diff)
downloadaur-9480789bab86792d814bd2a6b9260c8493d69f19.tar.gz
Using the new go package guidelines.
-rw-r--r--.SRCINFO5
-rw-r--r--PKGBUILD27
2 files changed, 25 insertions, 7 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 235648c9a0ce..09d641672a28 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,11 +1,12 @@
pkgbase = lazygit
pkgdesc = A simple terminal UI for git commands
pkgver = 0.20.4
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/jesseduffield/lazygit
arch = x86_64
license = MIT
- makedepends = go-pie
+ makedepends = go
+ depends = git
depends = glibc
source = lazygit-0.20.4.tar.gz::https://github.com/jesseduffield/lazygit/archive/v0.20.4.tar.gz
sha256sums = 8af316bf9d0916e8b19ce590a80664314a38652af9ef115083686bc9720fa7b9
diff --git a/PKGBUILD b/PKGBUILD
index b3fce1ce3088..e4f22e8cbc5e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,13 +3,13 @@
pkgname=lazygit
pkgver=0.20.4
-pkgrel=1
+pkgrel=2
pkgdesc="A simple terminal UI for git commands"
arch=("x86_64")
url="https://github.com/jesseduffield/${pkgname}"
license=("MIT")
-depends=("glibc")
-makedepends=("go-pie")
+depends=("git" "glibc")
+makedepends=("go")
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/jesseduffield/${pkgname}/archive/v${pkgver}.tar.gz")
sha256sums=("8af316bf9d0916e8b19ce590a80664314a38652af9ef115083686bc9720fa7b9")
_commit="cf5cefb2d6bcfd0d403faca5875124eb9b0d7480"
@@ -21,9 +21,26 @@ prepare() {
build () {
cd "${srcdir}/src/github.com/jesseduffield/${pkgname}"
- GOPATH="${srcdir}" PATH="${PATH}:${GOPATH}/bin" go build -x -i -v -ldflags "-extldflags ${LDFLAGS} -X main.commit=${_commit} -X main.date=$(date -u +%Y-%m-%dT%H:%M:%SZ) -X main.buildSource=binaryRelease -X main.version=${pkgver}" -o "${pkgname}.bin"
+ export GOPATH="${srcdir}"
+ export GOPATH="${srcdir}/gopath"
+ export PATH="${PATH}:${GOPATH}/bin"
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+ export CGO_LDFLAGS="${LDFLAGS}"
+ export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw -x -v"
+ go build \
+ -ldflags "\
+ -extldflags ${LDFLAGS} \
+ -X main.commit=${_commit} \
+ -X main.date=$(date -u +%Y-%m-%dT%H:%M:%SZ) \
+ -X main.buildSource=binaryRelease \
+ -X main.version=${pkgver} \
+ " \
+ -o "${pkgname}.bin"
+
# To avoid issues deleting directories next time
- GOPATH="${srcdir}" go clean --modcache
+ go clean --modcache
}
package () {