From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id BF6DA158042 for ; Tue, 29 Oct 2024 14:06:47 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 09204E0869; Tue, 29 Oct 2024 14:06:45 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E548BE0869 for ; Tue, 29 Oct 2024 14:06:44 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3661C3430CB for ; Tue, 29 Oct 2024 14:06:44 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A9960227B for ; Tue, 29 Oct 2024 14:06:40 +0000 (UTC) From: "David Roman" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "David Roman" Message-ID: <1730155671.d8e6c2d058b9c7a7e57b7a190bdc190abfa6056a.davidroman@gentoo> Subject: [gentoo-commits] repo/proj/guru:master commit in: net-p2p/yggdrasil-go/ X-VCS-Repository: repo/proj/guru X-VCS-Files: net-p2p/yggdrasil-go/yggdrasil-go-9999.ebuild X-VCS-Directories: net-p2p/yggdrasil-go/ X-VCS-Committer: davidroman X-VCS-Committer-Name: David Roman X-VCS-Revision: d8e6c2d058b9c7a7e57b7a190bdc190abfa6056a X-VCS-Branch: master Date: Tue, 29 Oct 2024 14:06:40 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: c1862fa0-3315-4ce5-b3f1-564fd832d703 X-Archives-Hash: 4c7ea4783409b0a82a1e0fa074b57136 commit: d8e6c2d058b9c7a7e57b7a190bdc190abfa6056a Author: Eric Joldasov landless-city net> AuthorDate: Mon Oct 28 22:47:51 2024 +0000 Commit: David Roman gmail com> CommitDate: Mon Oct 28 22:47:51 2024 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=d8e6c2d0 net-p2p/yggdrasil-go: sync 9999 with 0.5.9 Signed-off-by: Eric Joldasov landless-city.net> net-p2p/yggdrasil-go/yggdrasil-go-9999.ebuild | 52 ++++++++++++++++++--------- 1 file changed, 35 insertions(+), 17 deletions(-) diff --git a/net-p2p/yggdrasil-go/yggdrasil-go-9999.ebuild b/net-p2p/yggdrasil-go/yggdrasil-go-9999.ebuild index 3b6bce73c..285b8c048 100644 --- a/net-p2p/yggdrasil-go/yggdrasil-go-9999.ebuild +++ b/net-p2p/yggdrasil-go/yggdrasil-go-9999.ebuild @@ -1,26 +1,36 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 -inherit fcaps git-r3 go-module linux-info systemd - -EGIT_REPO_URI="https://github.com/yggdrasil-network/yggdrasil-go" +inherit fcaps go-module linux-info systemd DESCRIPTION="An experiment in scalable routing as an encrypted IPv6 overlay network" HOMEPAGE="https://yggdrasil-network.github.io/" +if [[ ${PV} == 9999 ]]; then + EGIT_REPO_URI="https://github.com/yggdrasil-network/yggdrasil-go" + inherit git-r3 +else + SRC_URI=" + https://github.com/yggdrasil-network/yggdrasil-go/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz + https://codeberg.org/BratishkaErik/distfiles/releases/download/yggdrasil-go-${PV}/yggdrasil-go-${PV}-vendor.tar.xz + " + KEYWORDS="~amd64 ~arm64" +fi + LICENSE="LGPL-3 MIT Apache-2.0 BSD ZLIB" SLOT="0" +RESTRICT="mirror" + +BDEPEND=">=dev-lang/go-1.23" DEPEND=" acct-user/yggdrasil acct-group/yggdrasil " -BDEPEND=">=dev-lang/go-1.21" - -DOCS=( README.md CHANGELOG.md ) +DOCS=( "README.md" "CHANGELOG.md" ) FILECAPS=( cap_net_admin,cap_net_bind_service "usr/bin/yggdrasil" @@ -30,24 +40,32 @@ CONFIG_CHECK="~TUN" ERROR_TUN="Your kernel lacks TUN support." src_unpack() { - git-r3_src_unpack - go-module_live_vendor + if [[ ${PV} == 9999 ]]; then + git-r3_src_unpack + go-module_live_vendor + fi + go-module_src_unpack } src_compile() { 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}" + local src="github.com/yggdrasil-network/yggdrasil-go/src/version" + local name version + if [[ ${PV} == 9999 ]]; then + chmod +x ./contrib/semver/{name,version}.sh || die + name="$(./contrib/semver/name.sh || die)" + version="$(./contrib/semver/version.sh || die)" + else + name="yggdrasil" + version="v${PV}" + fi + local custom_name_version_flags="-X ${src}.buildName=${name} -X ${src}.buildVersion=${version}" - local GO_LDFLAGS - GO_LDFLAGS="-s -linkmode external -extldflags \"${LDFLAGS}\" ${custom_name_version_flags}" + local 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}" + ego build ${GOFLAGS} -ldflags="${go_ldflags}" ./cmd/${cmd} done }