From 7ae540b2e84ea05a7d314f965d0667059f3b6e98 Mon Sep 17 00:00:00 2001 From: mykola2312 <49044616+mykola2312@users.noreply.github.com> Date: Thu, 13 Feb 2025 04:59:42 +0200 Subject: [PATCH] net-p2p/lain-uplink-exchange: Add LUX --- net-p2p/lain-uplink-exchange/Makefile | 41 +++++++++++++++++++ net-p2p/lain-uplink-exchange/distinfo | 7 ++++ .../lain-uplink-exchange/files/lux_host.in | 24 +++++++++++ .../lain-uplink-exchange/files/lux_node.in | 23 +++++++++++ net-p2p/lain-uplink-exchange/pkg-descr | 4 ++ net-p2p/lain-uplink-exchange/pkg-plist | 6 +++ 6 files changed, 105 insertions(+) create mode 100644 net-p2p/lain-uplink-exchange/Makefile create mode 100644 net-p2p/lain-uplink-exchange/distinfo create mode 100644 net-p2p/lain-uplink-exchange/files/lux_host.in create mode 100644 net-p2p/lain-uplink-exchange/files/lux_node.in create mode 100644 net-p2p/lain-uplink-exchange/pkg-descr create mode 100644 net-p2p/lain-uplink-exchange/pkg-plist diff --git a/net-p2p/lain-uplink-exchange/Makefile b/net-p2p/lain-uplink-exchange/Makefile new file mode 100644 index 00000000000..236caf5e979 --- /dev/null +++ b/net-p2p/lain-uplink-exchange/Makefile @@ -0,0 +1,41 @@ +PORTNAME= lain-uplink-exchange +DISTVERSIONPREFIX= v +DISTVERSION= 1.0.3 +CATEGORIES= net-p2p net-mgmt +MASTER_SITES?= https://git.lainlounge.xyz/mykola/lux/archive/ +DISTNAME= v${DISTVERSION} +DISTFILES= ${DISTNAME}${EXTRACT_SUFX} + +MAINTAINER= mykola@lainlounge.xyz +COMMENT= Lain Uplink eXchange - distributed host information +WWW= https://git.lainlounge.xyz/mykola/lux + +WRKSRC= ${WRKDIR}/lux + +LICENSE= BSD2CLAUSE +LICENSE_FILE= ${WRKSRC}/LICENSE + +USES= go:1.23,modules +GO_TARGET= .:lux + +USE_GITHUB= nodefault +GH_TUPLE= google:uuid:v1.6.0:google_uuid/vendor/github.com/google/uuid \ + op:go-logging:970db520ece7:op_go_logging/vendor/github.com/op/go-logging + +USERS= lux +GROUPS= lux + +USE_RC_SUBR= lux_node lux_host + +CONFLICTS_INSTALL= lux + +post-install: + ${MKDIR} ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/LICENSE ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR} + ${MKDIR} ${STAGEDIR}/var/lux + ${INSTALL_DATA} ${WRKSRC}/dist/samples/lux-node.xml ${STAGEDIR}/var/lux/lux-node.xml.sample + ${INSTALL_DATA} ${WRKSRC}/dist/samples/lux-host.xml ${STAGEDIR}/var/lux/lux-host.xml.sample + ${MKDIR} ${STAGEDIR}/var/run/lux + +.include diff --git a/net-p2p/lain-uplink-exchange/distinfo b/net-p2p/lain-uplink-exchange/distinfo new file mode 100644 index 00000000000..eb190a6bdb7 --- /dev/null +++ b/net-p2p/lain-uplink-exchange/distinfo @@ -0,0 +1,7 @@ +TIMESTAMP = 1739148677 +SHA256 (v1.0.3.tar.gz) = 2f00f327e8af0195efe4cfd1b444f59bd7209adb1c429359ec1bde72fee8db8b +SIZE (v1.0.3.tar.gz) = 36724 +SHA256 (google-uuid-v1.6.0_GH0.tar.gz) = ee63376b5675376c60e055ed66e5f3651ccc703bd580c022b8ad00cea309252d +SIZE (google-uuid-v1.6.0_GH0.tar.gz) = 20896 +SHA256 (op-go-logging-970db520ece7_GH0.tar.gz) = 452d16dda814a779824097f74dc712c533f84591d9b397175b216f131ad22f17 +SIZE (op-go-logging-970db520ece7_GH0.tar.gz) = 37181 diff --git a/net-p2p/lain-uplink-exchange/files/lux_host.in b/net-p2p/lain-uplink-exchange/files/lux_host.in new file mode 100644 index 00000000000..477021dbe01 --- /dev/null +++ b/net-p2p/lain-uplink-exchange/files/lux_host.in @@ -0,0 +1,24 @@ +#!/bin/sh + +# PROVIDE: lux-host +# REQUIRE: DAEMON +# AFTER: NETWORKING +# KEYWORD: shutdown + +. /etc/rc.subr + +name=lux_host +rcvar=lux_host_enable + +load_rc_config $name +: ${lux_host_chdir:="/var/lux"} +: ${lux_host_config:="lux-host.xml"} +: ${lux_host_user:="lux"} + +pidfile="/var/run/lux/lux_host.pid" +command="/usr/sbin/daemon" +command_args="-l daemon -s info --supervisor-pidfile ${pidfile} /usr/local/bin/lux --host --config ${lux_host_config}" + +run_rc_command "$1" + + diff --git a/net-p2p/lain-uplink-exchange/files/lux_node.in b/net-p2p/lain-uplink-exchange/files/lux_node.in new file mode 100644 index 00000000000..afc7d3633f5 --- /dev/null +++ b/net-p2p/lain-uplink-exchange/files/lux_node.in @@ -0,0 +1,23 @@ +#!/bin/sh + +# PROVIDE: lux-node +# REQUIRE: DAEMON +# AFTER: NETWORKING +# KEYWORD: shutdown + +. /etc/rc.subr + +name=lux_node +rcvar=lux_node_enable + +load_rc_config $name +: ${lux_node_chdir:="/var/lux"} +: ${lux_node_config:="lux-node.xml"} +: ${lux_node_user:="lux"} + +pidfile="/var/run/lux/lux_node.pid" +command="/usr/sbin/daemon" +command_args="-l daemon -s info --supervisor-pidfile ${pidfile} /usr/local/bin/lux --node --config ${lux_node_config}" + +run_rc_command "$1" + diff --git a/net-p2p/lain-uplink-exchange/pkg-descr b/net-p2p/lain-uplink-exchange/pkg-descr new file mode 100644 index 00000000000..258c2f4623b --- /dev/null +++ b/net-p2p/lain-uplink-exchange/pkg-descr @@ -0,0 +1,4 @@ +Lain Uplink eXchange +When networking is not bound to static IPs, or some home deployment +lacking proper network equipment, Lain Uplink eXchange aims to resolve +these issues by providing distributed host information resolution. diff --git a/net-p2p/lain-uplink-exchange/pkg-plist b/net-p2p/lain-uplink-exchange/pkg-plist new file mode 100644 index 00000000000..9e93f975cc5 --- /dev/null +++ b/net-p2p/lain-uplink-exchange/pkg-plist @@ -0,0 +1,6 @@ +bin/lux +share/doc/lain-uplink-exchange/LICENSE +share/doc/lain-uplink-exchange/README.md +@(lux,lux,600) /var/lux/lux-host.xml.sample +@(lux,lux,600) /var/lux/lux-node.xml.sample +@dir(lux,lux,700) /var/run/lux