libiwinfo: support txpwrlist(), freqlist() and countrylist() for radioX pseudodevices...
[project/luci.git] / contrib / package / iwinfo / Makefile
1 #
2 # Copyright (C) 2010 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:=5
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 endef
24
25 define Package/libiwinfo/description
26   Wireless information library with consistent interface for proprietary Broadcom,
27   madwifi, nl80211 and wext driver interfaces.
28 endef
29
30 define Build/Prepare
31         mkdir -p $(PKG_BUILD_DIR)
32         $(CP) ./src/* $(PKG_BUILD_DIR)/
33 endef
34
35 define Build/Configure
36 endef
37
38 IWINFO_BACKENDS := \
39         $(if $(CONFIG_PACKAGE_kmod-brcm-wl),wl) \
40         $(if $(CONFIG_PACKAGE_kmod-madwifi),madwifi) \
41         $(if $(CONFIG_PACKAGE_kmod-mac80211),nl80211)
42
43 TARGET_CFLAGS += \
44         -I$(STAGING_DIR)/usr/include \
45         -I$(STAGING_DIR)/usr/include/libnl-tiny
46
47 MAKE_FLAGS += \
48         FPIC="$(FPIC)" \
49         CFLAGS="$(TARGET_CFLAGS)" \
50         LDFLAGS="$(TARGET_LDFLAGS)" \
51         BACKENDS="$(IWINFO_BACKENDS)"
52
53 define Package/libiwinfo/install
54         $(INSTALL_DIR) $(1)/usr/bin
55         $(INSTALL_BIN) $(PKG_BUILD_DIR)/iwinfo.lua $(1)/usr/bin/iwinfo
56         $(INSTALL_DIR) $(1)/usr/lib/lua
57         $(INSTALL_BIN) $(PKG_BUILD_DIR)/iwinfo.so $(1)/usr/lib/lua/iwinfo.so
58 endef
59
60 $(eval $(call BuildPackage,libiwinfo))