mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-19 20:13:01 -04:00
net-p2p/yggdrasil-go: install docs, set file capabilities
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
EAPI=8
|
EAPI=8
|
||||||
|
|
||||||
inherit go-module linux-info systemd
|
inherit go-module linux-info systemd fcaps
|
||||||
|
|
||||||
DESCRIPTION="An experiment in scalable routing as an encrypted IPv6 overlay network"
|
DESCRIPTION="An experiment in scalable routing as an encrypted IPv6 overlay network"
|
||||||
HOMEPAGE="https://yggdrasil-network.github.io/"
|
HOMEPAGE="https://yggdrasil-network.github.io/"
|
||||||
@@ -24,6 +24,10 @@ DEPEND="
|
|||||||
|
|
||||||
BDEPEND=">=dev-lang/go-1.17.0"
|
BDEPEND=">=dev-lang/go-1.17.0"
|
||||||
|
|
||||||
|
FILECAPS=(
|
||||||
|
cap_net_admin,cap_net_bind_service "usr/bin/yggdrasil"
|
||||||
|
)
|
||||||
|
|
||||||
pkg_setup() {
|
pkg_setup() {
|
||||||
linux-info_pkg_setup
|
linux-info_pkg_setup
|
||||||
if ! linux_config_exists; then
|
if ! linux_config_exists; then
|
||||||
@@ -35,15 +39,19 @@ pkg_setup() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
src_compile() {
|
src_compile() {
|
||||||
PKGNAME="${PN}" PKGVER="${PV}" \
|
local package="github.com/yggdrasil-network/yggdrasil-go/src/version"
|
||||||
GOFLAGS="-trimpath -buildmode=pie -mod=readonly" \
|
|
||||||
./build -l "-linkmode external -extldflags \"${LDFLAGS}\""
|
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
|
||||||
|
done
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
src_install() {
|
src_install() {
|
||||||
dobin {yggdrasil,yggdrasilctl}
|
dobin {yggdrasil,yggdrasilctl}
|
||||||
|
dodoc README.md
|
||||||
|
dodoc CHANGELOG.md
|
||||||
systemd_dounit "contrib/systemd/yggdrasil.service"
|
systemd_dounit "contrib/systemd/yggdrasil.service"
|
||||||
systemd_dounit "contrib/systemd/yggdrasil-default-config.service"
|
systemd_dounit "contrib/systemd/yggdrasil-default-config.service"
|
||||||
doinitd "contrib/openrc/yggdrasil"
|
doinitd "contrib/openrc/yggdrasil"
|
||||||
einstalldocs
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,13 +3,12 @@
|
|||||||
|
|
||||||
EAPI=8
|
EAPI=8
|
||||||
|
|
||||||
inherit go-module linux-info systemd git-r3
|
inherit go-module linux-info systemd git-r3 fcaps
|
||||||
|
|
||||||
EGIT_REPO_URI="https://github.com/yggdrasil-network/yggdrasil-go"
|
EGIT_REPO_URI="https://github.com/yggdrasil-network/yggdrasil-go"
|
||||||
|
|
||||||
DESCRIPTION="An experiment in scalable routing as an encrypted IPv6 overlay network"
|
DESCRIPTION="An experiment in scalable routing as an encrypted IPv6 overlay network"
|
||||||
HOMEPAGE="https://yggdrasil-network.github.io/"
|
HOMEPAGE="https://yggdrasil-network.github.io/"
|
||||||
DOCS=( README.md )
|
|
||||||
|
|
||||||
LICENSE="LGPL-3 MIT Apache-2.0 BSD ZLIB"
|
LICENSE="LGPL-3 MIT Apache-2.0 BSD ZLIB"
|
||||||
SLOT="0"
|
SLOT="0"
|
||||||
@@ -20,7 +19,11 @@ DEPEND="
|
|||||||
acct-group/yggdrasil
|
acct-group/yggdrasil
|
||||||
"
|
"
|
||||||
|
|
||||||
BDEPEND=">=dev-lang/go-1.16.0"
|
BDEPEND=">=dev-lang/go-1.17.0"
|
||||||
|
|
||||||
|
FILECAPS=(
|
||||||
|
cap_net_admin,cap_net_bind_service "usr/bin/yggdrasil"
|
||||||
|
)
|
||||||
|
|
||||||
pkg_setup() {
|
pkg_setup() {
|
||||||
linux-info_pkg_setup
|
linux-info_pkg_setup
|
||||||
@@ -38,12 +41,17 @@ src_unpack() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
src_compile() {
|
src_compile() {
|
||||||
GOFLAGS="-trimpath -buildmode=pie -mod=readonly" \
|
local package="github.com/yggdrasil-network/yggdrasil-go/src/version"
|
||||||
./build -l "-linkmode external -extldflags \"${LDFLAGS}\""
|
|
||||||
|
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
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
src_install() {
|
src_install() {
|
||||||
dobin {yggdrasil,yggdrasilctl}
|
dobin {yggdrasil,yggdrasilctl}
|
||||||
|
dodoc README.md
|
||||||
|
dodoc CHANGELOG.md
|
||||||
systemd_dounit "contrib/systemd/yggdrasil.service"
|
systemd_dounit "contrib/systemd/yggdrasil.service"
|
||||||
systemd_dounit "contrib/systemd/yggdrasil-default-config.service"
|
systemd_dounit "contrib/systemd/yggdrasil-default-config.service"
|
||||||
doinitd "contrib/openrc/yggdrasil"
|
doinitd "contrib/openrc/yggdrasil"
|
||||||
|
|||||||
Reference in New Issue
Block a user