Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions srcpkgs/mycelium/files/mycelium/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh
exec 2>&1
modprobe tun
caps='-all,+NET_ADMIN,+NET_RAW'
drop_caps="setpriv --inh-caps $caps --bounding-set $caps"
if [ -f /etc/mycelium.toml ]; then
exec $drop_caps mycelium --config-file /etc/mycelium.toml 2>&1
else
exec $drop_caps mycelium 2>&1
fi
36 changes: 36 additions & 0 deletions srcpkgs/mycelium/template
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Template file for 'mycelium'
pkgname=mycelium
version=0.7.10
revision=1
build_style=cargo
hostmakedepends="pkg-config"
makedepends="openssl-devel"
short_desc="End-to-end encrypted IPv6 overlay network"
maintainer="Orphaned <orphan@voidlinux.org>"
license=Apache-2.0
homepage="https://github.com/threefoldtech/mycelium"
changelog="https://raw.githubusercontent.com/threefoldtech/mycelium/main/CHANGELOG.md"
distfiles="https://github.com/threefoldtech/mycelium/archive/refs/tags/v${version}.tar.gz"
checksum=cc5d624366dd90b1b96d91faddeb3cbe5862128da5b3628f9327a3dfdc9db5d6

post_install() {
vsv mycelium
}

do_build() {
: ${make_cmd:=cargo auditable}
: ${make_verbose:=-v}
CARGO_TARGET_DIR=target ${make_cmd} build \
${XBPS_VERBOSE+${make_verbose}} --release --locked --target ${RUST_TARGET} \
--manifest-path myceliumd/Cargo.toml
}

do_install() {
vbin target/${RUST_TARGET}/release/mycelium
}

do_check() {
: ${make_cmd:=cargo auditable}
: ${make_verbose:=-v}
${make_cmd} test ${XBPS_VERBOSE+${make_verbose}} --locked --target ${RUST_TARGET}
}