add ebtables usertools
authorWaldemar Brodkorb <mail@waldemar-brodkorb.de>
Thu, 17 Feb 2005 22:27:08 +0000 (22:27 +0000)
committerWaldemar Brodkorb <mail@waldemar-brodkorb.de>
Thu, 17 Feb 2005 22:27:08 +0000 (22:27 +0000)
SVN-Revision: 250

openwrt/package/Config.in
openwrt/package/ebtables/Config.in [new file with mode: 0644]
openwrt/package/ebtables/Makefile.in [new file with mode: 0644]
openwrt/package/ebtables/ebtables.mk [new file with mode: 0644]

index 30f45ad1424de371ae15d66ec432df4a18ede1b0..f7eff0639ef468819a97d74f8e0bd7b5a7603fe2 100644 (file)
@@ -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/openwrt/package/ebtables/Config.in b/openwrt/package/ebtables/Config.in
new file mode 100644 (file)
index 0000000..22c32ab
--- /dev/null
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_EBTABLES
+       bool "ebtables"
+       default n
+       help
+               ethernet bridging firewalling
+               http://ebtables.sourceforge.net/
diff --git a/openwrt/package/ebtables/Makefile.in b/openwrt/package/ebtables/Makefile.in
new file mode 100644 (file)
index 0000000..20a734f
--- /dev/null
@@ -0,0 +1,3 @@
+ifeq ($(strip $(BR2_PACKAGE_EBTABLES)),y)
+TARGETS+=ebtables
+endif
diff --git a/openwrt/package/ebtables/ebtables.mk b/openwrt/package/ebtables/ebtables.mk
new file mode 100644 (file)
index 0000000..b28e86c
--- /dev/null
@@ -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)