From 0818aeec49c264f94dc885ab7ae71d37e8a59788 Mon Sep 17 00:00:00 2001 From: Marek Lindner Date: Wed, 16 Jan 2008 19:15:46 +0000 Subject: [PATCH] port batman package to batman 0.3 integrate batman kernel modul for tunneling TODO: batman svn is ssl only :( SVN-Revision: 10215 --- net/batman/Makefile | 69 +++++++++++++++---- .../files/etc/config/{batman => batmand} | 0 .../files/etc/init.d/{batman => batmand} | 0 net/batman/patches/100-makefile.patch | 20 ------ 4 files changed, 54 insertions(+), 35 deletions(-) rename net/batman/files/etc/config/{batman => batmand} (100%) rename net/batman/files/etc/init.d/{batman => batmand} (100%) delete mode 100644 net/batman/patches/100-makefile.patch diff --git a/net/batman/Makefile b/net/batman/Makefile index dda6beac5..f5b4580fc 100644 --- a/net/batman/Makefile +++ b/net/batman/Makefile @@ -9,45 +9,84 @@ include $(TOPDIR)/rules.mk PKG_NAME:=batmand -PKG_VERSION:=0.2-rv502 +PKG_REV:=949 +PKG_VERSION:=r$(PKG_REV) PKG_RELEASE:=1 +PKG_BRANCH:=batman -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_$(PKG_VERSION)_sources -PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION)_sources.tgz -PKG_SOURCE_URL:=http://downloads.open-mesh.net/batman/stable/sources/ \ - http://downloads.open-mesh.net/batman/stable/sources/old/ -PKG_MD5SUM:=cf1c92ef3455cfbfedf2c577e013b6c0 - +PKG_SOURCE_PROTO:=svn +PKG_SOURCE_VERSION:=$(PKG_REV) +PKG_SOURCE_SUBDIR:=$(PKG_BRANCH)d-$(PKG_VERSION) +PKG_SOURCE_URL:=https://dev.open-mesh.net/svn/batman/trunk/$(PKG_BRANCH) +PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR) PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install +PKG_KMOD_BUILD_DIR:=$(PKG_BUILD_DIR)/linux/modules + include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/kernel.mk -define Package/batman +define Package/batmand/Default SECTION:=net CATEGORY:=Network + URL:=https://www.open-mesh.net/ + MAINTAINER:=Marek Lindner +endef + +define Package/batmand +$(call Package/batmand/Default) DEPENDS:=+libpthread +kmod-tun TITLE:=B.A.T.M.A.N. Better Approach To Mobile Ad-hoc Networking - URL:=https://www.open-mesh.net/ endef -define Build/Configure +define Package/batmand/description +B.A.T.M.A.N. layer 3 routing daemon +endef + +define Package/batgat +$(call Package/batmand/Default) + DEPENDS:=batmand + TITLE:=B.A.T.M.A.N. gateway module + FILES:=$(PKG_KMOD_BUILD_DIR)/batgat.$(LINUX_KMOD_SUFFIX) +endef + +define Package/batgat/description +Kernel gateway module for B.A.T.M.A.N. endef -MAKE_FLAGS += \ +MAKE_ARGS += \ CFLAGS="$(TARGET_CFLAGS)" \ CCFLAGS="$(TARGET_CFLAGS)" \ OFLAGS="$(TARGET_CFLAGS)" \ + CC="$(TARGET_CC)" \ NODEBUG=1 \ UNAME="Linux" \ INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \ STRIP="/bin/true" \ batmand install -define Package/batman/install +define Build/Configure +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_ARGS) + $(shell [ -e $(PKG_KMOD_BUILD_DIR)/Makefile.kbuild ] && mv $(PKG_KMOD_BUILD_DIR)/Makefile.kbuild $(PKG_KMOD_BUILD_DIR)/Makefile) + $(MAKE) -C "$(LINUX_DIR)" \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + ARCH="$(LINUX_KARCH)" \ + PATH="$(TARGET_PATH)" \ + SUBDIRS="$(PKG_KMOD_BUILD_DIR)" \ + LINUX_VERSION="$(LINUX_VERSION)" \ + REVISION="$(PKG_REV)" modules +endef + +define Package/batmand/install $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/config $(1)/etc/init.d $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/batmand $(1)/usr/sbin/ - $(INSTALL_BIN) ./files/etc/init.d/batman $(1)/etc/init.d - $(INSTALL_DATA) ./files/etc/config/batman $(1)/etc/config + $(INSTALL_BIN) ./files/etc/init.d/batmand $(1)/etc/init.d + $(INSTALL_DATA) ./files/etc/config/batmand $(1)/etc/config endef -$(eval $(call BuildPackage,batman)) +$(eval $(call BuildPackage,batmand)) +$(eval $(call BuildPackage,batgat)) diff --git a/net/batman/files/etc/config/batman b/net/batman/files/etc/config/batmand similarity index 100% rename from net/batman/files/etc/config/batman rename to net/batman/files/etc/config/batmand diff --git a/net/batman/files/etc/init.d/batman b/net/batman/files/etc/init.d/batmand similarity index 100% rename from net/batman/files/etc/init.d/batman rename to net/batman/files/etc/init.d/batmand diff --git a/net/batman/patches/100-makefile.patch b/net/batman/patches/100-makefile.patch deleted file mode 100644 index a46a59475..000000000 --- a/net/batman/patches/100-makefile.patch +++ /dev/null @@ -1,20 +0,0 @@ -Index: batmand_0.2-rv478_sources/Makefile -=================================================================== ---- batmand_0.2-rv478_sources.orig/Makefile 2007-07-31 14:26:18.000000000 -0500 -+++ batmand_0.2-rv478_sources/Makefile 2007-07-31 14:28:43.000000000 -0500 -@@ -21,6 +21,7 @@ - CFLAGS = -Wall -O1 -g3 -DDEBUG_MALLOC -DMEMORY_USAGE -DPROFILE_DATA - STRIP= strip - LDFLAGS = -lpthread -static -+SBINDIR = $(INSTALL_PREFIX)/usr/sbin - - CFLAGS_MIPS = -Wall -O1 -g3 - LDFLAGS_MIPS = -lpthread -@@ -264,3 +265,7 @@ - - clean-long: - rm -rf batmand_* -+ -+install: -+ mkdir -p $(SBINDIR) -+ install -m 0755 batmand $(SBINDIR) -- 2.30.2