summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorJulian Xhokaxhiu2021-04-22 22:28:39 +0200
committerJulian Xhokaxhiu2021-04-22 22:28:39 +0200
commit573bb90b402c8d71e6965aa8c0617c580bddb979 (patch)
treea999a402721ae271eeaa96f2adcbdaaa8d2b52f4 /PKGBUILD
parentdc42dacedf785c3f517741bb4a859f20b7527830 (diff)
downloadaur-ethr.tar.gz
1.0.0-2
Improve build using the https://wiki.archlinux.org/index.php/Go_package_guidelines
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD12
1 files changed, 11 insertions, 1 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 4661b4533a22..9e785505413c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Julian Xhokaxhiu <info at julianxhokaxhiu dot com>
pkgname=ethr
pkgver=1.0.0
-pkgrel=1
+pkgrel=2
pkgdesc="Ethr is a Network Performance Measurement Tool for TCP, UDP & HTTP"
arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64')
url="https://github.com/Microsoft/ethr"
@@ -16,6 +16,16 @@ sha256sums=('c4bf9d6d4e0659f491b6de6d66ddfe3735d8f6fa791debe9e8bfe0aa0e93ddd3')
build() {
cd "$srcdir/$pkgname-$pkgver"
+ 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"
+
+ # Download dependencies
+ go get -u
+ go mod tidy
+
# Build
go build
}