summaryrefslogtreecommitdiffstats
path: root/rules/ethtool.make
blob: dbce40aa38720e0cdcfddfb365e12d63a54e1f58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# -*-makefile-*-
#
# 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	:= 6+20090323.orig
ETHTOOL_SUFFIX	:= tar.gz
ETHTOOL		:= ethtool-$(ETHTOOL_VERSION)
ETHTOOL_TARBALL	:= ethtool_$(ETHTOOL_VERSION).$(ETHTOOL_SUFFIX)
ETHTOOL_URL	:= $(PTXCONF_SETUP_DEBMIRROR)/pool/main/e/ethtool/$(ETHTOOL_TARBALL)
ETHTOOL_SOURCE	:= $(SRCDIR)/$(ETHTOOL_TARBALL)
ETHTOOL_DIR	:= $(BUILDDIR)/$(ETHTOOL)

# ----------------------------------------------------------------------------
# Get
# ----------------------------------------------------------------------------

$(ETHTOOL_SOURCE):
	@$(call targetinfo)
	@$(call get, ETHTOOL)

# ----------------------------------------------------------------------------
# Prepare
# ----------------------------------------------------------------------------

ETHTOOL_PATH	:= PATH=$(CROSS_PATH)
ETHTOOL_ENV 	:= $(CROSS_ENV)

#
# autoconf
#
ETHTOOL_AUTOCONF := $(CROSS_AUTOCONF_USR)

# ----------------------------------------------------------------------------
# Install
# ----------------------------------------------------------------------------

$(STATEDIR)/ethtool.install:
	@$(call targetinfo)
	@$(call touch)

# ----------------------------------------------------------------------------
# Target-Install
# ----------------------------------------------------------------------------


$(STATEDIR)/ethtool.targetinstall:
	@$(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 $(PKGDIR)/ethtool_*
	rm -rf $(ETHTOOL_DIR)

# vim: syntax=make