From 3b818583939050b64fa2c995ee795ef85fbfa779 Mon Sep 17 00:00:00 2001 From: BratishkaErik Date: Sat, 26 Mar 2022 21:28:19 +0600 Subject: [PATCH] net-p2p/yggdrasil-go: add 9999 version Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: BratishkaErik --- net-p2p/yggdrasil-go/yggdrasil-go-9999.ebuild | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 net-p2p/yggdrasil-go/yggdrasil-go-9999.ebuild diff --git a/net-p2p/yggdrasil-go/yggdrasil-go-9999.ebuild b/net-p2p/yggdrasil-go/yggdrasil-go-9999.ebuild new file mode 100644 index 0000000000..d803f16d4a --- /dev/null +++ b/net-p2p/yggdrasil-go/yggdrasil-go-9999.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit go-module linux-info systemd git-r3 + +EGIT_REPO_URI="https://github.com/yggdrasil-network/yggdrasil-go" + +DESCRIPTION="An experiment in scalable routing as an encrypted IPv6 overlay network" +HOMEPAGE="https://yggdrasil-network.github.io/" +DOCS=( README.md ) + +LICENSE="LGPL-3 MIT Apache-2.0 BSD ZLIB" +SLOT="0" +KEYWORDS="" + +DEPEND=" + acct-user/yggdrasil + acct-group/yggdrasil +" + +BDEPEND=">=dev-lang/go-1.16.0" + +pkg_setup() { + linux-info_pkg_setup + if ! linux_config_exists; then + eerror "Unable to check your kernel for TUN support" + else + CONFIG_CHECK="~TUN" + ERROR_TUN="Your kernel lacks TUN support." + fi +} + +src_unpack() { + git-r3_src_unpack + go-module_live_vendor +} + +src_compile() { + GOFLAGS="-trimpath -buildmode=pie -mod=readonly" \ + ./build -l "-linkmode external -extldflags \"${LDFLAGS}\"" +} + +src_install() { + dobin {yggdrasil,yggdrasilctl} + systemd_dounit "contrib/systemd/yggdrasil.service" + systemd_dounit "contrib/systemd/yggdrasil-default-config.service" + doinitd "contrib/openrc/yggdrasil" +}