summaryrefslogtreecommitdiffstats
path: root/rules/ptxdist-configs.make
blob: e4019af53f4c768daf24fba57ac5d71c8a813c6b (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
# -*-makefile-*-
#
# Copyright (C) 2016 by Michael Olbrich <m.olbrich@pengutronix.de>
#
# For further information about the PTXdist project and license conditions
# see the README file.
#

#
# We provide this package
#
PACKAGES-$(PTXCONF_PTXDIST_CONFIGS) += ptxdist-configs

PTXDIST_CONFIGS_VERSION	:= $(PTXDIST_VERSION_FULL)

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

$(call ptx/cfghash-file, PTXDIST_CONFIGS, $(PTXDIST_PTXCONFIG))
$(call ptx/cfghash-file, PTXDIST_CONFIGS, $(PTXDIST_PLATFORMCONFIG))

ifneq ($(wildcard $(PTXDIST_COLLECTIONCONFIG)),)
$(call ptx/cfghash-file, PTXDIST_CONFIGS, $(PTXDIST_COLLECTIONCONFIG))
endif

ifdef PTXCONF_KERNEL
$(call ptx/cfghash-file, PTXDIST_CONFIGS, $(KERNEL_CONFIG))
endif
ifdef PTXCONF_BAREBOX
$(call ptx/cfghash-file, PTXDIST_CONFIGS, $(BAREBOX_CONFIG))
endif

$(STATEDIR)/ptxdist-configs.targetinstall:
	@$(call targetinfo)

	@$(call install_init, ptxdist-configs)
	@$(call install_fixup,ptxdist-configs,PRIORITY,optional)
	@$(call install_fixup,ptxdist-configs,SECTION,base)
	@$(call install_fixup,ptxdist-configs,AUTHOR,"Michael Olbrich <m.olbrich@pengutronix.de>")
	@$(call install_fixup,ptxdist-configs,DESCRIPTION,missing)

	@$(call install_copy, ptxdist-configs, 0, 0, 0644, \
		$(PTXDIST_PTXCONFIG), /usr/share/ptxdist/ptxconfig)
	@$(call install_copy, ptxdist-configs, 0, 0, 0644, \
		$(PTXDIST_PLATFORMCONFIG), /usr/share/ptxdist/platformconfig)
ifneq ($(wildcard $(PTXDIST_COLLECTIONCONFIG)),)
	@$(call install_copy, ptxdist-configs, 0, 0, 0644, \
		$(PTXDIST_COLLECTIONCONFIG), /usr/share/ptxdist/collectionconfig)
endif
ifdef PTXCONF_KERNEL
	@$(call install_copy, ptxdist-configs, 0, 0, 0644, \
		$(KERNEL_CONFIG), /usr/share/ptxdist/kernelconfig)
endif
ifdef PTXCONF_BAREBOX
	@$(call install_copy, ptxdist-configs, 0, 0, 0644, \
		$(BAREBOX_CONFIG), /usr/share/ptxdist/bareboxconfig)
endif

	@$(call install_finish,ptxdist-configs)

	@$(call touch)

# vim: syntax=make