summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorRayr2022-09-13 09:00:04 +0300
committerRayr2022-09-13 09:00:04 +0300
commit2285a23b27b57da727e6df8fe78d53f644decae6 (patch)
treee966774f37f176b96fd487e50e3710be927fa062
parent6fe07b1027131246c0bd7bc7b90f512fe95b22e6 (diff)
downloadaur-2285a23b27b57da727e6df8fe78d53f644decae6.tar.gz
Added Go Flags
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD10
2 files changed, 10 insertions, 2 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f82a4dd03e54..99712caa879f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = weather-cli
pkgdesc = An app made to get weather information through the terminal written in Go
pkgver = 1.2.2
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/Rayrsn/Weather-Cli
arch = x86_64
license = GPL
diff --git a/PKGBUILD b/PKGBUILD
index e53fce541840..b5fd0c032a99 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=weather-cli
pkgver=1.2.2
-pkgrel=1
+pkgrel=2
pkgdesc="An app made to get weather information through the terminal written in Go"
arch=('x86_64')
url="https://github.com/Rayrsn/Weather-Cli"
@@ -10,6 +10,14 @@ license=('GPL')
makedepends=('go')
source=("https://github.com/Rayrsn/Weather-Cli/archive/refs/tags/$pkgver.zip")
md5sums=('c527ccfa94eae146d593ed69febf8f66')
+
+# Go Flags https://wiki.archlinux.org/title/Go_package_guidelines#Flags_and_build_options
+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"
+
build() {
cd "Weather-Cli-$pkgver"
go build