summaryrefslogtreecommitdiffstats
path: root/package/iptables/iptables.mk
blob: 0b7dae181ab3c05fc00748a0496296d2a4bcb045 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#############################################################
#
# iptables
#
#############################################################
IPTABLES_VERSION = 1.4.9.1
IPTABLES_SOURCE = iptables-$(IPTABLES_VERSION).tar.bz2
IPTABLES_SITE = http://ftp.netfilter.org/pub/iptables
IPTABLES_DEPENDENCIES = host-pkg-config

IPTABLES_CONF_OPT = --libexecdir=/usr/lib --with-kernel=$(LINUX_HEADERS_DIR)
ifneq ($(BR2_INET_IPV6),y)
IPTABLES_CONF_OPT += --disable-ipv6
endif

IPTABLES_AUTORECONF = YES
IPTABLES_LIBTOOL_PATCH = NO

$(eval $(call AUTOTARGETS,package,iptables))

$(IPTABLES_HOOK_POST_INSTALL): $(IPTABLES_TARGET_INSTALL_TARGET)
	ln -sf iptables-multi $(TARGET_DIR)/usr/sbin/iptables
	ln -sf iptables-multi $(TARGET_DIR)/usr/sbin/iptables-save
	ln -sf iptables-multi $(TARGET_DIR)/usr/sbin/iptables-restore
ifeq ($(BR2_INET_IPV6),y)
	ln -sf ip6tables-multi $(TARGET_DIR)/usr/sbin/ip6tables
	ln -sf ip6tables-multi $(TARGET_DIR)/usr/sbin/ip6tables-save
	ln -sf ip6tables-multi $(TARGET_DIR)/usr/sbin/ip6tables-restore
else
	rm -f $(TARGET_DIR)/usr/lib/libip6tc.*
endif
	touch $@

$(IPTABLES_TARGET_UNINSTALL):
	$(call MESSAGE,"Uninstalling")
	rm -f $(TARGET_DIR)/usr/bin/iptables-xml
	rm -f $(TARGET_DIR)/usr/sbin/iptables* $(TARGET_DIR)/usr/sbin/ip6tables*
	rm -rf $(TARGET_DIR)/usr/lib/xtables
	rm -f $(IPTABLES_TARGET_INSTALL_TARGET) $(IPTABLES_HOOK_POST_INSTALL)