summaryrefslogtreecommitdiffstats
path: root/rules/pciutils.make
blob: 20e2b7f7e0cc9cc33c1fc52ab9bf1f8a97b42c2e (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
# -*-makefile-*-
#
# Copyright (C) 2006 by Erwin Rol
# Copyright (C) 2009 by Wolfram Sang, Pengutronix
#
# 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	:= 3.12.0
PCIUTILS_MD5		:= f6607d41eb8ce0f676368a1012b5fe5c
PCIUTILS		:= pciutils-$(PCIUTILS_VERSION)
PCIUTILS_SUFFIX		:= tar.gz
PCIUTILS_URL		:= https://github.com/pciutils/pciutils/archive/refs/tags/v$(PCIUTILS_VERSION).$(PCIUTILS_SUFFIX)
PCIUTILS_SOURCE		:= $(SRCDIR)/$(PCIUTILS).$(PCIUTILS_SUFFIX)
PCIUTILS_DIR		:= $(BUILDDIR)/$(PCIUTILS)
PCIUTILS_LICENSE	:= GPL-2.0-or-later
PCIUTILS_LICENSE_FILES	:= \
	file://README;startline=4;endline=8;md5=2ae7724797a960932b288272eed49a30

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

PCIUTILS_CONF_TOOL	:= NO
PCIUTILS_MAKE_ENV	:= $(CROSS_ENV)

PCIUTILS_MAKE_OPT := \
	CROSS_COMPILE=$(COMPILER_PREFIX) \
	PREFIX=/usr \
	SBINDIR=/usr/bin \
	HOST=$(PTXCONF_ARCH_STRING)-linux \
	RELEASE=$(KERNEL_HEADER_VERSION) \
	ZLIB=no \
	LIBKMOD=$(call ptx/yesno, PTXCONF_PCIUTILS_LIBKMOD) \
	SHARED=$(call ptx/yesno, PTXCONF_PCIUTILS_LIBPCI) \
	STRIP= \
	DNS=no \
	HWDB=$(call ptx/yesno, PTXCONF_PCIUTILS_HWDB)

PCIUTILS_INSTALL_OPT := \
	$(PCIUTILS_MAKE_OPT) \
	install \
	$(call ptx/ifdef,PTXCONF_PCIUTILS_LIBPCI,install-lib,)

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

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

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

ifdef PTXCONF_PCIUTILS_TOOLS
	@$(call install_copy, pciutils, 0, 0, 0755, -, /usr/bin/lspci)
	@$(call install_copy, pciutils, 0, 0, 0755, -, /usr/bin/setpci)
endif

ifdef PTXCONF_PCIUTILS_LIBPCI
	@$(call install_lib, pciutils, 0, 0, 0644, libpci)
endif

	@$(call install_finish, pciutils)

	@$(call touch)

# vim: syntax=make