X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Fpackage%2Fiptables%2Fiptables.mk;fp=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Fpackage%2Fiptables%2Fiptables.mk;h=e425ec6f4ac43c4038051e1acacb7da9bf88c944;hb=b0a0f15dfaa205161a7fcb20cf1b8cd4948c2ef3;hp=0000000000000000000000000000000000000000;hpb=c6ac3cd55ee2da956195eee393b0882105dfad4e;p=packages%2Ftrusty%2Fcirros-testvm.git diff --git a/cirros-testvm/src-cirros/buildroot-2015.05/package/iptables/iptables.mk b/cirros-testvm/src-cirros/buildroot-2015.05/package/iptables/iptables.mk new file mode 100644 index 0000000..e425ec6 --- /dev/null +++ b/cirros-testvm/src-cirros/buildroot-2015.05/package/iptables/iptables.mk @@ -0,0 +1,47 @@ +################################################################################ +# +# iptables +# +################################################################################ + +IPTABLES_VERSION = 1.4.21 +IPTABLES_SOURCE = iptables-$(IPTABLES_VERSION).tar.bz2 +IPTABLES_SITE = http://ftp.netfilter.org/pub/iptables +IPTABLES_INSTALL_STAGING = YES +IPTABLES_DEPENDENCIES = host-pkgconf \ + $(if $(BR2_PACKAGE_LIBNETFILTER_CONNTRACK),libnetfilter_conntrack) +IPTABLES_LICENSE = GPLv2 +IPTABLES_LICENSE_FILES = COPYING +# Building static causes ugly warnings on some plugins +IPTABLES_CONF_OPTS = --libexecdir=/usr/lib --with-kernel=$(STAGING_DIR)/usr \ + $(if $(BR2_STATIC_LIBS),,--disable-static) +# Because of iptables-01-fix-static-link.patch +IPTABLES_AUTORECONF = YES + +# For connlabel match +ifeq ($(BR2_PACKAGE_LIBNETFILTER_CONNTRACK),y) +IPTABLES_DEPENDENCIES += libnetfilter_conntrack +endif + +# For nfnl_osf +ifeq ($(BR2_PACKAGE_LIBNFNETLINK),y) +IPTABLES_DEPENDENCIES += libnfnetlink +endif + +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 + +IPTABLES_POST_INSTALL_TARGET_HOOKS += IPTABLES_TARGET_SYMLINK_CREATE + +IPTABLES_POST_INSTALL_TARGET_HOOKS += IPTABLES_TARGET_IPV6_SYMLINK_CREATE + +$(eval $(autotools-package))