git: bb1dea909cdd - main - net/mdns-bridge: New port

From: Renato Botelho <garga_at_FreeBSD.org>
Date: Wed, 20 Nov 2024 11:24:19 UTC
The branch main has been updated by garga:

URL: https://cgit.FreeBSD.org/ports/commit/?id=bb1dea909cdd856bbb42c42cddf52fc751edec4c

commit bb1dea909cdd856bbb42c42cddf52fc751edec4c
Author:     Denny Page <dennypage@me.com>
AuthorDate: 2024-11-20 11:22:37 +0000
Commit:     Renato Botelho <garga@FreeBSD.org>
CommitDate: 2024-11-20 11:24:10 +0000

    net/mdns-bridge: New port
    
    daemon for forwarding mDNS data between network interfaces. It
    is intended for use by firewalls to provide service discovery
    across network segments, with and without filtering, for both
    IPv4 and IPv6.
    
    PR:             282569
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
---
 net/Makefile                         |  1 +
 net/mdns-bridge/Makefile             | 21 +++++++++++++++++++++
 net/mdns-bridge/distinfo             |  3 +++
 net/mdns-bridge/files/mdns_bridge.in | 30 ++++++++++++++++++++++++++++++
 net/mdns-bridge/pkg-descr            |  4 ++++
 net/mdns-bridge/pkg-plist            |  2 ++
 6 files changed, 61 insertions(+)

diff --git a/net/Makefile b/net/Makefile
index df46c484b725..fddeeb7fde1b 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -465,6 +465,7 @@
     SUBDIR += mailimporter
     SUBDIR += malo-firmware-kmod
     SUBDIR += mcjoin
+    SUBDIR += mdns-bridge
     SUBDIR += mdns-repeater
     SUBDIR += measurement-kit
     SUBDIR += mediastreamer
diff --git a/net/mdns-bridge/Makefile b/net/mdns-bridge/Makefile
new file mode 100644
index 000000000000..50d6afc1a608
--- /dev/null
+++ b/net/mdns-bridge/Makefile
@@ -0,0 +1,21 @@
+PORTNAME=	mdns-bridge
+PORTVERSION=	1.0.1
+DISTVERSIONPREFIX=	v
+CATEGORIES=	net
+
+MAINTAINER=	dennypage@me.com
+COMMENT=	Multicast DNS Bridge
+WWW=		https://github.com/dennypage/mdns-bridge
+
+LICENSE=	BSD2CLAUSE
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	dennypage
+
+USE_RC_SUBR=	mdns_bridge
+
+do-install:
+	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
+	${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.conf.example ${STAGEDIR}${PREFIX}/etc/${PORTNAME}.conf.sample
+
+.include <bsd.port.mk>
diff --git a/net/mdns-bridge/distinfo b/net/mdns-bridge/distinfo
new file mode 100644
index 000000000000..f335f9e8e12b
--- /dev/null
+++ b/net/mdns-bridge/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1730828610
+SHA256 (dennypage-mdns-bridge-v1.0.1_GH0.tar.gz) = e4c42db1b2f1f49e7427db92da0553b54f36225c6e4dd6af9679174840e6f492
+SIZE (dennypage-mdns-bridge-v1.0.1_GH0.tar.gz) = 26051
diff --git a/net/mdns-bridge/files/mdns_bridge.in b/net/mdns-bridge/files/mdns_bridge.in
new file mode 100644
index 000000000000..746865d123c6
--- /dev/null
+++ b/net/mdns-bridge/files/mdns_bridge.in
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+# PROVIDE: mdns_bridge
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+#
+# Add these lines to /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# mdns_bridge_enable (bool):	Set to NO by default.
+#				Set it to YES to enable mdns-bridge.
+# mdns_bridge_config (path):	Set to %%PREFIX%%/etc/mdns-bridge.conf
+#				by default.
+
+. /etc/rc.subr
+
+name=mdns_bridge
+rcvar=mdns_bridge_enable
+
+load_rc_config $name
+
+: ${mdns_bridge_enable:=NO}
+: ${mdns_bridge_config=%%PREFIX%%/etc/mdns-bridge.conf}
+
+command=%%PREFIX%%/sbin/${name}
+pidfile=/var/run/${name}.pid
+
+command_args="-s -p $pidfile -c $mdns_bridge_config"
+
+run_rc_command "$1"
diff --git a/net/mdns-bridge/pkg-descr b/net/mdns-bridge/pkg-descr
new file mode 100644
index 000000000000..a3e2ede0b92c
--- /dev/null
+++ b/net/mdns-bridge/pkg-descr
@@ -0,0 +1,4 @@
+daemon for forwarding mDNS data between network interfaces. It
+is intended for use by firewalls to provide service discovery
+across network segments, with and without filtering, for both
+IPv4 and IPv6.
diff --git a/net/mdns-bridge/pkg-plist b/net/mdns-bridge/pkg-plist
new file mode 100644
index 000000000000..0ba7a825023d
--- /dev/null
+++ b/net/mdns-bridge/pkg-plist
@@ -0,0 +1,2 @@
+bin/mdns-bridge
+@sample etc/mdns-bridge.conf.sample