X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=blobdiff_plain;f=net%2Fbatman%2FMakefile;h=f5b4580fc4858d89274b35bddfd9e8fdeb7110f9;hp=3f074416cb079d84d93e89f3b9e9631e23748dbb;hb=184e522c552cabee1db08c383906194c0bcc94e2;hpb=a8de5920e5185aa2fc7fc7f4ee9542d4669ca1a2 diff --git a/net/batman/Makefile b/net/batman/Makefile index 3f074416cb..f5b4580fc4 100644 --- a/net/batman/Makefile +++ b/net/batman/Makefile @@ -4,54 +4,89 @@ # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. # -# $Id: Makefile 5624 2006-11-23 00:29:07Z nbd $ +# $Id$ include $(TOPDIR)/rules.mk -PKG_NAME:=batman-III -PKG_VERSION:=0.2.0a +PKG_NAME:=batmand +PKG_REV:=949 +PKG_VERSION:=r$(PKG_REV) PKG_RELEASE:=1 +PKG_BRANCH:=batman -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tbz2 -PKG_SOURCE_URL:=http://downloads.open-mesh.net/batman -PKG_MD5SUM:=d5ac8329633590ed072a6b7ecccacf0b -PKG_CAT:=bzcat - +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 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_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 Build/Configure endef define Build/Compile - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C "$(PKG_BUILD_DIR)" \ - $(TARGET_CONFIGURE_OPTS) \ - NODEBUG=1 \ - OFLAGS="$(TARGET_CFLAGS)" \ - OS="linux" \ - INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \ - STRIP="/bin/true" \ - batmand install + $(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/batman/install - $(INSTALL_DIR) $(1)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/batmand $(1)/usr/sbin/ - $(CP) -a ./files/* $(1)/ - chmod -R 755 $(1)/etc/init.d/batman +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/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))