olsrd2-git: compile latest dev branch of olsrd2

I introduce a "package-git" like in the aur-repro for Arch Linux,
where the last changes are included. The package is build on the
develop branch of olsrd2.

Signed-off-by: Nick Hainke <vincent@systemli.org>
This commit is contained in:
Nick Hainke 2020-10-06 12:52:29 +02:00
parent b389738677
commit d63e3eda9a
6 changed files with 196 additions and 0 deletions

47
oonf-olsrd2-git/Config.in Normal file
View file

@ -0,0 +1,47 @@
# OONF Olsrd2 configuration
menu "Optional Plugins"
depends on PACKAGE_oonf-olsrd2
config OONF_NHDP_AUTOLL4
bool "Auto_LL4 plugin enabled"
help
The auto_ll4 plugin automatically generates linklocal IPv4 addresses on interfaces that do not contain IPv4 addresses.
default n
config OONF_OLSRV2_LAN_IMPORT
bool "Lan_import plugin enabled"
help
The lan_import plugin can read routing tables and automatically export them as locally attached networks in olsrd2.
default n
config OONF_OLSRV2_ROUTE_MODIFIER
bool "route_modifier plugin enabled"
help
The route_modifier plugin allows you to overwrite aspects of routes (like table/protocol) for certain destinations.
default n
config OONF_GENERIC_DLEP_ROUTER
bool "dlep_router plugin enabled"
help
The dlep_router plugin can receive linklayer metadata over the DLEP protocol.
default n
config OONF_GENERIC_REMOTECONTROL
bool "remotecontrol plugin enabled"
help
The remotecontrol plugin allows you to control configuration and logging over the telnet plugin. Be careful not to open this functionality over the network without securing it.
default n
config OONF_GENERIC_HTTP
bool "http plugin enabled"
help
The HTTP plugin allows HTTP access to all telnet commands.
default n
config OONF_OLSRV2_MPR
bool "MPR plugin enabled"
help
The MPR plugin reduce the routing graph to limit the overhead of the OLSRv2 protocol
default n
endmenu

84
oonf-olsrd2-git/Makefile Normal file
View file

@ -0,0 +1,84 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=oonf-olsrd2
PKG_SOURCE_DATE:=2020-09-03
PKG_RELEASE:=1
PKG_VERSION:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/OLSR/OONF.git
PKG_SOURCE_VERSION:=a313c5e93e8c58df3c8d605b40fe628253a378fd
CMAKE_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
SPACE:=
SPACE+=
CMAKE_OPTIONAL_PLUGINS:= $(subst $(SPACE),;,$(strip \
$(if $(filter y,$(CONFIG_OONF_NHDP_AUTOLL4)),auto_ll4,) \
$(if $(filter y,$(CONFIG_OONF_OLSRV2_LAN_IMPORT)),lan_import,) \
$(if $(filter y,$(CONFIG_OONF_OLSRV2_ROUTE_MODIFIER)),route_modifier,) \
$(if $(filter y,$(CONFIG_OONF_GENERIC_DLEP_ROUTER)),dlep_router,) \
$(if $(filter y,$(CONFIG_OONF_GENERIC_REMOTECONTROL)),remotecontrol,) \
$(if $(filter y,$(CONFIG_OONF_OLSRV2_MPR)),mpr,) \
$(if $(filter y,$(CONFIG_OONF_GENERIC_HTTP)),http,) \
))
BUILD_TYPE:= $(if $(filter y,$(CONFIG_DEBUG)),Debug,Release)
CMAKE_OPTIONS=-D CMAKE_BUILD_TYPE:String=$(BUILD_TYPE) \
-D OONF_NO_WERROR:Bool=true \
-D OONF_LOGGING_LEVEL:String=debug \
-D OONF_NO_TESTING:Bool=true \
-D UCI:Bool=true \
-D OONF_APP_DEFAULT_CFG_HANDLER:String=uci \
-D OONF_STATIC_PLUGINS:String="class;callback;clock;duplicate_set;layer2;packet_socket;rfc5444;socket;stream_socket;telnet;timer;viewer;os_clock;os_fd;os_interface;os_routing;os_system;nhdp;olsrv2;ff_dat_metric;neighbor_probing;nl80211_listener;link_config;layer2info;systeminfo;cfg_uciloader;cfg_compact;nhdpinfo;olsrv2info;netjsoninfo;${CMAKE_OPTIONAL_PLUGINS}" \
-D OONF_LIB_GIT:String=v$(PKG_VERSION)-archive \
-D OONF_VERSION:String=$(PKG_VERSION) \
-D INSTALL_LIB_DIR:Path=lib/oonf \
-D INSTALL_INCLUDE_DIR:Path=include/oonf \
-D INSTALL_CMAKE_DIR:Path=lib/oonf \
-D CMAKE_PREFIX_PATH=$(STAGING_DIR)/usr
define Package/oonf-git-git/template
SECTION:=net
CATEGORY:=Network
MAINTAINER:=Nick Hainke <vincent@systemli.org>
SUBMENU:=OLSR.org network framework
URL:=http://www.olsr.org/
MENU:=1
endef
define Package/oonf-olsrd2-git
$(call Package/oonf-git-git/template)
TITLE:= Build Dev Branch of Olsrd V2 Routing Agent
DEPENDS:=+librt +libnl-tiny +libuci +oonf-init-scripts
endef
define Package/oonf-olsrd2-git/config
source "$(SOURCE)/Config.in"
endef
Build/Compile=$(call Build/Compile/Default,olsrd2_static)
Build/Install=
define Build/Install
$(INSTALL_BIN) -D $(PKG_BUILD_DIR)/$(MAKE_PATH)/olsrd2_static $(PKG_INSTALL_DIR)/usr/sbin/olsrd2;
endef
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include -I${STAGING_DIR}/usr/include/libnl-tiny
define Package/oonf-olsrd2-git/install
$(INSTALL_BIN) -D $(PKG_BUILD_DIR)/olsrd2_static $(1)/usr/sbin/olsrd2
$(INSTALL_BIN) -D ./files/olsrd2.init $(1)/etc/init.d/olsrd2
$(INSTALL_BIN) -D ./files/olsrd2.hotplug $(1)/etc/hotplug.d/iface/50-olsrd2
$(INSTALL_DATA) -D ./files/olsrd2.uci $(1)/etc/config/olsrd2
endef
define Package/oonf-olsrd2-git/conffiles
/etc/config/olsrd2
endef
$(eval $(call BuildPackage,oonf-olsrd2-git))

