summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAditya Sirish2021-10-20 11:31:13 -0400
committerAditya Sirish2021-10-20 11:31:13 -0400
commitc0a5de0d95f4774275281ca5bf93d030ca377cf6 (patch)
treed1823b2a5f9c5b5b004aa8b5f8ba4311cf3b211e
parent059c5299df2c070487c1aa438e632aa7aa416c0e (diff)
downloadaur-gomod.tar.gz
Clean up PKGBUILD - use archive and SHA256SUM validation
Signed-off-by: Aditya Sirish <aditya@saky.in>
-rw-r--r--.SRCINFO9
-rw-r--r--PKGBUILD22
2 files changed, 16 insertions, 15 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f21a20999806..285bd94c5475 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,14 @@
pkgbase = gomod
pkgdesc = Go modules analysis tool
pkgver = 0.7.1
- pkgrel = 2
+ pkgrel = 3
url = https://github.com/Helcaraxan/gomod
- arch = any
+ arch = x86_64
license = MIT
makedepends = go
makedepends = git
makedepends = glibc
- provides = gomod
- source = git+https://github.com/Helcaraxan/gomod.git#tag=v0.7.1
- sha256sums = SKIP
+ source = gomod-0.7.1.tar.gz::https://github.com/Helcaraxan/gomod/archive/v0.7.1.tar.gz
+ sha256sums = b3fc070c32454691a1e48f643b83563d3aa1c6c2c96ddd9ce892ac0f20cae68c
pkgname = gomod
diff --git a/PKGBUILD b/PKGBUILD
index 67a9b4e2ae35..66ba8702fc31 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,26 +1,28 @@
# Maintainer: Aditya Sirish <aditya@saky.in>
pkgname=('gomod')
-_srcname="gomod"
pkgver=0.7.1
-pkgrel=2
+pkgrel=3
pkgdesc="Go modules analysis tool"
-provides=('gomod')
-arch=('any')
+arch=('x86_64')
license=('MIT')
url="https://github.com/Helcaraxan/gomod"
-source=("git+${url}.git#tag=v${pkgver}")
+source=("$pkgname-$pkgver.tar.gz::${url}/archive/v${pkgver}.tar.gz")
+sha256sums=('b3fc070c32454691a1e48f643b83563d3aa1c6c2c96ddd9ce892ac0f20cae68c')
makedepends=('go' 'git' 'glibc')
-sha256sums=('SKIP')
-
build() {
- cd "${_srcname}"
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+ export CGO_LDFLAGS="${LDFLAGS}"
+ export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
+
+ cd "$pkgname-$pkgver"
go build
}
package() {
- cd "${_srcname}"
- go build
+ cd "$pkgname-$pkgver"
install -Dm 755 -t "${pkgdir}/usr/bin" gomod
}