license info - revert r43155
[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_FIXUP:=autoreconf
23 PKG_INSTALL:=1
24
25 include $(INCLUDE_DIR)/package.mk
26
27 define Package/ipset/Default
28 DEPENDS:= @(!(TARGET_ps3||TARGET_pxcab)||BROKEN)
29 endef
30
31 define Package/ipset
32 $(call Package/ipset/Default)
33 SECTION:=net
34 CATEGORY:=Network
35 DEPENDS+= +kmod-ipt-ipset +libmnl
36 TITLE:=IPset administration utility
37 URL:=http://ipset.netfilter.org/
38 endef
39
40 CONFIGURE_ARGS += \
41 --with-kbuild="$(LINUX_DIR)"
42
43 MAKE_FLAGS += \
44 ARCH="$(LINUX_KARCH)" \
45 SHELL="$(BASH)"
46
47 IPSET_MODULES:= \
48 ipset/ip_set \
49 ipset/ip_set_bitmap_ip \
50 ipset/ip_set_bitmap_ipmac \
51 ipset/ip_set_bitmap_port \
52 ipset/ip_set_hash_ip \
53 ipset/ip_set_hash_ipport \
54 ipset/ip_set_hash_ipportip \
55 ipset/ip_set_hash_ipportnet \
56 ipset/ip_set_hash_net \
57 ipset/ip_set_hash_netiface \
58 ipset/ip_set_hash_netport \
59 ipset/ip_set_list_set \
60 xt_set \
61
62 define Build/Compile
63 $(call Build/Compile/Default)
64 $(call Build/Compile/Default,modules)
65 endef
66
67 define Package/ipset/install
68 $(INSTALL_DIR) $(1)/usr/sbin
69 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/ipset $(1)/usr/sbin/
70 $(INSTALL_DIR) $(1)/usr/lib
71 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libipset*.so* $(1)/usr/lib/
72 endef
73
74 define KernelPackage/ipt-ipset
75 $(call Package/ipset/Default)
76 SUBMENU:=Netfilter Extensions
77 TITLE:=IPset netfilter modules
78 DEPENDS+= +kmod-ipt-core +kmod-nfnetlink
79 FILES:=$(foreach mod,$(IPSET_MODULES),$(PKG_BUILD_DIR)/kernel/net/netfilter/$(mod).ko)
80 AUTOLOAD:=$(call AutoLoad,49,$(notdir $(IPSET_MODULES)))
81 endef
82
83 $(eval $(call BuildPackage,ipset))
84 $(eval $(call KernelPackage,ipt-ipset))