[packages] /net/bmxd: update to revision 1636, adapt Makefile, do not overwrite ...
authorAxel Neumann <neumann@cgws.de>
Sun, 25 Apr 2010 21:13:31 +0000 (21:13 +0000)
committerAxel Neumann <neumann@cgws.de>
Sun, 25 Apr 2010 21:13:31 +0000 (21:13 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/packages/net/bmxd@21160 3c298f89-4303-0410-b956-a3cf2f4a3e73

Makefile
files/etc/config/bmxd
files/etc/init.d/bmxd
patches/001-makefile-fix.patch [deleted file]

index 04c8fff..c2ec119 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -10,9 +10,10 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=bmxd
 PKG_SOURCE_URL:=http://downloads.open-mesh.net/svn/batman/trunk/batman-experimental/
 
 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_VERSION:=r$(PKG_REV)
 PKG_RELEASE:=1
+PKG_EXTRA_CFLAGS:=-DNODEBUGALL
 
 PKG_SOURCE_PROTO:=svn
 PKG_SOURCE_VERSION:=$(PKG_REV)
 
 PKG_SOURCE_PROTO:=svn
 PKG_SOURCE_VERSION:=$(PKG_REV)
@@ -24,40 +25,46 @@ include $(INCLUDE_DIR)/package.mk
 
 define Package/bmxd/Default
   URL:=https://www.open-mesh.net/
 
 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
 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
 
 endef
 
+define Package/bmxd/conffiles
+/etc/config/bmxd
+endef
+
+
 define Package/bmxd/description
 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 += \
 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" \
        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" \
        STRIP="/bin/true" \
-       batmand install
+       bmxd install
 
 define Build/Compile
 
 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
        $(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
        $(INSTALL_BIN) ./files/etc/init.d/bmxd $(1)/etc/init.d
        $(INSTALL_DATA) ./files/etc/config/bmxd $(1)/etc/config
 endef
index ad14d17..c8619e9 100644 (file)
@@ -1,10 +1,9 @@
 config bmxd general
 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'       
index 9eb1095..d23b4c8 100644 (file)
@@ -3,7 +3,7 @@ START=91
 . /lib/config/uci.sh
 uci_load bmxd
 start () {
 . /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
        if [ "$interface" = "" ]; then
                echo $1 Error, you must specify at least a network interface
                exit
@@ -14,7 +14,7 @@ start () {
        preferred_gateway=$(uci get bmxd.general.preferred_gateway)
        routing_class=$(uci get bmxd.general.routing_class)
        visualisation_srv=$(uci get bmxd.general.visualisation_srv)
        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=""
 
        if [ $announce ]; then
@@ -41,20 +41,11 @@ start () {
                bmx_args=${bmx_args}'-s '$visualisation_srv' '
        fi
        
                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
 }
 
        bmxd $bmx_args >/dev/null 2>&1
 }
 
-restart () {
-       $0 stop
-       sleep 3
-       $0 start
-}
-        
 stop () {
        killall bmxd
 }
 stop () {
        killall bmxd
 }
diff --git a/patches/001-makefile-fix.patch b/patches/001-makefile-fix.patch
deleted file mode 100644 (file)
index cf18493..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-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/*