source: branches/backfire/package/ipset/Makefile @ 29304

Last change on this file since 29304 was 29304, checked in by nico, 5 years ago

[backfire] cleanup: remove refs to unsupported "ps3" target

File size: 2.1 KB
Line 
1#
2# Copyright (C) 2009 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7#
8include $(TOPDIR)/rules.mk
9include $(INCLUDE_DIR)/kernel.mk
10
11PKG_NAME:=ipset
12PKG_VERSION:=4.1
13PKG_RELEASE:=1
14
15PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16PKG_SOURCE_URL:=http://ipset.netfilter.org
17PKG_MD5SUM:=d104007fdf5ea64fef774c22b1c0a97b
18
19include $(INCLUDE_DIR)/package.mk
20
21define Package/ipset/Default
22  DEPENDS:= @LINUX_2_6 @(!(TARGET_pxcab)||BROKEN)
23endef
24
25define Package/ipset
26$(call Package/ipset/Default)
27  SECTION:=net
28  CATEGORY:=Network
29  DEPENDS+= +iptables-mod-ipset +kmod-ipt-ipset
30  TITLE:=IPset administration utility
31  URL:=http://ipset.netfilter.org/
32endef
33
34include $(INCLUDE_DIR)/kernel-defaults.mk
35
36IPSET_MAKEOPTS:= -C $(PKG_BUILD_DIR) \
37        $(TARGET_CONFIGURE_OPTS) \
38        COPT_FLAGS="$(TARGET_CFLAGS)" \
39        LDFLAGS="-rdynamic -static-libgcc" \
40        NO_EXTRA_WARN_FLAGS=yes \
41        KERNEL_DIR="$(LINUX_DIR)" \
42        PREFIX=/usr \
43
44IPSET_MODULES:= \
45        ip_set \
46        ip_set_iphash \
47        ip_set_ipmap \
48        ip_set_ipporthash \
49        ip_set_ipportiphash \
50        ip_set_ipportnethash \
51        ip_set_iptree \
52        ip_set_iptreemap \
53        ip_set_macipmap \
54        ip_set_nethash \
55        ip_set_portmap \
56        ip_set_setlist \
57        ipt_set \
58        ipt_SET \
59
60define Build/Compile
61        mkdir -p $(PKG_INSTALL_DIR)
62        $(MAKE) $(IPSET_MAKEOPTS) binaries
63        $(MAKE) $(KERNEL_MAKEOPTS) M="$(PKG_BUILD_DIR)/kernel" IP_NF_SET_MAX="256" IP_NF_SET_HASHSIZE="1024" modules
64        $(MAKE) $(IPSET_MAKEOPTS) DESTDIR="$(PKG_INSTALL_DIR)" binaries_install
65endef
66
67define 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/ipset
71        $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipset/libipset*.so $(1)/usr/lib/ipset/
72endef
73
74define KernelPackage/ipt-ipset
75$(call Package/ipset/Default)
76  SUBMENU:=Netfilter Extensions
77  TITLE:=IPset netfilter modules
78  DEPENDS+= kmod-ipt-core
79  FILES:=$(foreach mod,$(IPSET_MODULES),$(PKG_BUILD_DIR)/kernel/$(mod).ko)
80  AUTOLOAD:=$(call AutoLoad,46,$(IPSET_MODULES))
81endef
82
83$(eval $(call BuildPackage,ipset))
84$(eval $(call KernelPackage,ipt-ipset))
Note: See TracBrowser for help on using the repository browser.