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