summaryrefslogtreecommitdiffstats
path: root/rules/pciutils.make
blob: e5a04f4705b8241efc56d16ebd049bc4481daa67 (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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# -*-makefile-*-
# $Id: template 5041 2006-03-09 08:45:49Z mkl $
#
# Copyright (C) 2006 by Erwin Rol
#          
# 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_PCIUTILS) += pciutils

#
# Paths and names
#
PCIUTILS_VERSION	:= 2.2.1
PCIUTILS		:= pciutils-$(PCIUTILS_VERSION)
PCIUTILS_SUFFIX		:= tar.bz2
PCIUTILS_URL		:= ftp://ftp.kernel.org/pub/software/utils/pciutils/$(PCIUTILS).$(PCIUTILS_SUFFIX)
PCIUTILS_SOURCE		:= $(SRCDIR)/$(PCIUTILS).$(PCIUTILS_SUFFIX)
PCIUTILS_DIR		:= $(BUILDDIR)/$(PCIUTILS)


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

pciutils_get: $(STATEDIR)/pciutils.get

$(STATEDIR)/pciutils.get: $(pciutils_get_deps_default)
	@$(call targetinfo, $@)
	@$(call touch, $@)

$(PCIUTILS_SOURCE):
	@$(call targetinfo, $@)
	@$(call get, PCIUTILS)

# ----------------------------------------------------------------------------
# Extract
# ----------------------------------------------------------------------------

pciutils_extract: $(STATEDIR)/pciutils.extract

$(STATEDIR)/pciutils.extract: $(pciutils_extract_deps_default)
	@$(call targetinfo, $@)
	@$(call clean, $(PCIUTILS_DIR))
	@$(call extract, PCIUTILS)
	@$(call patchin, PCIUTILS)
	@$(call touch, $@)

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

pciutils_prepare: $(STATEDIR)/pciutils.prepare

PCIUTILS_PATH	:=  PATH=$(CROSS_PATH)
PCIUTILS_ENV 	:=  $(CROSS_ENV)

PCIUTILS_ENV += PREFIX=/usr
PCIUTILS_ENV += HOST=i686--linux 
PCIUTILS_ENV += RELEASE=2.6.15

#
# autoconf
#
PCIUTILS_AUTOCONF := $(CROSS_AUTOCONF_USR)

$(STATEDIR)/pciutils.prepare: $(pciutils_prepare_deps_default)
	@$(call targetinfo, $@)
	@$(call touch, $@)

# ----------------------------------------------------------------------------
# Compile
# ----------------------------------------------------------------------------

pciutils_compile: $(STATEDIR)/pciutils.compile

$(STATEDIR)/pciutils.compile: $(pciutils_compile_deps_default)
	@$(call targetinfo, $@)
	cd $(PCIUTILS_DIR) && $(PCIUTILS_PATH) make $(PCIUTILS_ENV)
	@$(call touch, $@)

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

pciutils_install: $(STATEDIR)/pciutils.install

$(STATEDIR)/pciutils.install: $(pciutils_install_deps_default)
	@$(call targetinfo, $@)
	@$(call touch, $@)

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

pciutils_targetinstall: $(STATEDIR)/pciutils.targetinstall

$(STATEDIR)/pciutils.targetinstall: $(pciutils_targetinstall_deps_default)
	@$(call targetinfo, $@)

	@$(call install_init, pciutils)
	@$(call install_fixup,pciutils,PACKAGE,pciutils)
	@$(call install_fixup,pciutils,PRIORITY,optional)
	@$(call install_fixup,pciutils,VERSION,$(PCIUTILS_VERSION))
	@$(call install_fixup,pciutils,SECTION,base)
	@$(call install_fixup,pciutils,AUTHOR,"Robert Schwebel <r.schwebel\@pengutronix.de>")
	@$(call install_fixup,pciutils,DEPENDS,)
	@$(call install_fixup,pciutils,DESCRIPTION,missing)

	@$(call install_copy, pciutils, 0, 0, 0755, $(PCIUTILS_DIR)/lspci, /usr/bin/lspci)
	@$(call install_copy, pciutils, 0, 0, 0755, $(PCIUTILS_DIR)/setpci, /usr/bin/setpci)
	@$(call install_copy, pciutils, 0, 0, 0755, $(PCIUTILS_DIR)/pci.ids, /usr/share/pci.ids, n)

	@$(call install_finish,pciutils)

	@$(call touch, $@)

# ----------------------------------------------------------------------------
# Clean
# ----------------------------------------------------------------------------

pciutils_clean:
	rm -rf $(STATEDIR)/pciutils.*
	rm -rf $(IMAGEDIR)/pciutils_*
	rm -rf $(PCIUTILS_DIR)

# vim: syntax=make