52 lines
1.3 KiB
Bash
52 lines
1.3 KiB
Bash
# Maintainer: Robin Broda <coderobe @ archlinux.org>
|
|
pkgname=nebula-bgme
|
|
_pkgname=nebula
|
|
pkgver=1.8.2
|
|
pkgrel=1
|
|
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=()
|
|
makedepends=('go' 'jq')
|
|
options=('!lto')
|
|
conflicts=('nebula')
|
|
provides=('nebula')
|
|
source=("${_pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz")
|
|
sha256sums=('203713c58d0ec8a10df2f605af791a77a33f825454911ac3a5313ced591547fd')
|
|
|
|
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
|
|
}
|