Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wfb-ng: Add wfb-ng package #24974

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
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
49 changes: 49 additions & 0 deletions net/wfb-ng/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=wfb-ng
PKG_VERSION:=24.09.23
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/svpcom/wfb-ng/tar.gz/$(PKG_NAME)-$(PKG_VERSION)?
PKG_HASH:=c6cf669090952f6e430166a23b2fd787c6f7d4fd2d8d1996e8e3713f5cc4f8d9

PKG_LICENSE:=GPL-3.0-only
PKG_LICENSE_FILES:=LICENSE
svpcom marked this conversation as resolved.
Show resolved Hide resolved
PKG_MAINTAINER:=Vasily Evseenko <[email protected]>

PKG_BUILD_PARALLEL:=1

include $(INCLUDE_DIR)/package.mk

MAKE_FLAGS += VERSION=$(PKG_VERSION)-$(PKG_RELEASE) COMMIT=openwrt all_bin
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_NAME)-$(PKG_VERSION)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm guessing this is what results in /builder/build_dir/target-aarch64_generic_musl/wfb-ng-wfb-ng-24.09.23/ and then some tasks at the end of the build process failing? Have you tried PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stangri Yes. This is done due to github auto packaging issue. It automatically create archive for release with following structure:

$ tar tzvf wfb-ng-24.08.2.tar.gz  | head
drwxrwxr-x root/root         0 2024-10-01 16:49 wfb-ng-wfb-ng-24.08.2/
drwxrwxr-x root/root         0 2024-10-01 16:49 wfb-ng-wfb-ng-24.08.2/.github/
drwxrwxr-x root/root         0 2024-10-01 16:49 wfb-ng-wfb-ng-24.08.2/.github/ISSUE_TEMPLATE/
...

It concatenate project name + tag name (which is wfb-ng-24.08.2 in this case)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. I thought there was a way to override this from the Makefile as I've had to deal with a similarly weirdly named archive content before, but maybe I'm misremembering things.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, any updates on this package? The OpenIPC fpv project is getting increasing interest and many requests when the package will be ready for easy deployment. I have 4 different router models up and running myself with the latest makefile, but it's a ... shitparty ... to compile manually from sources :)


define Package/wfb-ng
SECTION:=net
CATEGORY:=Network
SUBMENU:=Wireless
TITLE:=Long-range packet radio link using raw WiFi
URL:=https://github.com/svpcom/wfb-ng
DEPENDS:=+libpcap +libsodium +libstdcpp
endef

define Package/wfb-ng/description
The next generation of long-range packet radio link using raw WiFi
This is a base version that have only binaries and can act as cluster node,
standalone receiver or transmitter without diversity.
endef

define Package/wfb-ng/conffiles
/usr/sbin/wfb-ng.sh
endef

define Package/wfb-ng/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/wfb_rx $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/wfb_tx $(1)/usr/bin/
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/wfb-ng.init $(1)/etc/init.d/wfb-ng
endef

$(eval $(call BuildPackage,wfb-ng))
18 changes: 18 additions & 0 deletions net/wfb-ng/files/wfb-ng.init
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/sh /etc/rc.common

START=99
STOP=10

USE_PROCD=1
WFB_INIT="/usr/sbin/wfb-ng.sh"

start_service() {
if [ -x $WFB_INIT ]; then
procd_open_instance wfb-ng
procd_set_param command $WFB_INIT
procd_set_param respawn
procd_set_param stdout 1
procd_set_param stderr 1
procd_close_instance
fi
}
Loading