source: trunk/package/iwinfo/Makefile @ 31053

Last change on this file since 31053 was 31053, checked in by jow, 4 years ago

[package] iwinfo: properly cast nl80211 mBm signal levels to reported dBm values (#11161)

File size: 3.0 KB
Line 
1#
2# Copyright (C) 2010-2012 Jo-Philipp Wich <xm@subsignal.org>
3#
4# This is free software, licensed under the GPL 2 license.
5#
6
7include $(TOPDIR)/rules.mk
8
9PKG_NAME:=libiwinfo
10PKG_RELEASE:=33
11
12PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
13PKG_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
19
20include $(INCLUDE_DIR)/package.mk
21
22
23define Package/libiwinfo
24  SECTION:=libs
25  CATEGORY:=Libraries
26  TITLE:=Generalized Wireless Information Library (iwinfo)
27  DEPENDS:=+PACKAGE_kmod-mac80211:libnl-tiny
28  MAINTAINER:=Jo-Philipp Wich <xm@subsignal.org>
29endef
30
31define Package/libiwinfo/description
32  Wireless information library with consistent interface for proprietary Broadcom,
33  madwifi, nl80211 and wext driver interfaces.
34endef
35
36
37define Package/libiwinfo-lua
38  SUBMENU:=Lua
39  SECTION:=lang
40  CATEGORY:=Languages
41  TITLE:=libiwinfo Lua binding
42  DEPENDS:=+libiwinfo +liblua +lua
43  MAINTAINER:=Jo-Philipp Wich <xm@subsignal.org>
44endef
45
46define Package/libiwinfo-lua/description
47  This is the Lua binding for the iwinfo library. It provides access to all enabled
48  backends.
49endef
50
51
52define Package/iwinfo
53  SECTION:=utils
54  CATEGORY:=Utilities
55  TITLE:=Generalized Wireless Information utility
56  DEPENDS:=+libiwinfo
57  MAINTAINER:=Jo-Philipp Wich <xm@subsignal.org>
58endef
59
60define Package/iwinfo/description
61  Command line frontend for the wireless information library.
62endef
63
64
65define Build/Prepare
66        mkdir -p $(PKG_BUILD_DIR)
67        $(CP) ./src/* $(PKG_BUILD_DIR)/
68endef
69
70define Build/Configure
71endef
72
73IWINFO_BACKENDS := \
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)
79
80TARGET_CFLAGS += \
81        -I$(STAGING_DIR)/usr/include/libnl-tiny \
82        -I$(STAGING_DIR)/usr/include \
83        -D_GNU_SOURCE
84
85MAKE_FLAGS += \
86        FPIC="$(FPIC)" \
87        CFLAGS="$(TARGET_CFLAGS)" \
88        LDFLAGS="$(TARGET_LDFLAGS)" \
89        BACKENDS="$(IWINFO_BACKENDS)"
90
91define 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
99endef
100
101define Package/libiwinfo/install
102        $(INSTALL_DIR) $(1)/usr/lib
103        $(INSTALL_BIN) $(PKG_BUILD_DIR)/libiwinfo.so $(1)/usr/lib/libiwinfo.so
104endef
105
106define 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
109endef
110
111define Package/iwinfo/install
112        $(INSTALL_DIR) $(1)/usr/bin
113        $(INSTALL_BIN) $(PKG_BUILD_DIR)/iwinfo $(1)/usr/bin/iwinfo
114endef
115
116$(eval $(call BuildPackage,libiwinfo))
117$(eval $(call BuildPackage,libiwinfo-lua))
118$(eval $(call BuildPackage,iwinfo))
Note: See TracBrowser for help on using the repository browser.