libiwinfo: fix signal, bitrate and assoclist for nl80211 wds ap mode
[project/luci.git] / contrib / package / iwinfo / Makefile
1 #
2 # Copyright (C) 2010-2011 Jo-Philipp Wich <xm@subsignal.org>
3 #
4 # This is free software, licensed under the GPL 2 license.
5 #
6
7 include $(TOPDIR)/rules.mk
8
9 PKG_NAME:=libiwinfo
10 PKG_RELEASE:=15
11
12 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
13
14 include $(INCLUDE_DIR)/package.mk
15
16
17 define Package/libiwinfo
18 SECTION:=luci
19 CATEGORY:=LuCI
20 SUBMENU:=Libraries
21 TITLE:=Generalized Wireless Information Library (iwinfo)
22 DEPENDS:=+PACKAGE_kmod-mac80211:libnl-tiny +liblua +lua
23 DEFAULT:=PACKAGE_luci-lib-sys
24 endef
25
26 define Package/libiwinfo/description
27 Wireless information library with consistent interface for proprietary Broadcom,
28 madwifi, nl80211 and wext driver interfaces.
29 endef
30
31 define Build/Prepare
32 mkdir -p $(PKG_BUILD_DIR)
33 $(CP) ./src/* $(PKG_BUILD_DIR)/
34 endef
35
36 define Build/Configure
37 endef
38
39 IWINFO_BACKENDS := \
40 $(if $(CONFIG_PACKAGE_kmod-brcm-wl),wl) \
41 $(if $(CONFIG_PACKAGE_kmod-brcm-wl-mini),wl) \
42 $(if $(CONFIG_PACKAGE_kmod-brcm-wl-mimo),wl) \
43 $(if $(CONFIG_PACKAGE_kmod-madwifi),madwifi) \
44 $(if $(CONFIG_PACKAGE_kmod-mac80211),nl80211)
45
46 TARGET_CFLAGS += \
47 -I$(STAGING_DIR)/usr/include/libnl-tiny \
48 -I$(STAGING_DIR)/usr/include
49
50 MAKE_FLAGS += \
51 FPIC="$(FPIC)" \
52 CFLAGS="$(TARGET_CFLAGS)" \
53 LDFLAGS="$(TARGET_LDFLAGS)" \
54 BACKENDS="$(IWINFO_BACKENDS)"
55
56 define Package/libiwinfo/install
57 $(INSTALL_DIR) $(1)/usr/bin
58 $(INSTALL_BIN) $(PKG_BUILD_DIR)/iwinfo.lua $(1)/usr/bin/iwinfo
59 $(INSTALL_DIR) $(1)/usr/lib/lua
60 $(INSTALL_BIN) $(PKG_BUILD_DIR)/iwinfo.so $(1)/usr/lib/lua/iwinfo.so
61 endef
62
63 $(eval $(call BuildPackage,libiwinfo))