478f826518
As reported by 'scanf' on IRC, the iptables now fails to build because of a missing <asm/cache.h> header in the kernel headers. The package directly uses $(LINUX_HEADERS_DIR), which is not correct: this is the source directory of the kernel, not where they are installed, and in addition, this directory is empty/does not exist when using external toolchains. Instead, we use $(STAGING_DIR)/usr, which contains the kernel headers, as part of the toolchain headers. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
49 lines
1.5 KiB
Makefile
49 lines
1.5 KiB
Makefile
################################################################################
|
|
#
|
|
# iptables
|
|
#
|
|
################################################################################
|
|
|
|
IPTABLES_VERSION = 1.4.19.1
|
|
IPTABLES_SOURCE = iptables-$(IPTABLES_VERSION).tar.bz2
|
|
IPTABLES_SITE = http://ftp.netfilter.org/pub/iptables
|
|
IPTABLES_INSTALL_STAGING = YES
|
|
IPTABLES_DEPENDENCIES = host-pkgconf
|
|
IPTABLES_LICENSE = GPLv2
|
|
IPTABLES_LICENSE_FILES = COPYING
|
|
|
|
IPTABLES_CONF_OPT = --libexecdir=/usr/lib --with-kernel=$(STAGING_DIR)/usr
|
|
|
|
define IPTABLES_TARGET_SYMLINK_CREATE
|
|
ln -sf xtables-multi $(TARGET_DIR)/usr/sbin/iptables
|
|
ln -sf xtables-multi $(TARGET_DIR)/usr/sbin/iptables-save
|
|
ln -sf xtables-multi $(TARGET_DIR)/usr/sbin/iptables-restore
|
|
endef
|
|
|
|
define IPTABLES_TARGET_IPV6_SYMLINK_CREATE
|
|
ln -sf xtables-multi $(TARGET_DIR)/usr/sbin/ip6tables
|
|
ln -sf xtables-multi $(TARGET_DIR)/usr/sbin/ip6tables-save
|
|
ln -sf xtables-multi $(TARGET_DIR)/usr/sbin/ip6tables-restore
|
|
endef
|
|
|
|
define IPTABLES_TARGET_IPV6_REMOVE
|
|
rm -f $(TARGET_DIR)/usr/lib/libip6tc.*
|
|
endef
|
|
|
|
IPTABLES_POST_INSTALL_TARGET_HOOKS += IPTABLES_TARGET_SYMLINK_CREATE
|
|
|
|
ifeq ($(BR2_INET_IPV6),y)
|
|
IPTABLES_POST_INSTALL_TARGET_HOOKS += IPTABLES_TARGET_IPV6_SYMLINK_CREATE
|
|
else
|
|
IPTABLES_POST_INSTALL_TARGET_HOOKS += IPTABLES_TARGET_IPV6_REMOVE
|
|
endif
|
|
|
|
define IPTABLES_UNINSTALL_TARGET_CMDS
|
|
rm -f $(TARGET_DIR)/usr/bin/iptables-xml
|
|
rm -f $(TARGET_DIR)/usr/sbin/iptables* $(TARGET_DIR)/usr/sbin/ip6tables*
|
|
rm -f $(TARGET_DIR)/usr/sbin/xtables-multi
|
|
rm -rf $(TARGET_DIR)/usr/lib/xtables
|
|
endef
|
|
|
|
$(eval $(autotools-package))
|