aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Joldasov <bratishkaerik@getgoogleoff.me>2024-02-14 09:49:59 +0600
committerEric Joldasov <bratishkaerik@getgoogleoff.me>2024-02-14 09:49:59 +0600
commit8821ebed7cb4070b8ad2d5e95f1a331525cb6ace (patch)
tree46c53c0354a38db679669b581a9df4ad2158d648 /net-p2p
parentprofiles: mask net-p2p/popura for removal (diff)
downloadguru-8821ebed7cb4070b8ad2d5e95f1a331525cb6ace.tar.gz
guru-8821ebed7cb4070b8ad2d5e95f1a331525cb6ace.tar.bz2
guru-8821ebed7cb4070b8ad2d5e95f1a331525cb6ace.zip
net-p2p/yggdrasil-go: sync 9999 ebuild with 0.5.5
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
Diffstat (limited to 'net-p2p')
-rw-r--r--net-p2p/yggdrasil-go/yggdrasil-go-9999.ebuild34
1 files changed, 18 insertions, 16 deletions
diff --git a/net-p2p/yggdrasil-go/yggdrasil-go-9999.ebuild b/net-p2p/yggdrasil-go/yggdrasil-go-9999.ebuild
index 20419a673..6e443a39d 100644
--- a/net-p2p/yggdrasil-go/yggdrasil-go-9999.ebuild
+++ b/net-p2p/yggdrasil-go/yggdrasil-go-9999.ebuild
@@ -3,7 +3,7 @@
EAPI=8
-inherit go-module linux-info systemd git-r3 fcaps
+inherit fcaps git-r3 go-module linux-info systemd
EGIT_REPO_URI="https://github.com/yggdrasil-network/yggdrasil-go"
@@ -12,28 +12,20 @@ HOMEPAGE="https://yggdrasil-network.github.io/"
LICENSE="LGPL-3 MIT Apache-2.0 BSD ZLIB"
SLOT="0"
-KEYWORDS=""
DEPEND="
acct-user/yggdrasil
acct-group/yggdrasil
"
-BDEPEND=">=dev-lang/go-1.17.0"
+BDEPEND=">=dev-lang/go-1.20.0"
FILECAPS=(
cap_net_admin,cap_net_bind_service "usr/bin/yggdrasil"
)
-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
-}
+CONFIG_CHECK="~TUN"
+ERROR_TUN="Your kernel lacks TUN support."
src_unpack() {
git-r3_src_unpack
@@ -41,17 +33,27 @@ src_unpack() {
}
src_compile() {
- local package="github.com/yggdrasil-network/yggdrasil-go/src/version"
+ GOFLAGS+=" -mod=vendor -trimpath"
+
+ local ver_config="github.com/yggdrasil-network/yggdrasil-go/src/version"
+
+ local custom_name_version_flags="-X ${ver_config}.buildName=${PN}"
+ custom_name_version_flags+=" -X ${ver_config}.buildVersion=git-${EGIT_VERSION}"
- for CMD in yggdrasil yggdrasilctl ; do
- ego build -buildmode=pie -ldflags "-s -linkmode external -extldflags '${LDFLAGS}' -X ${package}.buildName=${PN} -X ${package}.buildVersion=v${PV}" -trimpath ./cmd/$CMD
+ local GO_LDFLAGS
+ GO_LDFLAGS="-s -linkmode external -extldflags \"${LDFLAGS}\" ${custom_name_version_flags}"
+
+ local cmd
+ for cmd in yggdrasil{,ctl}; do
+ ego build ${GOFLAGS} "-ldflags=${GO_LDFLAGS}" ./cmd/"${cmd}"
done
}
src_install() {
- dobin {yggdrasil,yggdrasilctl}
+ dobin yggdrasil{,ctl}
dodoc README.md
dodoc CHANGELOG.md
+
systemd_dounit "contrib/systemd/yggdrasil.service"
systemd_dounit "contrib/systemd/yggdrasil-default-config.service"
doinitd "contrib/openrc/yggdrasil"