xref: /OK3568_Linux_fs/buildroot/package/ebtables/ebtables.mk (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1################################################################################
2#
3# ebtables
4#
5################################################################################
6
7EBTABLES_VERSION = 2.0.11
8EBTABLES_SITE = http://ftp.netfilter.org/pub/ebtables
9EBTABLES_LICENSE = GPL-2.0+
10EBTABLES_LICENSE_FILES = COPYING
11EBTABLES_CPE_ID_VENDOR = netfilter
12EBTABLES_SELINUX_MODULES = iptables
13
14# for 0003-configure.ac-add-option-enable-kernel-64-userland-32.patch
15EBTABLES_AUTORECONF = YES
16ifeq ($(BR2_KERNEL_64_USERLAND_32),y)
17EBTABLES_CONF_OPTS += --enable-kernel-64-userland-32
18endif
19
20ifeq ($(BR2_PACKAGE_EBTABLES_UTILS_SAVE),y)
21define EBTABLES_INSTALL_TARGET_UTILS_SAVE
22	$(INSTALL) -m 0755 -D $(@D)/ebtables-save.sh $(TARGET_DIR)/usr/sbin/ebtables-legacy-save
23endef
24EBTABLES_POST_INSTALL_TARGET_HOOKS += EBTABLES_INSTALL_TARGET_UTILS_SAVE
25else
26# ebtables-legacy-save is installed by default, thus remove it from target
27define EBTABLES_REMOVE_UTILS_SAVE
28	$(RM) -f $(TARGET_DIR)/usr/sbin/ebtables-legacy-save
29endef
30EBTABLES_POST_INSTALL_TARGET_HOOKS += EBTABLES_REMOVE_UTILS_SAVE
31endif
32
33# ebtables-legacy-restore is installed by default, thus remove it if not
34# selected
35ifeq ($(BR2_PACKAGE_EBTABLES_UTILS_RESTORE),)
36define EBTABLES_REMOVE_UTILS_RESTORE
37	$(RM) -f $(TARGET_DIR)/usr/sbin/ebtables-legacy-restore
38endef
39EBTABLES_POST_INSTALL_TARGET_HOOKS += EBTABLES_REMOVE_UTILS_RESTORE
40endif
41
42ifeq ($(BR2_PACKAGE_IPTABLES_NFTABLES),)
43define EBTABLES_INSTALL_LEGACY_SYMLINK
44	ln -sf /usr/sbin/ebtables-legacy $(TARGET_DIR)/sbin/ebtables
45endef
46EBTABLES_POST_INSTALL_TARGET_HOOKS += EBTABLES_INSTALL_LEGACY_SYMLINK
47endif
48
49$(eval $(autotools-package))
50