2 # Copyright (C) 2010-2011 Jo-Philipp Wich <xm@subsignal.org>
4 # This is free software, licensed under the GPL 2 license.
7 include $(TOPDIR)/rules.mk
12 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
14 include $(INCLUDE_DIR)/package.mk
17 define Package/libiwinfo
21 TITLE:=Generalized Wireless Information Library (iwinfo)
22 DEPENDS:=+PACKAGE_kmod-mac80211:libnl-tiny +liblua +lua
23 DEFAULT:=PACKAGE_luci-lib-sys
26 define Package/libiwinfo/description
27 Wireless information library with consistent interface for proprietary Broadcom,
28 madwifi, nl80211 and wext driver interfaces.
32 mkdir -p $(PKG_BUILD_DIR)
33 $(CP) ./src/* $(PKG_BUILD_DIR)/
36 define Build/Configure
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)
47 -I$(STAGING_DIR)/usr/include/libnl-tiny \
48 -I$(STAGING_DIR)/usr/include \
53 CFLAGS="$(TARGET_CFLAGS)" \
54 LDFLAGS="$(TARGET_LDFLAGS)" \
55 BACKENDS="$(IWINFO_BACKENDS)"
57 define Package/libiwinfo/install
58 $(INSTALL_DIR) $(1)/usr/bin
59 $(INSTALL_BIN) $(PKG_BUILD_DIR)/iwinfo.lua $(1)/usr/bin/iwinfo
60 $(INSTALL_DIR) $(1)/usr/lib/lua
61 $(INSTALL_BIN) $(PKG_BUILD_DIR)/iwinfo.so $(1)/usr/lib/lua/iwinfo.so
64 $(eval $(call BuildPackage,libiwinfo))