aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openwrt.org>2005-02-17 22:27:08 +0000
committerWaldemar Brodkorb <wbx@openwrt.org>2005-02-17 22:27:08 +0000
commit136ebc919a1d87672b038cc495503be50a28baf3 (patch)
treebcfdefb541edb416057575ab5dd4a66705813ef5
parent1344a2ac65380069fe082cafb74fe2d34a7cfb62 (diff)
downloadmaster-187ad058-136ebc919a1d87672b038cc495503be50a28baf3.tar.gz
master-187ad058-136ebc919a1d87672b038cc495503be50a28baf3.tar.bz2
master-187ad058-136ebc919a1d87672b038cc495503be50a28baf3.zip
add ebtables usertools
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@250 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--package/Config.in1
-rw-r--r--package/ebtables/Config.in6
-rw-r--r--package/ebtables/Makefile.in3
-rw-r--r--package/ebtables/ebtables.mk37
4 files changed, 47 insertions, 0 deletions
diff --git a/package/Config.in b/package/Config.in
index 30f45ad142..f7eff0639e 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -11,5 +11,6 @@ source "package/bridge/Config.in"
comment "Suggested Extras"
source "package/dropbear_sshd/Config.in"
+source "package/ebtables/Config.in"
endmenu
diff --git a/package/ebtables/Config.in b/package/ebtables/Config.in
new file mode 100644
index 0000000000..22c32abedf
--- /dev/null
+++ b/package/ebtables/Config.in
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_EBTABLES
+ bool "ebtables"
+ default n
+ help
+ ethernet bridging firewalling
+ http://ebtables.sourceforge.net/
diff --git a/package/ebtables/Makefile.in b/package/ebtables/Makefile.in
new file mode 100644
index 0000000000..20a734f300
--- /dev/null
+++ b/package/ebtables/Makefile.in
@@ -0,0 +1,3 @@
+ifeq ($(strip $(BR2_PACKAGE_EBTABLES)),y)
+TARGETS+=ebtables
+endif
diff --git a/package/ebtables/ebtables.mk b/package/ebtables/ebtables.mk
new file mode 100644
index 0000000000..b28e86c28b
--- /dev/null
+++ b/package/ebtables/ebtables.mk
@@ -0,0 +1,37 @@
+#############################################################
+#
+# ebtables
+#
+#############################################################
+#
+EBTABLES_SOURCE_URL=http://umn.dl.sourceforge.net/sourceforge/ebtables/
+EBTABLES_SOURCE=ebtables-v2.0.6.tar.gz
+EBTABLES_BUILD_DIR=$(BUILD_DIR)/ebtables-v2.0.6
+EBTABLES_TARGET_BINARY:=usr/sbin/ebtables
+
+$(DL_DIR)/$(EBTABLES_SOURCE):
+ $(WGET) -P $(DL_DIR) $(EBTABLES_SOURCE_URL)/$(EBTABLES_SOURCE)
+
+$(EBTABLES_BUILD_DIR)/.unpacked: $(DL_DIR)/$(EBTABLES_SOURCE)
+ zcat $(DL_DIR)/$(EBTABLES_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+ touch $(EBTABLES_BUILD_DIR)/.unpacked
+
+$(EBTABLES_BUILD_DIR)/ebtables: $(EBTABLES_BUILD_DIR)/.unpacked
+ $(MAKE) -C $(EBTABLES_BUILD_DIR) \
+ CC=$(TARGET_CC) LD=$(TARGET_CROSS)ld \
+ CFLAGS="$(TARGET_CFLAGS) -Wall"
+
+$(TARGET_DIR)/$(EBTABLES_TARGET_BINARY): $(EBTABLES_BUILD_DIR)/ebtables
+ cp -af $(EBTABLES_BUILD_DIR)/ebtables $(TARGET_DIR)/$(EBTABLES_TARGET_BINARY)
+ $(STRIP) $(TARGET_DIR)/$(EBTABLES_TARGET_BINARY)
+
+ebtables: linux $(TARGET_DIR)/$(EBTABLES_TARGET_BINARY)
+
+ebtables-source: $(DL_DIR)/$(EBTABLES_SOURCE)
+
+ebtables-clean:
+ #$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(EBTABLES_BUILD_DIR) uninstall
+ -$(MAKE) -C $(EBTABLES_BUILD_DIR) clean
+
+ebtables-dirclean:
+ rm -rf $(EBTABLES_BUILD_DIR)