1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-13 10:59:13 +02:00
openwrt-packages/net/udp-broadcast-relay-redux-openwrt/Makefile
Aaron Curley e25f3bcfde
udp-broadcast-relay-redux: Add package
This commit is largely based on the work from Daniel Dickinson in
PR #2096 which was never merged. I tweaked it in a number of ways.
All bugs with this package are mine, not his.

Signed-off-by: Aaron Curley <accwebs@gmail.com>
2021-04-19 20:52:09 -07:00

50 lines
1.9 KiB
Makefile

include $(TOPDIR)/rules.mk
PKG_NAME:=udp-broadcast-relay-redux
PKG_RELEASE:=$(AUTORELEASE)
PKG_LICENSE:=GPL-2.0
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/udp-redux/udp-broadcast-relay-redux
PKG_SOURCE_DATE:=2021-04-05
PKG_SOURCE_VERSION:=671372938b55a186625a80516f86e8b9948c977a
PKG_MIRROR_HASH:=11cf8728f2b8e966f4f57032d817a889f680ed8e61afff35b52ca9c6789a03c6
include $(INCLUDE_DIR)/package.mk
define Package/udp-broadcast-relay-redux
SECTION:=net
CATEGORY:=Network
SUBMENU:=Routing and Redirection
TITLE:=listens for packets on a specified UDP broadcast port and replays them
URL:=https://github.com/udp-redux/udp-broadcast-relay-redux
endef
define Package/udp-broadcast-relay-redux/description
This program listens for packets on a specified UDP broadcast port.
When a packet is received, it sends that packet to all specified interfaces but
the one it came from as though it originated from the original sender.
The primary purpose of this is to allow games on machines on separated
local networks (Ethernet, WLAN) that use udp broadcasts to find each other to do so.
It also works on ppp links, so you can log in from windows boxes (e.g. using pptp)
and play LAN-based games together. Currently, you have to care about upcoming or
downgoing interfaces yourself.
endef
define Package/udp-broadcast-relay-redux/conffiles
/etc/config/udp_broadcast_relay_redux
endef
define Build/Compile
$(TARGET_CC) $(TARGET_CFLAGS) $(PKG_BUILD_DIR)/main.c -o $(PKG_BUILD_DIR)/$(PKG_NAME)
endef
define Package/udp-broadcast-relay-redux/install
$(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/config $(1)/etc/init.d
$(CP) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/sbin/
$(INSTALL_CONF) ./files/udp_broadcast_relay_redux.config $(1)/etc/config/udp_broadcast_relay_redux
$(INSTALL_BIN) ./files/udp-broadcast-relay-redux.init $(1)/etc/init.d/udp-broadcast-relay-redux
endef
$(eval $(call BuildPackage,udp-broadcast-relay-redux))