Add more license tags with SPDX identifiers
[openwrt/openwrt.git] / package / network / utils / ipset / Makefile
1
2 # Copyright (C) 2009-2012 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 include $(INCLUDE_DIR)/kernel.mk
10
11 PKG_NAME:=ipset
12 PKG_VERSION:=6.20.1
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=http://ipset.netfilter.org
17 PKG_MD5SUM:=8af741492752fbf24d3a28a9d1473d40
18
19 PKG_MAINTAINER:=Jo-Philipp Wich <jow@openwrt.org>
20 PKG_LICENSE:=GPL-2.0
21
22 PKG_LICENSE:=GPL-2.0
23 PKG_LICENSE_FILES:=COPYING
24
25 PKG_FIXUP:=autoreconf
26 PKG_INSTALL:=1
27
28 include $(INCLUDE_DIR)/package.mk
29
30 define Package/ipset/Default
31 DEPENDS:= @(!(TARGET_ps3||TARGET_pxcab)||BROKEN)
32 endef
33
34 define Package/ipset
35 $(call Package/ipset/Default)
36 SECTION:=net
37 CATEGORY:=Network
38 DEPENDS+= +kmod-ipt-ipset +libmnl
39 TITLE:=IPset administration utility
40 URL:=http://ipset.netfilter.org/
41 endef
42
43 CONFIGURE_ARGS += \
44 --with-kbuild="$(LINUX_DIR)"
45
46 MAKE_FLAGS += \
47 ARCH="$(LINUX_KARCH)" \
48 SHELL="$(BASH)"
49
50 IPSET_MODULES:= \
51 ipset/ip_set \
52 ipset/ip_set_bitmap_ip \
53 ipset/ip_set_bitmap_ipmac \
54 ipset/ip_set_bitmap_port \
55 ipset/ip_set_hash_ip \
56 ipset/ip_set_hash_ipport \
57 ipset/ip_set_hash_ipportip \
58 ipset/ip_set_hash_ipportnet \
59 ipset/ip_set_hash_net \
60 ipset/ip_set_hash_netiface \
61 ipset/ip_set_hash_netport \
62 ipset/ip_set_list_set \
63 xt_set \
64
65 define Build/Compile
66 $(call Build/Compile/Default)
67 $(call Build/Compile/Default,modules)
68 endef
69
70 define Package/ipset/install
71 $(INSTALL_DIR) $(1)/usr/sbin
72 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/ipset $(1)/usr/sbin/
73 $(INSTALL_DIR) $(1)/usr/lib
74 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libipset*.so* $(1)/usr/lib/
75 endef
76
77 define KernelPackage/ipt-ipset
78 $(call Package/ipset/Default)
79 SUBMENU:=Netfilter Extensions
80 TITLE:=IPset netfilter modules
81 DEPENDS+= +kmod-ipt-core +kmod-nfnetlink
82 FILES:=$(foreach mod,$(IPSET_MODULES),$(PKG_BUILD_DIR)/kernel/net/netfilter/$(mod).ko)
83 AUTOLOAD:=$(call AutoLoad,49,$(notdir $(IPSET_MODULES)))
84 endef
85
86 $(eval $(call BuildPackage,ipset))
87 $(eval $(call KernelPackage,ipt-ipset))