mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-05-05 20:36:40 +02:00
testing/corerad: new aport
This commit is contained in:
parent
7cc83ceda7
commit
91c5e30b66
40
testing/corerad/APKBUILD
Normal file
40
testing/corerad/APKBUILD
Normal file
@ -0,0 +1,40 @@
|
||||
# Contributor: Mark Pashmfouroush <mark@markpash.me>
|
||||
# Maintainer: Mark Pashmfouroush <mark@markpash.me>
|
||||
pkgname=corerad
|
||||
pkgver=0.3.2
|
||||
pkgrel=0
|
||||
pkgdesc="Extensible and observable IPv6 Neighbor Discovery Protocol router advertisement daemon"
|
||||
url="https://corerad.net/"
|
||||
license="Apache-2.0"
|
||||
arch="all"
|
||||
options="net" # Requires net for getting go module dependencies
|
||||
makedepends="go libcap"
|
||||
install="$pkgname.pre-install"
|
||||
subpackages="$pkgname-openrc"
|
||||
source="
|
||||
$pkgname-$pkgver.tar.gz::https://github.com/mdlayher/corerad/archive/v$pkgver.tar.gz
|
||||
corerad.initd
|
||||
"
|
||||
|
||||
build() {
|
||||
make VERSION="$pkgver"
|
||||
|
||||
# create a minimal configuration file
|
||||
./cmd/corerad/corerad -init
|
||||
}
|
||||
|
||||
check() {
|
||||
go test ./...
|
||||
}
|
||||
|
||||
package() {
|
||||
install -Dm755 cmd/corerad/corerad "$pkgdir"/usr/sbin/corerad
|
||||
setcap cap_net_admin,cap_net_raw+eip "$pkgdir"/usr/sbin/corerad
|
||||
|
||||
install -Dm755 "$srcdir"/corerad.initd "$pkgdir"/etc/init.d/corerad
|
||||
install -Dm644 corerad.toml "$pkgdir"/etc/corerad/config.toml
|
||||
}
|
||||
sha512sums="
|
||||
0a236599bdbfa420400a041de87d75123aa51f4ff1cfb36fa6aef1ca8dce6988d95616b02d6d160cc1b31e9b6ec296ff67b4751b174722cea0e19eb913123d6d corerad-0.3.2.tar.gz
|
||||
96c40309aa6e81db5e5d136ee2ca9b1c24471acd1b20ff773020d3106dcc82e0fcb4b52112cbcb2b16c45211073b1d19bc0381ef7d93bd1c3cf53745633a22b4 corerad.initd
|
||||
"
|
||||
13
testing/corerad/corerad.initd
Normal file
13
testing/corerad/corerad.initd
Normal file
@ -0,0 +1,13 @@
|
||||
#!/sbin/openrc-run
|
||||
|
||||
name=CoreRAD
|
||||
description="Extensible and observable IPv6 Neighbor Discovery Protocol router advertisement daemon"
|
||||
command=/usr/sbin/corerad
|
||||
command_args="-c /etc/corerad/config.toml"
|
||||
command_user="corerad:corerad"
|
||||
supervisor="supervise-daemon"
|
||||
|
||||
depend() {
|
||||
need net
|
||||
after firewall
|
||||
}
|
||||
6
testing/corerad/corerad.pre-install
Normal file
6
testing/corerad/corerad.pre-install
Normal file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
addgroup -S corerad 2>/dev/null
|
||||
adduser -S -D -H -s /bin/nologin -G corerad -g corerad corerad 2>/dev/null
|
||||
|
||||
exit 0
|
||||
Loading…
x
Reference in New Issue
Block a user