summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorMario Finelli2025-02-24 11:46:25 +0100
committerMario Finelli2025-02-24 11:46:25 +0100
commitfd94bea7518a82dd433059455e9456bacd551fd8 (patch)
tree88d6803bc976a2201090fc3a31c8f97e998bb61c /PKGBUILD
parentdc4636b4bd7b2a3e285ba512a26fe781e5889625 (diff)
downloadaur-fd94bea7518a82dd433059455e9456bacd551fd8.tar.gz
upgpkg: nats-server 2.10.25-1
upstream release
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD55
1 files changed, 41 insertions, 14 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 97b903932dbc..e79d9e1e38a4 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,27 +1,54 @@
-# Maintainer: Oscar Cowdery Lack <oscar.cowderylack@gmail.com>
+# Maintainer: Mario Finelli <mario at finel dot li>
+# Contributor: Oscar Cowdery Lack <oscar.cowderylack@gmail.com>
+
pkgname=nats-server
-pkgver=2.10.22
+pkgver=2.10.25
pkgrel=1
pkgdesc="High-Performance server for NATS.io, the cloud and edge native messaging system"
arch=(x86_64)
-url="https://github.com/nats-io/nats-server"
-license=('Apache-2.0')
+url=https://github.com/nats-io/nats-server
+license=(Apache-2.0)
+depends=(glibc)
makedepends=(git go)
-source=("$pkgname::git+$url#tag=v$pkgver")
-sha256sums=('af38936f8424af4a05681757a6e4f3f000752d0d7bc370f02ac9d6b8c4be7470')
+source=("$pkgname::git+$url.git#tag=v$pkgver")
+sha256sums=('7de7620f63320ce357ee5c102743bdb3591526a517b9ce82bb9e2013c66481e2')
+
+prepare() {
+ cd $pkgname
+ export GOPATH="${srcdir}/gopath"
+ go mod download
+}
+
+check() {
+ cd $pkgname
+ # TODO: tests try to communicate with real syslog
+ # go test -v -mod=readonly ./...
+}
build() {
- cd "$pkgname"
- 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
+
+ export CGO_LDFLAGS="$LDFLAGS"
+ export CGO_CFLAGS="$CFLAGS"
+ export CGO_CPPFLAGS="$CPPFLAGS"
+ export CGO_CXXFLAGS="$CXXFLAGS"
- go build .
+ export GOPATH="${srcdir}/gopath"
+
+ go build \
+ -o nats-server \
+ -trimpath \
+ -buildmode=pie \
+ -mod=readonly \
+ -ldflags "-linkmode external -extldflags \"${LDFLAGS}\"" \
+ .
}
package() {
cd "$pkgname"
- install -Dm755 ./$pkgname "$pkgdir"/usr/bin/$pkgname
+ install -Dm0755 nats-server "$pkgdir/usr/bin/$pkgname"
+ install -Dm0644 -t "$pkgdir/usr/share/doc/$pkgname/" *.md
+ install -Dm0644 -t "$pkgdir/usr/share/doc/$pkgname/" *.txt
}
+
+# vim: set ts=2 sw=2 et: