1 ########################################################################
5 # Utility that enables basic Ethernet frame filtering on a Linux bridge,
6 # MAC NAT and brouting.
8 ########################################################################
10 EBTABLES_NAME
=ebtables
11 EBTABLES_VERSION
=v2.0
.6
12 EBTABLES_SOURCE
=$(EBTABLES_NAME
)-$(EBTABLES_VERSION
).
tar.gz
13 #EBTABLES_SOURCE_URL=http://unc.dl.sourceforge.net/sourceforge/$(EBTABLES_NAME)/
14 EBTABLES_SOURCE_URL
=http
://aleron.dl.sourceforge.net
/sourceforge
/$(EBTABLES_NAME
)/
15 EBTABLES_BUILD_DIR
=$(BUILD_DIR
)/$(EBTABLES_NAME
)-$(EBTABLES_VERSION
)
17 $(DL_DIR
)/$(EBTABLES_SOURCE
):
18 $(WGET
) -P
$(DL_DIR
) $(EBTABLES_SOURCE_URL
)/$(EBTABLES_SOURCE
)
20 $(EBTABLES_BUILD_DIR
)/.unpacked
: $(DL_DIR
)/$(EBTABLES_SOURCE
)
21 zcat
$(DL_DIR
)/$(EBTABLES_SOURCE
) |
tar -C
$(BUILD_DIR
) -xvf
-
22 touch
$(EBTABLES_BUILD_DIR
)/.unpacked
24 $(EBTABLES_BUILD_DIR
)/.configured
: $(EBTABLES_BUILD_DIR
)/.unpacked
25 # Allow patches. Needed for openwrt for instance.
26 $(SOURCE_DIR
)/patch-kernel.sh
$(EBTABLES_BUILD_DIR
) $(SOURCE_DIR
) $(EBTABLES_NAME
)-*.patch
27 touch
$(EBTABLES_BUILD_DIR
)/.configured
29 $(EBTABLES_BUILD_DIR
)/$(EBTABLES_NAME
): $(EBTABLES_BUILD_DIR
)/.configured
30 $(TARGET_CONFIGURE_OPTS
) \
31 $(MAKE
) -C
$(EBTABLES_BUILD_DIR
) \
32 CC
=$(TARGET_CC
) CFLAGS
="$(TARGET_CFLAGS)" \
33 LDFLAGS
="$(TARGET_LDFLAGS)"
35 $(TARGET_DIR
)/sbin
/$(EBTABLES_NAME
): $(EBTABLES_BUILD_DIR
)/$(EBTABLES_NAME
)
36 $(TARGET_CONFIGURE_OPTS
) \
37 $(MAKE
) -C
$(EBTABLES_BUILD_DIR
) \
38 MANDIR
=$(TARGET_DIR
)/usr
/share
/man \
39 ETHERTYPESPATH
=${D}/etc
/ \
40 BINPATH
=$(TARGET_DIR
)/sbin
/ \
42 CFLAGS
="$(TARGET_CFLAGS)" \
44 $(STRIP
) $(TARGET_DIR
)/sbin
/$(EBTABLES_NAME
)
45 rm -rf
$(TARGET_DIR
)/usr
/share
/man
47 $(EBTABLES_NAME
): $(TARGET_DIR
)/sbin
/$(EBTABLES_NAME
)
49 $(EBTABLES_NAME
)-source
: $(DL_DIR
)/$(EBTABLES_SOURCE
)
51 $(EBTABLES_NAME
)-clean:
52 -$(MAKE
) -C
$(EBTABLES_BUILD_DIR
) clean
54 $(EBTABLES_NAME
)-dirclean
:
55 rm -rf
$(EBTABLES_BUILD_DIR
)