2008-07-06 21:23:29 +03:00
|
|
|
#
|
2009-01-28 11:24:02 +02:00
|
|
|
# Copyright (C) 2007-2009 OpenWrt.org
|
2007-11-30 13:30:37 +02:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=iw
|
2010-01-15 03:16:34 +02:00
|
|
|
PKG_VERSION:=0.9.19
|
2007-11-30 13:30:37 +02:00
|
|
|
PKG_RELEASE:=1
|
|
|
|
|
2008-09-21 17:51:44 +03:00
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
|
|
|
PKG_SOURCE_URL:=http://wireless.kernel.org/download/iw/
|
2010-01-15 03:16:34 +02:00
|
|
|
PKG_MD5SUM:=3b88743f9c6ce8a7e2f5fd7d18fdea42
|
2009-04-30 17:38:30 +03:00
|
|
|
PKG_BUILD_DEPENDS:=mac80211
|
2007-11-30 13:30:37 +02:00
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
|
|
|
define Package/iw
|
|
|
|
SECTION:=net
|
|
|
|
CATEGORY:=Network
|
|
|
|
TITLE:=cfg80211 interface configuration utility
|
2008-09-21 17:51:44 +03:00
|
|
|
URL:=http://wireless.kernel.org/en/users/Documentation/iw
|
2010-03-10 06:12:57 +02:00
|
|
|
DEPENDS:= +libnl-tiny @(!(TARGET_avr32||TARGET_etrax)||BROKEN)
|
2007-11-30 13:30:37 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Configure
|
2009-04-25 17:53:42 +03:00
|
|
|
echo "const char iw_version[] = \"$(PKG_VERSION)\";" > $(PKG_BUILD_DIR)/version.c
|
2009-04-30 17:38:30 +03:00
|
|
|
rm -f $(PKG_BUILD_DIR)/version.sh
|
|
|
|
touch $(PKG_BUILD_DIR)/version.sh
|
|
|
|
chmod +x $(PKG_BUILD_DIR)/version.sh
|
2007-11-30 13:30:37 +02:00
|
|
|
endef
|
|
|
|
|
2009-04-30 17:38:30 +03:00
|
|
|
TARGET_CPPFLAGS:= \
|
|
|
|
-I$(STAGING_DIR)/usr/include/libnl-tiny \
|
|
|
|
-I$(STAGING_DIR)/usr/include/mac80211 \
|
|
|
|
$(TARGET_CPPFLAGS) \
|
2009-05-04 19:13:46 +03:00
|
|
|
-DCONFIG_LIBNL20 \
|
|
|
|
-D_GNU_SOURCE
|
2009-04-30 17:38:30 +03:00
|
|
|
|
2007-11-30 13:30:37 +02:00
|
|
|
MAKE_FLAGS += \
|
2009-04-30 17:38:30 +03:00
|
|
|
CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \
|
|
|
|
LDFLAGS="$(TARGET_LDFLAGS)" \
|
|
|
|
NL1FOUND="" NL2FOUND=Y \
|
|
|
|
NLLIBNAME="libnl-tiny" \
|
|
|
|
LIBS="-lm -lnl-tiny" \
|
|
|
|
V=1
|
2007-11-30 13:30:37 +02:00
|
|
|
|
2008-07-31 05:43:42 +03:00
|
|
|
ifneq ($(CONFIG_LINUX_2_6),)
|
2007-11-30 13:33:31 +02:00
|
|
|
define Package/iw/install
|
2007-11-30 13:30:37 +02:00
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/iw $(1)/usr/sbin/
|
2007-11-30 13:33:31 +02:00
|
|
|
endef
|
|
|
|
endif
|
2007-11-30 13:30:37 +02:00
|
|
|
|
|
|
|
$(eval $(call BuildPackage,iw))
|