summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBarbUk2020-06-05 10:01:00 +0400
committerBarbUk2020-06-05 10:01:00 +0400
commit07faab81697ec326830ce05b4ac4d70cd58a4301 (patch)
treea73f16b1b754dff0c86d55d568ae61948f3efaed
parent472741904febff242feed4bb665ce2245ca4d6f1 (diff)
downloadaur-07faab81697ec326830ce05b4ac4d70cd58a4301.tar.gz
Use go as a dependancy and follow go packaging guidelines
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD7
2 files changed, 7 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c839c84d5d3c..379073a3a19c 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,11 +1,11 @@
pkgbase = hostctl
pkgdesc = Command-line tool to manage your hosts file
pkgver = 1.0.11
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/guumaster/hostctl
arch = x86_64
license = MIT
- makedepends = go-pie
+ makedepends = go
conflicts = hostctl-bin
source = https://github.com/guumaster/hostctl/archive/v1.0.11.tar.gz
sha256sums = 2e39eb64306168593248ea9b2505d22caca9fac1eff3c1e3bf1f0f966df36a8a
diff --git a/PKGBUILD b/PKGBUILD
index 90f7d50d2bbd..26d5bcc3d181 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,13 +2,13 @@
pkgname=hostctl
pkgver=1.0.11
-pkgrel=1
+pkgrel=2
pkgdesc='Command-line tool to manage your hosts file'
arch=('x86_64')
url='https://github.com/guumaster/hostctl'
license=('MIT')
conflicts=("${pkgname}-bin")
-makedepends=('go-pie')
+makedepends=('go')
source=("$url/archive/v$pkgver.tar.gz")
sha256sums=('2e39eb64306168593248ea9b2505d22caca9fac1eff3c1e3bf1f0f966df36a8a')
@@ -16,6 +16,9 @@ build() {
cd $pkgname-$pkgver
go build \
-trimpath \
+ -buildmode=pie \
+ -mod=readonly \
+ -modcacherw \
-ldflags "-X github.com/guumaster/hostctl/pkg/cmd.version=$pkgver -s -w -extldflags $LDFLAGS" \
-o $pkgname cmd/hostctl/main.go
}