PKG_NAME:=bmxd
PKG_SOURCE_URL:=http://downloads.open-mesh.net/svn/batman/trunk/batman-experimental/
-PKG_REV:=1075
+PKG_REV:=1636
PKG_VERSION:=r$(PKG_REV)
PKG_RELEASE:=1
+PKG_EXTRA_CFLAGS:=-DNODEBUGALL
PKG_SOURCE_PROTO:=svn
PKG_SOURCE_VERSION:=$(PKG_REV)
define Package/bmxd/Default
URL:=https://www.open-mesh.net/
+ MAINTAINER:=Axel Neumann <bmxd@neumann.cgws.de>
endef
define Package/bmxd
$(call Package/bmxd/Default)
SECTION:=net
CATEGORY:=Network
- DEPENDS:=+libpthread +kmod-tun
- TITLE:=B.A.T.M.A.N. Experimental (BMX) layer 3 routing daemon
+ DEPENDS:=+kmod-tun
+ TITLE:=B.a.t.M.a.n. eXperimental (BMX) layer 3 routing daemon
endef
+define Package/bmxd/conffiles
+/etc/config/bmxd
+endef
+
+
define Package/bmxd/description
-B.A.T.M.A.N. Experimental (BMX) layer 3 routing daemon
+B.a.t.M.a.n. eXperimental (BMX) layer 3 routing daemon
endef
MAKE_ARGS += \
- EXTRA_CFLAGS="$(TARGET_CFLAGS)" \
+ EXTRA_CFLAGS="$(TARGET_CFLAGS) $(PKG_EXTRA_CFLAGS)" \
CCFLAGS="$(TARGET_CFLAGS)" \
OFLAGS="$(TARGET_CFLAGS)" \
REVISION="$(PKG_REV)" \
CC="$(TARGET_CC)" \
NODEBUG=1 \
UNAME="Linux" \
- INSTALL_DIR="$(PKG_INSTALL_DIR)" \
+ INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \
STRIP="/bin/true" \
- batmand install
+ bmxd install
define Build/Compile
- mkdir -p $(PKG_INSTALL_DIR)/bin
+ mkdir -p $(PKG_INSTALL_DIR)/usr/sbin
$(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_ARGS)
endef
define Package/bmxd/install
$(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/config $(1)/etc/init.d
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/batmand $(1)/usr/sbin/bmxd
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/bmxd $(1)/usr/sbin/bmxd
$(INSTALL_BIN) ./files/etc/init.d/bmxd $(1)/etc/init.d
$(INSTALL_DATA) ./files/etc/config/bmxd $(1)/etc/config
endef
config bmxd general
- option interface ath0
- option announce
- option gateway_class
- option originator_interval
- option preferred_gateway
- option routing_class
- option visualisation_srv
- option policy_routing_script
-
+ option interface 'ath0'
+# option announce
+# option gateway_class
+# option originator_interval
+# option preferred_gateway
+# option routing_class
+# option visualisation_srv
+# option misc 'base-port=14305'
. /lib/config/uci.sh
uci_load bmxd
start () {
- interface=$(uci get bmxd.general.interface)
+ interface="$(uci get bmxd.general.interface)"
if [ "$interface" = "" ]; then
echo $1 Error, you must specify at least a network interface
exit
preferred_gateway=$(uci get bmxd.general.preferred_gateway)
routing_class=$(uci get bmxd.general.routing_class)
visualisation_srv=$(uci get bmxd.general.visualisation_srv)
- policy_routing_script=$(uci get bmxd.general.policy_routing_script)
+ misc="$(uci get bmxd.general.misc)"
bmx_args=""
if [ $announce ]; then
bmx_args=${bmx_args}'-s '$visualisation_srv' '
fi
- if [ $policy_routing_script ]; then
- bmx_args=${bmx_args}'--policy-routing-script '$policy_routing_script' '
- fi
- bmx_args=${bmx_args}$interface
+ bmx_args="$misc ${bmx_args} $interface"
bmxd $bmx_args >/dev/null 2>&1
}
-restart () {
- $0 stop
- sleep 3
- $0 start
-}
-
stop () {
killall bmxd
}
+++ /dev/null
-diff -urN bmxd-r1075/Makefile bmxd-r1075.new/Makefile
---- bmxd-r1075/Makefile 2008-08-04 20:10:56.000000000 +0200
-+++ bmxd-r1075.new/Makefile 2009-07-14 02:28:16.000000000 +0200
-@@ -19,11 +19,15 @@
-
- # CC = gcc
-
--CFLAGS = -Wall -O1 -g -pg
-+# JoW: "-pg" results in "gcrt1.o: No such file" ?!
-+#CFLAGS = -Wall -O1 -g -pg
-+CFLAGS = -Wall -O1 -g
-
- #-DDEBUG_MALLOC -DMEMORY_USAGE -DPROFILE_DATA
-
--LDFLAGS = -lpthread -static -g -pg
-+# JoW: "-pg" results in "gcrt1.o: No such file" ?!
-+#LDFLAGS = -lpthread -static -g -pg
-+LDFLAGS = -lpthread -g
-
-
- #STRIP= strip
-@@ -80,4 +84,4 @@
- rm -f $(BINARY_NAME) *.o
-
- clean-all:
-- rm -rf $(PACKAGE_NAME)_* dl/*
-\ No newline at end of file
-+ rm -rf $(PACKAGE_NAME)_* dl/*