lilac/repo/nebula-bgme/PKGBUILD

52 lines
1.3 KiB
Bash
Raw Normal View History

2023-08-20 15:58:36 +00:00
# Maintainer: Robin Broda <coderobe @ archlinux.org>
pkgname=nebula-bgme
_pkgname=nebula
pkgver=1.7.2
2023-08-20 16:29:08 +00:00
pkgrel=2
2023-08-20 15:58:36 +00:00
pkgdesc='A scalable overlay networking tool with a focus on performance, simplicity and security'
arch=('x86_64')
url='https://github.com/slackhq/nebula'
license=('MIT')
depends=()
2023-08-20 16:27:03 +00:00
makedepends=('go' 'jq')
2023-08-20 15:58:36 +00:00
options=('!lto')
conflicts=('nebula')
provides=('nebula')
source=("${_pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz")
2023-08-23 09:52:31 +00:00
sha256sums=('c4771ce6eb3e142f88f5f4c12443cfca140bf96b2746c74f9536bd1a362f3f88')
2023-08-20 15:58:36 +00:00
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"
for bin in nebula{,-cert,-service}; do
go build \
-ldflags "-X main.Build=${pkgver}" \
-o "${bin}" "./cmd/${bin}"
done
}
check() {
cd "${_pkgname}-${pkgver}"
go test -v ./...
}
package() {
cd "${_pkgname}-${pkgver}"
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE"
install -Dm644 dist/arch/nebula.service "${pkgdir}/usr/lib/systemd/system/nebula.service"
mkdir -p "${pkgdir}/etc/nebula"
for bin in nebula{,-cert,-service}; do
install -Dm755 "${bin}" "${pkgdir}/usr/bin/${bin}"
done
}