summaryrefslogtreecommitdiffstats
path: root/package/ethtool
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2006-04-10 23:31:14 +0000
committerEric Andersen <andersen@codepoet.org>2006-04-10 23:31:14 +0000
commit9dd69ffbfd8a99c066d84cda4f113fe1c37f3978 (patch)
tree27fe8d54bddde50fb0c8fb6a404175621a243e19 /package/ethtool
parentfa3670698e4e31a396d4efb323d9be174c810d50 (diff)
downloadbuildroot-novena-9dd69ffbfd8a99c066d84cda4f113fe1c37f3978.tar.gz
buildroot-novena-9dd69ffbfd8a99c066d84cda4f113fe1c37f3978.zip
0000789: New package: ethtool: patch from jacmet
This little patch adds a target for ethtool to buildroot. ethtool is a small utility for examining and tuning your ethernet-based network interface.
Diffstat (limited to 'package/ethtool')
-rw-r--r--package/ethtool/Config.in8
-rw-r--r--package/ethtool/ethtool.mk58
2 files changed, 66 insertions, 0 deletions
diff --git a/package/ethtool/Config.in b/package/ethtool/Config.in
new file mode 100644
index 000000000..bab7c00f9
--- /dev/null
+++ b/package/ethtool/Config.in
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_ETHTOOL
+ bool "ethtool"
+ default n
+ help
+ ethtool is a small utility for examining and tuning your
+ ethernet-based network interface.
+
+ http://sourceforge.net/projects/gkernel/
diff --git a/package/ethtool/ethtool.mk b/package/ethtool/ethtool.mk
new file mode 100644
index 000000000..df007dea7
--- /dev/null
+++ b/package/ethtool/ethtool.mk
@@ -0,0 +1,58 @@
+#############################################################
+#
+# ethtool
+#
+#############################################################
+
+ETHTOOL_VERSION=3
+ETHTOOL_SOURCE=ethtool-$(ETHTOOL_VERSION).tar.gz
+ETHTOOL_SITE=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/ethtool/
+ETHTOOL_DIR=$(BUILD_DIR)/${shell basename $(ETHTOOL_SOURCE) .tar.gz}
+ETHTOOL_WORKDIR=$(BUILD_DIR)/ethtool-$(ETHTOOL_VERSION)
+ETHTOOL_CAT:=zcat
+
+$(DL_DIR)/$(ETHTOOL_SOURCE):
+ $(WGET) -P $(DL_DIR) $(ETHTOOL_SITE)/$(ETHTOOL_SOURCE)
+
+$(ETHTOOL_DIR)/.unpacked: $(DL_DIR)/$(ETHTOOL_SOURCE)
+ $(ETHTOOL_CAT) $(DL_DIR)/$(ETHTOOL_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+ touch $(ETHTOOL_DIR)/.unpacked
+
+$(ETHTOOL_DIR)/.configured: $(ETHTOOL_DIR)/.unpacked
+ (cd $(ETHTOOL_DIR); rm -rf config.cache; \
+ $(TARGET_CONFIGURE_OPTS) \
+ ./configure \
+ --target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ );
+ touch $(ETHTOOL_DIR)/.configured
+
+$(ETHTOOL_WORKDIR)/ethtool: $(ETHTOOL_DIR)/.configured
+ $(MAKE) CC=$(TARGET_CC) -C $(ETHTOOL_WORKDIR)
+
+$(ETHTOOL_WORKDIR)/.installed: $(ETHTOOL_WORKDIR)/ethtool
+ cp $(ETHTOOL_WORKDIR)/ethtool $(TARGET_DIR)/usr/sbin
+ touch $(ETHTOOL_WORKDIR)/.installed
+
+ethtool: uclibc $(ETHTOOL_WORKDIR)/.installed
+
+ethtool-source: $(DL_DIR)/$(ETHTOOL_SOURCE)
+
+ethtool-clean:
+ @if [ -d $(ETHTOOL_WORKDIR)/Makefile ] ; then \
+ $(MAKE) -C $(ETHTOOL_WORKDIR) clean ; \
+ fi;
+
+ethtool-dirclean:
+ rm -rf $(ETHTOOL_DIR) $(ETHTOOL_WORKDIR)
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(strip $(BR2_PACKAGE_ETHTOOL)),y)
+TARGETS+=ethtool
+endif