2 # Copyright (C) 2010-2012 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)
13 PKG_CONFIG_DEPENDS := \
14 CONFIG_PACKAGE_kmod-brcm-wl \
15 CONFIG_PACKAGE_kmod-brcm-wl-mini \
16 CONFIG_PACKAGE_kmod-brcm-wl-mimo \
17 CONFIG_PACKAGE_kmod-madwifi \
18 CONFIG_PACKAGE_kmod-mac80211
20 include $(INCLUDE_DIR)/package.mk
23 define Package/libiwinfo
26 TITLE:=Generalized Wireless Information Library (iwinfo)
27 DEPENDS:=+PACKAGE_kmod-mac80211:libnl-tiny
28 MAINTAINER:=Jo-Philipp Wich <xm@subsignal.org>
31 define Package/libiwinfo/description
32 Wireless information library with consistent interface for proprietary Broadcom,
33 madwifi, nl80211 and wext driver interfaces.
37 define Package/libiwinfo-lua
41 TITLE:=libiwinfo Lua binding
42 DEPENDS:=+libiwinfo +liblua +lua
43 MAINTAINER:=Jo-Philipp Wich <xm@subsignal.org>
46 define Package/libiwinfo-lua/description
47 This is the Lua binding for the iwinfo library. It provides access to all enabled
55 TITLE:=Generalized Wireless Information utility
57 MAINTAINER:=Jo-Philipp Wich <xm@subsignal.org>
60 define Package/iwinfo/description
61 Command line frontend for the wireless information library.
66 mkdir -p $(PKG_BUILD_DIR)
67 $(CP) ./src/* $(PKG_BUILD_DIR)/
70 define Build/Configure
74 $(if $(CONFIG_PACKAGE_kmod-brcm-wl),wl) \
75 $(if $(CONFIG_PACKAGE_kmod-brcm-wl-mini),wl) \
76 $(if $(CONFIG_PACKAGE_kmod-brcm-wl-mimo),wl) \
77 $(if $(CONFIG_PACKAGE_kmod-madwifi),madwifi) \
78 $(if $(CONFIG_PACKAGE_kmod-mac80211),nl80211)
81 -I$(STAGING_DIR)/usr/include/libnl-tiny \
82 -I$(STAGING_DIR)/usr/include \
87 CFLAGS="$(TARGET_CFLAGS)" \
88 LDFLAGS="$(TARGET_LDFLAGS)" \
89 BACKENDS="$(IWINFO_BACKENDS)"
91 define Build/InstallDev
92 $(INSTALL_DIR) $(1)/usr/include/iwinfo
93 $(CP) $(PKG_BUILD_DIR)/include/iwinfo.h $(1)/usr/include/
94 $(CP) $(PKG_BUILD_DIR)/include/iwinfo/* $(1)/usr/include/iwinfo/
95 $(INSTALL_DIR) $(1)/usr/lib
96 $(INSTALL_BIN) $(PKG_BUILD_DIR)/libiwinfo.so $(1)/usr/lib/libiwinfo.so
97 $(INSTALL_DIR) $(1)/usr/lib/lua
98 $(INSTALL_BIN) $(PKG_BUILD_DIR)/iwinfo.so $(1)/usr/lib/lua/iwinfo.so
101 define Package/libiwinfo/install
102 $(INSTALL_DIR) $(1)/usr/lib
103 $(INSTALL_BIN) $(PKG_BUILD_DIR)/libiwinfo.so $(1)/usr/lib/libiwinfo.so
106 define Package/libiwinfo-lua/install
107 $(INSTALL_DIR) $(1)/usr/lib/lua
108 $(INSTALL_BIN) $(PKG_BUILD_DIR)/iwinfo.so $(1)/usr/lib/lua/iwinfo.so
111 define Package/iwinfo/install
112 $(INSTALL_DIR) $(1)/usr/bin
113 $(INSTALL_BIN) $(PKG_BUILD_DIR)/iwinfo $(1)/usr/bin/iwinfo
116 $(eval $(call BuildPackage,libiwinfo))
117 $(eval $(call BuildPackage,libiwinfo-lua))
118 $(eval $(call BuildPackage,iwinfo))