summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorJulien BONACHERA2020-05-25 11:22:48 +0200
committerJulien BONACHERA2020-05-25 11:22:48 +0200
commit56cf5c93ca388fbf1ef647acd8045312fdc1eb7a (patch)
tree60225dfab4c610f87db2577174904dfd65883da0 /PKGBUILD
downloadaur-56cf5c93ca388fbf1ef647acd8045312fdc1eb7a.tar.gz
release v1.0.9
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD36
1 files changed, 36 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..bff9c112b873
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,36 @@
+pkgname=wasp
+pkgver=1.0.9
+pkgrel=1
+pkgdesc='Distributed MQTT Broker, written in go.'
+arch=('x86_64')
+url="https://github.com/vx-labs/wasp/"
+license=('GPL')
+makedepends=('go')
+source=("${url}/archive/v${pkgver}.tar.gz")
+sha256sums=('acbaa6dfb6634411bdf56c36394127a772bfa091dda2576db8f54fcc4d06f330')
+
+prepare(){
+ cd "$pkgname-$pkgver"
+ mkdir -p build/
+}
+
+build() {
+ cd "$pkgname-$pkgver"
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+ export CGO_LDFLAGS="${LDFLAGS}"
+ export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
+ go build -o build ./cmd/...
+}
+
+check() {
+ cd "$pkgname-$pkgver"
+ go test ./...
+}
+
+package() {
+ cd "$pkgname-$pkgver"
+ install -Dm755 build/$pkgname "$pkgdir"/usr/bin/$pkgname
+ install -Dm755 build/waspctl "$pkgdir"/usr/bin/waspctl
+}