[net] Routing and Redirection: Moved programs for routing and redirecting/relaying...
[openwrt/svn-archive/archive.git] / net / wing / Makefile
1 #
2 # Copyright (C) 2006-2009 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=wing
11 PKG_VERSION:=20101023
12 PKG_RELEASE:=1
13 PKG_REV:=daffb8d7642c4a343951d67159504ff4f4da49ed
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=http://github.com/create-net/click-wing.git
17 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
18 PKG_SOURCE_VERSION:=$(PKG_REV)
19 PKG_SOURCE_PROTO:=git
20
21 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
22
23 PKG_BUILD_DEPENDS:=wing/host
24
25 include $(INCLUDE_DIR)/package.mk
26 include $(INCLUDE_DIR)/host-build.mk
27
28 define Package/wing
29 TITLE:=Wireless mesh networking toolkit
30 SECTION:=net
31 CATEGORY:=Network
32 SUBMENU:=Routing and Redirection
33 MAINTAINER:=Roberto Riggio <roberto.riggio@create-net.org>
34 DEPENDS:=+kmod-tun +libpcap +libstdcpp
35 URL:=http://www.wing-project.org/
36 endef
37
38 define Package/wing/Description
39 Wing is a wireless mesh routing software. The routing protocol
40 is derived from Roofnet. It supports multiple radio interfaces
41 and link quality routing using the ETX, ETT, or WCETT metric.
42 endef
43
44 EXTRA_CFLAGS=-MD
45
46 CONFIGURE_ARGS += \
47 --enable-tools=host \
48 --enable-userlevel \
49 --enable-wifi \
50 --enable-wing \
51 --disable-linuxmodule \
52 --disable-dynamic-linking \
53
54 HOST_CONFIGURE_ARGS += \
55 --enable-userlevel \
56 --enable-wifi \
57 --enable-wing \
58 --disable-linuxmodule \
59
60 define Host/Compile
61 $(call Host/Install/Default, tools elementmap.xml install)
62 endef
63
64 define Build/Compile
65 (cd $(PKG_BUILD_DIR)/userlevel; \
66 $(STAGING_DIR_HOST)/bin/click-mkmindriver -p $(PKG_NAME) -C $(STAGING_DIR_HOST) \
67 -f $(PKG_BUILD_DIR)/conf/wing/sample.click \
68 -A --all -E Discard -E Print -E Null \
69 -E InfiniteSource -E RatedSource -E EtherEncap -E UDPIPEncap \
70 -E RadiotapDecap -E RadiotapEncap \
71 -E ProbeTXRate -E MadwifiRate -E AutoRateFallback -E Minstrel \
72 -E RoundRobinSched -E DRRSched; \
73 );
74 $(call Build/Install/Default, MINDRIVER=$(PKG_NAME) install)
75 endef
76
77 define Package/wing/install
78 $(INSTALL_DIR) $(1)/usr/bin
79 $(INSTALL_DIR) $(1)/etc/wing
80 $(INSTALL_DIR) $(1)/usr/share/click
81 $(CP) ./files/* $(1)/
82 $(CP) $(PKG_BUILD_DIR)/conf/wing/click_config $(1)/usr/bin/
83 $(CP) $(PKG_BUILD_DIR)/conf/wing/write_handler $(1)/usr/bin/
84 $(CP) $(PKG_BUILD_DIR)/conf/wing/read_handler $(1)/usr/bin/
85 $(CP) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME)click $(1)/usr/bin/click
86 $(CP) $(PKG_INSTALL_DIR)/usr/bin/click-align $(1)/usr/bin/click-align
87 $(CP) $(PKG_BUILD_DIR)/conf/wing/*click $(1)/etc/wing/
88 $(CP) $(PKG_INSTALL_DIR)/usr/share/click/elementmap.xml $(1)/usr/share/click/elementmap.xml
89 endef
90
91 $(eval $(call HostBuild))
92 $(eval $(call BuildPackage,wing))
93