Skip to content
Snippets Groups Projects
Commit 58085cda authored by Drew DeVault's avatar Drew DeVault Committed by Leo
Browse files

testing/yggdrasil: new aport

parent b35d8334
No related branches found
No related tags found
3 merge requests!11958community/rclone: upgrade to 1.52.3,!9763[3.12] community/znc: upgrade to 1.8.1,!9743testing/yggdrasil: new aport
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=yggdrasil
pkgver=0.3.14
pkgrel=0
pkgdesc="An experiment in scalable routing as an encrypted IPv6 overlay network"
url="https://yggdrasil-network.github.io/"
arch="all"
license="LGPL-3.0-only"
makedepends="go"
source="
$pkgname-$pkgver.tar.gz::https://github.com/yggdrasil-network/yggdrasil-go/archive/v$pkgver.tar.gz
$pkgname.confd
$pkgname.initd
modules.conf
"
builddir="$srcdir/$pkgname-go-$pkgver"
options="!check" # upstream test suite is broken/unusual
subpackages="$pkgname-openrc"
build() {
go mod vendor
pkgsrc=github.com/yggdrasil-network/yggdrasil-go/src/version
LDFLAGS="$LDFLAGS -X $pkgsrc.buildName=$pkgname -X $PKGSRC.buildVersion=$pkgver"
for cmd in yggdrasil yggdrasilctl
do
go build \
-trimpath \
-mod=vendor \
-ldflags "-extldflags $LDFLAGS" \
./cmd/$cmd
done
}
package() {
install -Dm755 yggdrasil "$pkgdir"/usr/bin/yggdrasil
install -Dm755 yggdrasilctl "$pkgdir"/usr/bin/yggdrasilctl
install -Dm644 "$srcdir"/yggdrasil.confd \
"$pkgdir"/etc/conf.d/yggdrasil
install -Dm755 "$srcdir"/yggdrasil.initd \
"$pkgdir"/etc/init.d/yggdrasil
install -Dm644 "$srcdir"/modules.conf \
"$pkgdir"/etc/modules-load.d/yggdrasil.conf
}
sha512sums="3c3e92c7d49a08d2390a5d7226387c83b5575d55ae90b1209a103b50659ae60d978e39ee9247f548efe90228c3ce544b17bb205f9dcbc7f67262beaf9b7c38bf yggdrasil-0.3.14.tar.gz
089221d9dd703b21714ac5ec04f23218083d216ff259fdd76942c9b2089ee4ca908b360dca0c1f4fa2e0bb1de7d57f0c638d8db9bc782cbe0ed1733f6888171a yggdrasil.confd
2c08ea638be7632d930e0a80e85ce5311f6703870eada5ad41dd6033f1837a9a41b3d567af807e55004af1f06dfd69e6a49e321340e2b0113b73f5a25237879d yggdrasil.initd
871b650ff982be061532b4c5fe4812f41e6e2c58fc69b24f8a745f9a43389da44e742a69b0467b3c3d9e2b031af0728e20f10fa4584695c4f5ac87768a1fd34e modules.conf"
tun
yggdrasil_config_file=/etc/yggdrasil.conf
output_log=/var/log/yggdrasil.log
error_log=/var/log/yggdrasil.log
#!/sbin/openrc-run
name="yggdrasil"
description="An experiment in scalable routing as an encrypted IPv6 overlay network"
supervisor=supervise-daemon
command=/usr/bin/yggdrasil
command_args="-useconffile $yggdrasil_config_file"
command_user="yggdrasil:yggdrasil"
depend() {
need net
after firewall
before radvd
}
start_pre() {
[ -n "$output_log" ] && checkpath -f "$output_log" \
-m 644 -o yggdrasil:yggdrasil || true
[ -n "$error_log" ] && checkpath -f "$error_log" \
-m 644 -o yggdrasil:yggdrasil || true
checkpath /var/run/yggdrasil.sock -m 755 -o yggdrasil:yggdrasil
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment