summaryrefslogtreecommitdiffstats
path: root/rules/pnputils.make
blob: caa79f032eb79b57ca740d25ebaeebd4217be15a (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
#
# Copyright (C) 2007 by Juergen Beisert
#
# 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_PNPUTILS) += pnputils

#
# Paths and names
#
PNPUTILS_VERSION	:= 0.1
PNPUTILS		:= pnputils-$(PNPUTILS_VERSION)
PNPUTILS_SUFFIX		:= tar.bz2
PNPUTILS_URL		:= http://www.vi.kernel.org/pub/linux/kernel/people/helgaas//$(PNPUTILS).$(PNPUTILS_SUFFIX)
PNPUTILS_SOURCE		:= $(SRCDIR)/$(PNPUTILS).$(PNPUTILS_SUFFIX)
PNPUTILS_DIR		:= $(BUILDDIR)/$(PNPUTILS)

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

pnputils_get: $(STATEDIR)/pnputils.get

$(STATEDIR)/pnputils.get: $(pnputils_get_deps_default)
	@$(call targetinfo, $@)
	@$(call touch, $@)

$(PNPUTILS_SOURCE):
	@$(call targetinfo, $@)
	@$(call get, PNPUTILS)

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

pnputils_extract: $(STATEDIR)/pnputils.extract

$(STATEDIR)/pnputils.extract: $(pnputils_extract_deps_default)
	@$(call targetinfo, $@)
	@$(call clean, $(PNPUTILS_DIR))
	@$(call extract, PNPUTILS)
	@$(call patchin, PNPUTILS)
	@$(call touch, $@)

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

pnputils_prepare: $(STATEDIR)/pnputils.prepare

PNPUTILS_PATH	:= PATH=$(CROSS_PATH)
PNPUTILS_ENV 	:= $(CROSS_ENV)

$(STATEDIR)/pnputils.prepare: $(pnputils_prepare_deps_default)
	@$(call targetinfo, $@)
	@$(call touch, $@)

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

pnputils_compile: $(STATEDIR)/pnputils.compile

$(STATEDIR)/pnputils.compile: $(pnputils_compile_deps_default)
	@$(call targetinfo, $@)
	@cd $(PNPUTILS_DIR) && $(PNPUTILS_PATH) $(PNPUTILS_ENV) $(MAKE) $(PARALLELMFLAGS)
	@$(call touch, $@)

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

pnputils_install: $(STATEDIR)/pnputils.install

$(STATEDIR)/pnputils.install: $(pnputils_install_deps_default)
	@$(call targetinfo, $@)
	@$(call touch, $@)

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

pnputils_targetinstall: $(STATEDIR)/pnputils.targetinstall

$(STATEDIR)/pnputils.targetinstall: $(pnputils_targetinstall_deps_default)
	@$(call targetinfo, $@)

	@$(call install_init, pnputils)
	@$(call install_fixup, pnputils,PACKAGE,pnputils)
	@$(call install_fixup, pnputils,PRIORITY,optional)
	@$(call install_fixup, pnputils,VERSION,$(PNPUTILS_VERSION))
	@$(call install_fixup, pnputils,SECTION,base)
	@$(call install_fixup, pnputils,AUTHOR,"Juergen Beisert <juergen\@kreuzholzen.de>")
	@$(call install_fixup, pnputils,DEPENDS,)
	@$(call install_fixup, pnputils,DESCRIPTION,missing)

ifdef PTXCONF_PNPUTILS_SETPNP
	@$(call install_copy, pnputils, 0, 0, 0755, \
		$(PNPUTILS_DIR)/setpnp, /sbin/setpnp)
endif
ifdef PTXCONF_PNPUTILS_LSPNP
	@$(call install_copy, pnputils, 0, 0, 0755, \
		$(PNPUTILS_DIR)/lspnp, /sbin/lspnp)
endif

	@$(call install_finish, pnputils)

	@$(call touch, $@)

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

pnputils_clean:
	rm -rf $(STATEDIR)/pnputils.*
	rm -rf $(PKGDIR)/pnputils_*
	rm -rf $(PNPUTILS_DIR)

# vim: syntax=make