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 mkdir
-p
$(TARGET_DIR
)/sbin
/
37 $(TARGET_CONFIGURE_OPTS
) \
38 $(MAKE
) -C
$(EBTABLES_BUILD_DIR
) \
39 MANDIR
=$(TARGET_DIR
)/usr
/share
/man \
40 ETHERTYPESPATH
=${D}/etc
/ \
41 BINPATH
=$(TARGET_DIR
)/sbin
/ \
43 CFLAGS
="$(TARGET_CFLAGS)" \
45 $(STRIP
) $(TARGET_DIR
)/sbin
/$(EBTABLES_NAME
)
46 rm -rf
$(TARGET_DIR
)/usr
/share
/man
48 $(EBTABLES_NAME
): $(TARGET_DIR
)/sbin
/$(EBTABLES_NAME
)
50 $(EBTABLES_NAME
)-source
: $(DL_DIR
)/$(EBTABLES_SOURCE
)
52 $(EBTABLES_NAME
)-clean:
53 -$(MAKE
) -C
$(EBTABLES_BUILD_DIR
) clean
55 $(EBTABLES_NAME
)-dirclean
:
56 rm -rf
$(EBTABLES_BUILD_DIR
)