View file

@ -0,0 +1,5 @@
#!/bin/sh
DAEMON='olsrd2'
. /lib/functions/oonf_hotplug.sh

View file

@ -0,0 +1,6 @@
#!/bin/sh /etc/rc.common
START=82
DAEMON='olsrd2'
. /lib/functions/oonf_init.sh

View file

@ -0,0 +1,40 @@
config global
option 'failfast' 'no'
option 'pidfile' '/var/run/olsrd2.pid'
option 'lockfile' '/var/lock/olsrd2'
config log
option 'syslog' 'true'
option 'stderr' 'true'
# option 'file' '/var/log/olsrd2.log'
# option 'info' 'all'
# option 'debug' 'all'
config telnet
# option 'port' '2009'
config olsrv2
# list 'lan' '::/0'
# list 'lan' '0.0.0.0/0'
config interface
option 'ifname' 'loopback'
config interface
list 'ifname' 'WIFI'
list 'ifname' 'wlanadhoc'
list 'ifname' 'wlanadhocRADIO1'
config interface
list 'ifname' 'wan'
option 'ignore' '1'
# option 'rx_bitrate' '100M'
# option 'tx_bitrate' '100M'
# option 'signal' '-20'
config interface
list 'ifname' 'lan'
option 'ignore' '1'
# option 'rx_bitrate' '1G'
# option 'tx_bitrate' '1G'
# option 'signal' '-10'

View file

@ -0,0 +1,14 @@
--- a/CMakeListsGlobal.cmake
+++ b/CMakeListsGlobal.cmake
@@ -47,7 +47,7 @@ include (${CMAKE_CURRENT_LIST_DIR}/cmake
#### get repository tag and version ####
########################################
-include (${CMAKE_CURRENT_LIST_DIR}/cmake/get_version.cmake)
-IF(EXISTS "${CMAKE_BINARY_DIR}/version.cmake")
- include (${CMAKE_BINARY_DIR}/version.cmake)
-ENDIF()
+#include (${CMAKE_CURRENT_LIST_DIR}/cmake/get_version.cmake)
+#IF(EXISTS "${CMAKE_BINARY_DIR}/version.cmake")
+# include (${CMAKE_BINARY_DIR}/version.cmake)
+#ENDIF()