summaryrefslogtreecommitdiffstats
path: root/rules/ethtool.make
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2007-05-09 14:07:05 +0000
committerSascha Hauer <s.hauer@pengutronix.de>2007-05-09 14:07:05 +0000
commitc836bc0792559e538b54b138782927d7403d3487 (patch)
tree53ca2ef3a7c59726049fcce9d1931cdcf4e5ad7b /rules/ethtool.make
parent143292aca117f6038defc3b79c97c782ecfb1ca1 (diff)
downloadptxdist-c836bc0792559e538b54b138782927d7403d3487.tar.gz
ptxdist-c836bc0792559e538b54b138782927d7403d3487.tar.xz
add ethtool
git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunks/ptxdist-trunk@7168 33e552b5-05e3-0310-8538-816dae2090ed
Diffstat (limited to 'rules/ethtool.make')
-rw-r--r--rules/ethtool.make130
1 files changed, 130 insertions, 0 deletions
diff --git a/rules/ethtool.make b/rules/ethtool.make
new file mode 100644
index 000000000..d93a6c104
--- /dev/null
+++ b/rules/ethtool.make
@@ -0,0 +1,130 @@
+# -*-makefile-*-
+# $Id: template 6655 2007-01-02 12:55:21Z rsc $
+#
+# Copyright (C) 2007 by Sascha Hauer
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_ETHTOOL) += ethtool
+
+#
+# Paths and names
+#
+ETHTOOL_VERSION := 5
+ETHTOOL := ethtool-$(ETHTOOL_VERSION)
+ETHTOOL_SUFFIX := tar.gz
+ETHTOOL_URL := $(PTXCONF_SETUP_SFMIRROR)/gkernel/$(ETHTOOL).$(ETHTOOL_SUFFIX)
+ETHTOOL_SOURCE := $(SRCDIR)/$(ETHTOOL).$(ETHTOOL_SUFFIX)
+ETHTOOL_DIR := $(BUILDDIR)/$(ETHTOOL)
+
+# ----------------------------------------------------------------------------
+# Get
+# ----------------------------------------------------------------------------
+
+ethtool_get: $(STATEDIR)/ethtool.get
+
+$(STATEDIR)/ethtool.get: $(ethtool_get_deps_default)
+ @$(call targetinfo, $@)
+ @$(call touch, $@)
+
+$(ETHTOOL_SOURCE):
+ @$(call targetinfo, $@)
+ @$(call get, ETHTOOL)
+
+# ----------------------------------------------------------------------------
+# Extract
+# ----------------------------------------------------------------------------
+
+ethtool_extract: $(STATEDIR)/ethtool.extract
+
+$(STATEDIR)/ethtool.extract: $(ethtool_extract_deps_default)
+ @$(call targetinfo, $@)
+ @$(call clean, $(ETHTOOL_DIR))
+ @$(call extract, ETHTOOL)
+ @$(call patchin, ETHTOOL)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+ethtool_prepare: $(STATEDIR)/ethtool.prepare
+
+ETHTOOL_PATH := PATH=$(CROSS_PATH)
+ETHTOOL_ENV := $(CROSS_ENV)
+
+#
+# autoconf
+#
+ETHTOOL_AUTOCONF := $(CROSS_AUTOCONF_USR)
+
+$(STATEDIR)/ethtool.prepare: $(ethtool_prepare_deps_default)
+ @$(call targetinfo, $@)
+ @$(call clean, $(ETHTOOL_DIR)/config.cache)
+ cd $(ETHTOOL_DIR) && \
+ $(ETHTOOL_PATH) $(ETHTOOL_ENV) \
+ ./configure $(ETHTOOL_AUTOCONF)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Compile
+# ----------------------------------------------------------------------------
+
+ethtool_compile: $(STATEDIR)/ethtool.compile
+
+$(STATEDIR)/ethtool.compile: $(ethtool_compile_deps_default)
+ @$(call targetinfo, $@)
+ cd $(ETHTOOL_DIR) && $(ETHTOOL_PATH) $(MAKE) $(PARALLELMFLAGS)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+ethtool_install: $(STATEDIR)/ethtool.install
+
+$(STATEDIR)/ethtool.install: $(ethtool_install_deps_default)
+ @$(call targetinfo, $@)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+ethtool_targetinstall: $(STATEDIR)/ethtool.targetinstall
+
+$(STATEDIR)/ethtool.targetinstall: $(ethtool_targetinstall_deps_default)
+ @$(call targetinfo, $@)
+
+ @$(call install_init, ethtool)
+ @$(call install_fixup, ethtool,PACKAGE,ethtool)
+ @$(call install_fixup, ethtool,PRIORITY,optional)
+ @$(call install_fixup, ethtool,VERSION,$(ETHTOOL_VERSION))
+ @$(call install_fixup, ethtool,SECTION,base)
+ @$(call install_fixup, ethtool,AUTHOR,"Robert Schwebel <r.schwebel\@pengutronix.de>")
+ @$(call install_fixup, ethtool,DEPENDS,)
+ @$(call install_fixup, ethtool,DESCRIPTION,missing)
+
+ @$(call install_copy, ethtool, 0, 0, 0755, $(ETHTOOL_DIR)/ethtool, /usr/sbin/ethtool)
+
+ @$(call install_finish, ethtool)
+
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Clean
+# ----------------------------------------------------------------------------
+
+ethtool_clean:
+ rm -rf $(STATEDIR)/ethtool.*
+ rm -rf $(IMAGEDIR)/ethtool_*
+ rm -rf $(ETHTOOL_DIR)
+
+# vim: syntax=make