# This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # yggdrasil # yggdrasil/Makefile # yggdrasil/files # yggdrasil/files/yggdrasil.in # yggdrasil/pkg-descr # yggdrasil/distinfo # echo c - yggdrasil mkdir -p yggdrasil > /dev/null 2>&1 echo x - yggdrasil/Makefile sed 's/^X//' >yggdrasil/Makefile << '08414c2ec341a0cbdf4e978f465352dc' X# $FreeBSD$ X XPORTNAME= yggdrasil XPORTVERSION= 0.3.5 XCATEGORIES= net ipv6 XMASTER_SITES= https://github.com/yggdrasil-network/yggdrasil-go/ XDIST_SUBDIR= yggdrasil X XMAINTAINER= neilalexander@users.noreply.github.com XCOMMENT= Experimental end-to-end encrypted self-arranging IPv6 network X XLICENSE= LGPL3 XLICENSE_FILE= ${WRKSRC}/LICENSE X XBUILD_DEPENDS= go>=1.11:lang/go X XUSE_GITHUB= yes XGH_ACCOUNT= yggdrasil-network XGH_PROJECT= yggdrasil-go XGH_TAGNAME= v0.3.5 X XPLIST_FILES= bin/yggdrasil \ X bin/yggdrasilctl X XUSE_RC_SUBR= yggdrasil X Xpre-build: X @${REINPLACE_CMD} -e 's/set -ef/set -f/' ${WRKSRC}/build X Xdo-build: X #export PKGNAME=${PORTNAME} X #export PKGVER=${PORTVERSION} X cd ${WRKSRC} && PKGNAME=${PORTNAME} PKGVER=${PORTVERSION} ./build X Xdo-install: X ${MKDIR} ${STAGEDIR}${DATADIR} X ${INSTALL_PROGRAM} ${WRKSRC}/yggdrasil ${STAGEDIR}${PREFIX}/bin/yggdrasil X ${INSTALL_PROGRAM} ${WRKSRC}/yggdrasilctl ${STAGEDIR}${PREFIX}/bin/yggdrasilctl X Xpost-install: X ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/yggdrasil X ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/yggdrasilctl X X.include 08414c2ec341a0cbdf4e978f465352dc echo c - yggdrasil/files mkdir -p yggdrasil/files > /dev/null 2>&1 echo x - yggdrasil/files/yggdrasil.in sed 's/^X//' >yggdrasil/files/yggdrasil.in << 'b80588c5db68a9262cc8bdf7e3a8cd36' X#!/bin/sh X# X# PROVIDE: yggdrasil X# REQUIRE: networking X# KEYWORD: shutdown X X. /etc/rc.subr X Xname="yggdrasil" Xrcvar="yggdrasil_enable" X Xstart_cmd="${name}_start" Xstart_precmd="${name}_prestart" Xstop_cmd="${name}_stop" Xstop_postcmd="${name}_poststop" X Xpidfile="/var/run/yggdrasil/${name}.pid" Xcommand="/usr/sbin/daemon" Xcommand_args="-P ${pidfile} -r -f ${yggdrasil_command}" X Xyggdrasil_prestart() X{ X test ! -x %%PREFIX%%/bin/yggdrasil && ( X logger -s -t yggdrasil "Warning: %%PREFIX%%/bin/yggdrasil is missing or not executable" X logger -s -t yggdrasil "Copy the yggdrasil binary into %%PREFIX%%/bin and then chmod +x %%PREFIX%%/bin/yggdrasil" X return 1 X ) X X test ! -f /etc/yggdrasil.conf && ( X logger -s -t yggdrasil "Generating new configuration file into /etc/yggdrasil.conf" X %%PREFIX%%/bin/yggdrasil -genconf > /etc/yggdrasil.conf X ) X X tap_path="$(cat /etc/yggdrasil.conf | egrep -o '/dev/tap[0-9]{1,2}$')" X tap_name="$(echo -n ${tap_path} | tr -d '/dev/')" X X /sbin/ifconfig ${tap_name} >/dev/null 2>&1 || ( X logger -s -t yggdrasil "Creating ${tap_name} adapter" X /sbin/ifconfig ${tap_name} create || logger -s -t yggdrasil "Failed to create ${tap_name} adapter" X ) X X test ! -d /var/run/yggdrasil && mkdir -p /var/run/yggdrasil X} X Xyggdrasil_start() X{ X /sbin/ifconfig ${tap_name} >/dev/null 2>&1 || ( X logger -s -t yggdrasil "Creating ${tap_name} adapter" X /sbin/ifconfig ${tap_name} create || logger -s -t yggdrasil "Failed to create ${tap_name} adapter" X ) X X test ! -d /var/run/yggdrasil && mkdir -p /var/run/yggdrasil X X logger -s -t yggdrasil "Starting yggdrasil" X ${command} ${command_args} %%PREFIX%%/bin/yggdrasil -useconffile /etc/yggdrasil.conf \ X 1>/var/log/yggdrasil.stdout.log \ X 2>/var/log/yggdrasil.stderr.log & X} X Xyggdrasil_stop() X{ X logger -s -t yggdrasil "Stopping yggdrasil" X test -f /var/run/yggdrasil/${name}.pid && kill -TERM $(cat /var/run/yggdrasil/${name}.pid) X} X Xyggdrasil_poststop() X{ X tap_path="$(cat /etc/yggdrasil.conf | grep /dev/tap | egrep -o '/dev/.*$')" X tap_name="$(echo -n ${tap_path} | tr -d '/dev/')" X X /sbin/ifconfig ${tap_name} >/dev/null 2>&1 && ( X logger -s -t yggdrasil "Destroying ${tap_name} adapter" X /sbin/ifconfig ${tap_name} destroy || logger -s -t yggdrasil "Failed to destroy ${tap_name} adapter" X ) X} X Xload_rc_config $name X: ${yggdrasil_enable:=no} X Xrun_rc_command "$1" b80588c5db68a9262cc8bdf7e3a8cd36 echo x - yggdrasil/pkg-descr sed 's/^X//' >yggdrasil/pkg-descr << '023722dcb05da491ddaf4c62cede0704' XYggdrasil is an early-stage implementation of a fully end-to-end encrypted IPv6 Xnetwork. It is lightweight, self-arranging, supported on multiple platforms and Xallows pretty much any IPv6-capable application to communicate securely with Xother Yggdrasil nodes. Yggdrasil does not require you to have IPv6 Internet Xconnectivity - it also works over IPv4. X XWWW: https://yggdrasil-network.github.io/ 023722dcb05da491ddaf4c62cede0704 echo x - yggdrasil/distinfo sed 's/^X//' >yggdrasil/distinfo << '72534f496b34a8dd2ca6b764d2bfa2ba' XTIMESTAMP = 1552773018 XSHA256 (yggdrasil/yggdrasil-network-yggdrasil-go-0.3.5-v0.3.5_GH0.tar.gz) = 2c69029adeb053ad049e90f1e4b7efa986094779868da77464d3c869984e861b XSIZE (yggdrasil/yggdrasil-network-yggdrasil-go-0.3.5-v0.3.5_GH0.tar.gz) = 139430 72534f496b34a8dd2ca6b764d2bfa2ba exit