blob: f18224a479647895021ae7361a6d5c2f5356dd7d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# Maintainer: Oscar Cowdery Lack <oscar.cowderylack@gmail.com>
pkgname=nsc
pkgver=2.8.6
pkgrel=1
pkgdesc="A tool for creating NATS account and user access configurations"
arch=(x86_64)
url="https://github.com/nats-io/nsc"
license=('Apache-2.0')
makedepends=(go)
source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz")
sha256sums=('74d240d33e223fd81bf750eaeda117c3686061ef787ee388342c38ad716da127')
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 -ldflags=-linkmode=external -mod=readonly -modcacherw"
# disable self-updates
sed -i 's|github = "nats-io/nsc"|github = ""|' cmd/defaults.go
go build -ldflags="-X main.version=${pkgver}" .
}
package() {
cd "$pkgname-$pkgver"
install -Dm755 ./$pkgname "$pkgdir"/usr/bin/$pkgname
}
|