Add more license tags with SPDX identifiers
[openwrt/staging/chunkeey.git] / package / network / utils / iw / Makefile
1 #
2 # Copyright (C) 2007-2011 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=iw
11 PKG_VERSION:=3.15
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
15 PKG_SOURCE_URL:=https://www.kernel.org/pub/software/network/iw
16 PKG_MD5SUM:=3b77ad7ec44a865a3bb2ab6c1c463bba
17
18 PKG_LICENSE:=ISC
19 PKG_LICENSE_FILES:=COPYING
20
21 PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
22 PKG_LICENSE:=GPL-2.0
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/iw
27 SECTION:=net
28 CATEGORY:=Network
29 TITLE:=cfg80211 interface configuration utility
30 URL:=http://wireless.kernel.org/en/users/Documentation/iw
31 DEPENDS:= +libnl-tiny @(!TARGET_avr32||BROKEN)
32 endef
33
34 define Build/Configure
35 echo "const char iw_version[] = \"$(PKG_VERSION)\";" > $(PKG_BUILD_DIR)/version.c
36 rm -f $(PKG_BUILD_DIR)/version.sh
37 touch $(PKG_BUILD_DIR)/version.sh
38 chmod +x $(PKG_BUILD_DIR)/version.sh
39 endef
40
41 TARGET_CPPFLAGS:= \
42 -I$(STAGING_DIR)/usr/include/libnl-tiny \
43 $(TARGET_CPPFLAGS) \
44 -DCONFIG_LIBNL20 \
45 -D_GNU_SOURCE
46
47 MAKE_FLAGS += \
48 CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -ffunction-sections -fdata-sections" \
49 LDFLAGS="$(TARGET_LDFLAGS) -Wl,--gc-sections" \
50 NL1FOUND="" NL2FOUND=Y \
51 NLLIBNAME="libnl-tiny" \
52 LIBS="-lm -lnl-tiny" \
53 V=1
54
55 define Package/iw/install
56 $(INSTALL_DIR) $(1)/usr/sbin
57 $(INSTALL_BIN) $(PKG_BUILD_DIR)/iw $(1)/usr/sbin/
58 endef
59
60 $(eval $(call BuildPackage,iw))