summaryrefslogtreecommitdiffhomepage
path: root/contrib/package/iwinfo/Makefile
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2011-12-02 20:48:08 +0000
committerJo-Philipp Wich <jow@openwrt.org>2011-12-02 20:48:08 +0000
commit89d48861e000a60cc6bd411c3a94ee6fdc3896d2 (patch)
tree71f04fc6e6f0045a4546984eda703f4c9a94ade1 /contrib/package/iwinfo/Makefile
parent714727c3445dc692b9923bcd3ca5b7565b906912 (diff)
libiwinfo: major changes
- move own headers to include/iwinfo/ and shipped ones to include/iwinfo/api/ - split into libiwinfo and libiwinfo-lua which contains only the binding - provide a public api for libiwinfo - install development headers and shared objects
Diffstat (limited to 'contrib/package/iwinfo/Makefile')
-rw-r--r--contrib/package/iwinfo/Makefile39
1 files changed, 33 insertions, 6 deletions
diff --git a/contrib/package/iwinfo/Makefile b/contrib/package/iwinfo/Makefile
index 011f122c5..a8990294d 100644
--- a/contrib/package/iwinfo/Makefile
+++ b/contrib/package/iwinfo/Makefile
@@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libiwinfo
-PKG_RELEASE:=16
+PKG_RELEASE:=17
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
@@ -15,12 +15,10 @@ include $(INCLUDE_DIR)/package.mk
define Package/libiwinfo
- SECTION:=luci
- CATEGORY:=LuCI
- SUBMENU:=8. Libraries
+ SECTION:=libs
+ CATEGORY:=Libraries
TITLE:=Generalized Wireless Information Library (iwinfo)
- DEPENDS:=+PACKAGE_kmod-mac80211:libnl-tiny +liblua +lua
- DEFAULT:=PACKAGE_luci-lib-sys
+ DEPENDS:=+PACKAGE_kmod-mac80211:libnl-tiny
endef
define Package/libiwinfo/description
@@ -28,6 +26,19 @@ define Package/libiwinfo/description
madwifi, nl80211 and wext driver interfaces.
endef
+define Package/libiwinfo-lua
+ SUBMENU:=Lua
+ SECTION:=lang
+ CATEGORY:=Languages
+ TITLE:=libiwinfo Lua binding
+ DEPENDS:=+libiwinfo +liblua +lua
+endef
+
+define Package/libiwinfo-lua/description
+ This is the Lua binding for the iwinfo library. It provides access to all enabled
+ backends.
+endef
+
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
$(CP) ./src/* $(PKG_BUILD_DIR)/
@@ -54,7 +65,22 @@ MAKE_FLAGS += \
LDFLAGS="$(TARGET_LDFLAGS)" \
BACKENDS="$(IWINFO_BACKENDS)"
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include/iwinfo
+ $(CP) $(PKG_BUILD_DIR)/include/iwinfo.h $(1)/usr/include/
+ $(CP) $(PKG_BUILD_DIR)/include/iwinfo/* $(1)/usr/include/iwinfo/
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/libiwinfo.so $(1)/usr/lib/libiwinfo.so
+ $(INSTALL_DIR) $(1)/usr/lib/lua
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/iwinfo.so $(1)/usr/lib/lua/iwinfo.so
+endef
+
define Package/libiwinfo/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/libiwinfo.so $(1)/usr/lib/libiwinfo.so
+endef
+
+define Package/libiwinfo-lua/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/iwinfo.lua $(1)/usr/bin/iwinfo
$(INSTALL_DIR) $(1)/usr/lib/lua
@@ -62,3 +88,4 @@ define Package/libiwinfo/install
endef
$(eval $(call BuildPackage,libiwinfo))
+$(eval $(call BuildPackage,libiwinfo-lua))