pcsc-lite: fix libusb dependency
[openwrt/svn-archive/archive.git] / net / wing / Makefile
1 #
2 # Copyright (C) 2006-2011 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:=20111103
12 PKG_RELEASE:=1
13 PKG_REV:=23e6455a1cfe0877334f0d18068a3fb47425b8a4
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=git://github.com/rriggio/click.git
17 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
18 PKG_SOURCE_VERSION:=$(PKG_REV)
19 PKG_SOURCE_PROTO:=git
20
21 PKG_BUILD_DEPENDS:=wing/host
22
23 include $(INCLUDE_DIR)/package.mk
24 include $(INCLUDE_DIR)/host-build.mk
25
26 define Package/wing
27 SECTION:=net
28 CATEGORY:=Network
29 SUBMENU:=Routing and Redirection
30 TITLE:=Wireless mesh networking toolkit
31 MAINTAINER:=Roberto Riggio <roberto.riggio@create-net.org>
32 DEPENDS:=+kmod-tun +libpcap +libstdcpp
33 URL:=http://www.wing-project.org/
34 endef
35
36 define Package/wing/Description
37 Wing is a wireless mesh routing software. The routing protocol
38 is derived from Roofnet. It supports multiple radio interfaces
39 and link quality routing using the ETX, ETT, or WCETT metric.
40 endef
41
42 EXTRA_CFLAGS=-MD
43
44 CONFIGURE_ARGS += \
45 --enable-tools=host \
46 --enable-userlevel \
47 --enable-wifi \
48 --enable-wing \
49 --enable-diffserv \
50 --disable-linuxmodule \
51 --disable-dynamic-linking \
52
53 HOST_CONFIGURE_ARGS += \
54 --enable-userlevel \
55 --enable-wifi \
56 --enable-wing \
57 --enable-diffserv \
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 PrintWifi -E Strip -E Null \
69 -E InfiniteSource -E RatedSource -E EtherEncap -E UDPIPEncap \
70 -E AggregateWingPacketType -E AggregateCounter \
71 -E RadiotapEncapHT -E SetTXRateHT \
72 -E WINGETTMetric -E WINGETXMetric -E WINGHopCountMetric \
73 -E ProbeTXRate -E MadwifiRate -E AutoRateFallback -E Minstrel \
74 -E FairBuffer -E DeAggregator -E DWRRSched -E WFQSched -E WRRSched; \
75 );
76 $(call Build/Install/Default, MINDRIVER=$(PKG_NAME) install)
77 endef
78
79 define Package/wing/install
80 $(INSTALL_DIR) $(1)/usr/bin
81 $(INSTALL_DIR) $(1)/etc/wing
82 $(INSTALL_DIR) $(1)/usr/share/click
83 $(CP) ./files/* $(1)/
84 $(CP) $(PKG_BUILD_DIR)/conf/wing/click_config $(1)/usr/bin/
85 $(CP) $(PKG_BUILD_DIR)/conf/wing/write_handler $(1)/usr/bin/
86 $(CP) $(PKG_BUILD_DIR)/conf/wing/read_handler $(1)/usr/bin/
87 $(CP) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME)click $(1)/usr/bin/click
88 $(CP) $(PKG_INSTALL_DIR)/usr/bin/click-align $(1)/usr/bin/click-align
89 $(CP) $(PKG_BUILD_DIR)/conf/wing/*click $(1)/etc/wing/
90 $(CP) $(PKG_INSTALL_DIR)/usr/share/click/elementmap.xml $(1)/usr/share/click/elementmap.xml
91 endef
92
93 $(eval $(call HostBuild))
94 $(eval $(call BuildPackage,wing))
95