diff --git a/repo/nebula-bgme/PKGBUILD b/repo/nebula-bgme/PKGBUILD new file mode 100644 index 0000000..11073f3 --- /dev/null +++ b/repo/nebula-bgme/PKGBUILD @@ -0,0 +1,51 @@ +# Maintainer: Robin Broda +pkgname=nebula-bgme +_pkgname=nebula +pkgver=1.7.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') +options=('!lto') +conflicts=('nebula') +provides=('nebula') +source=("${_pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz") +sha256sums=('c4771ce6eb3e142f88f5f4c12443cfca140bf96b2746c74f9536bd1a362f3f88') + +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 +} diff --git a/repo/nebula-bgme/lilac.yaml b/repo/nebula-bgme/lilac.yaml new file mode 100644 index 0000000..80d7ff5 --- /dev/null +++ b/repo/nebula-bgme/lilac.yaml @@ -0,0 +1,12 @@ +maintainers: + - github: yingziwu + email: i@bgme.me + +build_prefix: extra-x86_64 + +pre_build: vcs_update + +post_build: git_pkgbuild_commit + +update_on: + - source: vcs