2010-08-13 19:46:41 +00:00
|
|
|
#
|
|
|
|
# Copyright (C) 2006-2009 OpenWrt.org
|
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=wing
|
|
|
|
|
|
|
|
ifneq ($(CONFIG_WING_STABLE),)
|
2010-09-09 22:48:00 +00:00
|
|
|
PKG_VERSION:=20100903
|
2010-10-10 13:26:18 +00:00
|
|
|
PKG_RELEASE:=4
|
2010-09-09 22:48:00 +00:00
|
|
|
PKG_REV:=520e3168a5af4d26bec3779cfa4901d128a4bc6f
|
2010-08-13 19:46:41 +00:00
|
|
|
else
|
2010-09-01 14:41:49 +00:00
|
|
|
PKG_VERSION:=$(shell date +%Y%m%d)
|
|
|
|
PKG_RELEASE:=1
|
|
|
|
PKG_REV:=HEAD
|
2010-08-13 19:46:41 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
|
|
|
PKG_SOURCE_URL:=http://github.com/create-net/click-wing.git
|
|
|
|
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
|
|
|
PKG_SOURCE_VERSION:=$(PKG_REV)
|
|
|
|
PKG_SOURCE_PROTO:=git
|
|
|
|
|
|
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
2010-10-10 13:26:42 +00:00
|
|
|
PKG_BUILD_PARALLEL:=1
|
2010-10-10 13:26:18 +00:00
|
|
|
PKG_INSTALL:=1
|
2010-08-13 19:46:41 +00:00
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
|
|
|
define Package/wing
|
2010-09-01 14:41:49 +00:00
|
|
|
TITLE:=Wireless mesh networking toolkit
|
|
|
|
SECTION:=net
|
|
|
|
CATEGORY:=Network
|
2010-09-02 04:56:32 +00:00
|
|
|
MAINTAINER:=Roberto Riggio <roberto.riggio@create-net.org>
|
2010-09-01 14:41:49 +00:00
|
|
|
DEPENDS:=+kmod-tun
|
|
|
|
URL:=http://www.wing-project.org/
|
2010-08-13 19:46:41 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/wing/Description
|
|
|
|
Wing is a wireless mesh routing software. The routing protocol
|
|
|
|
is derived from Roofnet. It supports multiple radio interfaces and
|
|
|
|
link quality routing using the ETX, ETT, and WCETT metrics.
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/wing/config
|
|
|
|
source "$(SOURCE)/Config.in"
|
|
|
|
endef
|
|
|
|
|
2010-10-10 13:26:18 +00:00
|
|
|
EXTRA_LDFLAGS:=-ldl
|
|
|
|
|
|
|
|
MAKE_FLAGS+=\
|
|
|
|
V=1 \
|
|
|
|
MINDRIVER=$(PKG_NAME) \
|
|
|
|
BUILD_CC=$(TARGET_CC) \
|
|
|
|
BUILD_CXX=$(TARGET_CXX)
|
|
|
|
|
|
|
|
HOST_MAKE_FLAGS:=\
|
|
|
|
V=1 \
|
|
|
|
MINDRIVER=$(PKG_NAME)
|
|
|
|
|
2010-08-13 19:46:41 +00:00
|
|
|
define Build/Configure
|
|
|
|
(cd $(PKG_BUILD_DIR); \
|
|
|
|
rm -rf config.{cache,status}; \
|
|
|
|
./configure \
|
|
|
|
--prefix=/usr \
|
|
|
|
--enable-userlevel \
|
|
|
|
--enable-wifi \
|
|
|
|
--enable-wing \
|
|
|
|
--disable-linuxmodule \
|
|
|
|
);
|
2010-10-10 13:26:18 +00:00
|
|
|
$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) $(HOST_MAKE_FLAGS) tools
|
|
|
|
$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) $(HOST_MAKE_FLAGS) elementmap.xml
|
|
|
|
$(CP) $(PKG_BUILD_DIR)/tools/click-mkmindriver/click-mkmindriver $(PKG_BUILD_DIR)/
|
|
|
|
rm -rf $(PKG_BUILD_DIR)/config.{cache,status}
|
|
|
|
$(call Build/Configure/Default, \
|
|
|
|
--enable-tools=mixed \
|
|
|
|
--enable-userlevel \
|
|
|
|
--enable-wifi \
|
|
|
|
--enable-wing \
|
|
|
|
--disable-linuxmodule \
|
|
|
|
)
|
2010-08-13 19:46:41 +00:00
|
|
|
(cd $(PKG_BUILD_DIR)/userlevel; \
|
2010-10-10 13:26:18 +00:00
|
|
|
../click-mkmindriver -p $(PKG_NAME) -C .. \
|
2010-08-13 19:46:41 +00:00
|
|
|
-f $(PKG_BUILD_DIR)/conf/wing/sample.click \
|
|
|
|
-A --all -E Discard -E Print -E Null \
|
|
|
|
-E InfiniteSource -E RatedSource -E EtherEncap -E UDPIPEncap \
|
2010-09-09 22:48:00 +00:00
|
|
|
-E RadiotapDecap -E RadiotapEncap \
|
2010-08-13 19:46:41 +00:00
|
|
|
-E ProbeTXRate -E MadwifiRate -E AutoRateFallback \
|
|
|
|
-E RoundRobinSched -E DRRSched; \
|
|
|
|
)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/wing/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/bin
|
|
|
|
$(INSTALL_DIR) $(1)/etc/wing
|
|
|
|
$(INSTALL_DIR) $(1)/usr/share/click
|
|
|
|
$(CP) ./files/* $(1)/
|
|
|
|
$(CP) $(PKG_BUILD_DIR)/conf/wing/click_config $(1)/usr/bin/
|
|
|
|
$(CP) $(PKG_BUILD_DIR)/conf/wing/write_handler $(1)/usr/bin/
|
|
|
|
$(CP) $(PKG_BUILD_DIR)/conf/wing/read_handler $(1)/usr/bin/
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME)click $(1)/usr/bin/click
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/bin/click-align $(1)/usr/bin/click-align
|
|
|
|
$(CP) $(PKG_BUILD_DIR)/conf/wing/*click $(1)/etc/wing/
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/share/click/elementmap.xml $(1)/usr/share/click/elementmap.xml
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage,wing))
|
|
|
|
|