Browse Source

horst: Update to version 5.1 and add init script

Update to latest stable version and add init script and config file to start
horst in server mode as a service.

Signed-off-by: Bruno Randolf <br1@einfach.org>
lilik-openwrt-22.03
Bruno Randolf 7 years ago
parent
commit
0840efd64c
4 changed files with 38 additions and 30 deletions
  1. +12
    -4
      net/horst/Makefile
  2. +4
    -0
      net/horst/horst.config
  3. +22
    -0
      net/horst/horst.init
  4. +0
    -26
      net/horst/patches/0001-Remove-_GNU_SOURCE-from-ccan-config.patch

+ 12
- 4
net/horst/Makefile View File

@ -8,15 +8,15 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=horst PKG_NAME:=horst
PKG_VERSION:=5.0
PKG_VERSION:=5.1
PKG_RELEASE:=1 PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-git.tar.gz
PKG_MIRROR_HASH:=3a677e504e8a1f27c899dfbf39da8c94412b24b08bb2eab0de7807cef07d078b
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_URL:=git://github.com/br101/horst.git PKG_SOURCE_URL:=git://github.com/br101/horst.git
PKG_SOURCE_PROTO:=git PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=version-$(PKG_VERSION)
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
PKG_MIRROR_HASH:=22f4be94e839c58ac85ebdc2359b813fd5f68dfd71e1b0c9ed9545020d1abc7d
PKG_MAINTAINER:=Bruno Randolf <br1@einfach.org> PKG_MAINTAINER:=Bruno Randolf <br1@einfach.org>
PKG_LICENSE:=GPL-2.0+ PKG_LICENSE:=GPL-2.0+
@ -43,10 +43,18 @@ define Package/horst/description
and especially IBSS (ad-hoc) mode and mesh networks (OLSR). and especially IBSS (ad-hoc) mode and mesh networks (OLSR).
endef endef
define Package/horst/conffiles
/etc/config/horst
endef
define Package/horst/install define Package/horst/install
$(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/horst $(1)/usr/sbin/ $(INSTALL_BIN) $(PKG_BUILD_DIR)/horst $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/horst.sh $(1)/usr/sbin/ $(INSTALL_BIN) $(PKG_BUILD_DIR)/horst.sh $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./horst.init $(1)/etc/init.d/horst
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DATA) ./horst.config $(1)/etc/config/horst
endef endef
$(eval $(call BuildPackage,horst)) $(eval $(call BuildPackage,horst))

+ 4
- 0
net/horst/horst.config View File

@ -0,0 +1,4 @@
config init 'init'
option disabled 1
option interface 'mon0'
option scan 1

+ 22
- 0
net/horst/horst.init View File

@ -0,0 +1,22 @@
#!/bin/sh /etc/rc.common
START=94
USE_PROCD=1
PROG=/usr/sbin/horst
start_service() {
config_load horst
config_get dis "init" 'disabled' '0'
[ "$dis" == "0" ] || exit
config_get intf "init" 'interface' 'wlan0'
config_get scan "init" 'scan' '0'
[ "$scan" == "0" ] && scan='' || scan="-s"
procd_open_instance
procd_set_param command $PROG -q -i $intf $scan -N
procd_set_param netdev $intf
procd_set_param respawn
procd_close_instance
}

+ 0
- 26
net/horst/patches/0001-Remove-_GNU_SOURCE-from-ccan-config.patch View File

@ -1,26 +0,0 @@
From c91e2f6d72823938052044eef858c3c675617ae4 Mon Sep 17 00:00:00 2001
From: Bruno Randolf <br1@einfach.org>
Date: Wed, 15 Mar 2017 21:22:48 +0000
Subject: [PATCH] Remove _GNU_SOURCE from ccan config
It creates problems with LEDEs FORTIFY and is not needed
---
config.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/config.h b/config.h
index 5c398c4..7e1027a 100644
--- a/config.h
+++ b/config.h
@@ -1,8 +1,5 @@
/* Generated by CCAN configurator */
#ifndef CCAN_CONFIG_H
#define CCAN_CONFIG_H
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE /* Always use GNU extensions. */
-#endif
#define HAVE_TYPEOF 1
#endif /* CCAN_CONFIG_H */
--
2.7.4

Loading…
Cancel
Save