blob: e86824315ae1add3152f289df0538c211d92a292 (
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
|
SUMMARY = "Vehicle Signal Specification with AGL overlays"
LICENSE = "MPL-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=9741c346eef56131163e13b9db1241b3"
DEPENDS = "vss-tools-native"
inherit allarch update-alternatives
require recipes-support/vss/vss.inc
SRC_URI += "file://agl_vss_overlay.vspec \
file://agl_vss_overlay.vspec.control-panel \
file://agl_vss_overlay.vspec.gw-control-panel \
file://agl_vss_overlay.vspec.gw-hardware \
"
# Since we're not relying on the simple upstream repo Makefile, use
# best practices and output into a separate directory.
B = "${WORKDIR}/build"
do_configure[noexec] = "1"
VSPEC_JSON_OPTS = " \
-I ${S}/spec \
-u ${S}/spec/units.yaml \
--vspec ${S}/spec/VehicleSignalSpecification.vspec \
-e dbc2vss \
-e vss2dbc \
--no-uuid \
--pretty \
"
do_compile() {
vspec export json ${VSPEC_JSON_OPTS} -l ${WORKDIR}/agl_vss_overlay.vspec --output vss_${PV}-agl.json
vspec export json ${VSPEC_JSON_OPTS} -l ${WORKDIR}/agl_vss_overlay.vspec.control-panel --output vss_${PV}-agl-control-panel.json
vspec export json ${VSPEC_JSON_OPTS} -l ${WORKDIR}/agl_vss_overlay.vspec.gw-control-panel --output vss_${PV}-agl-gw-control-panel.json
vspec export json ${VSPEC_JSON_OPTS} -l ${WORKDIR}/agl_vss_overlay.vspec.gw-hardware --output vss_${PV}-agl-gw-hardware.json
}
do_install() {
install -d ${D}${datadir}/vss
install -m 0644 vss_${PV}-agl.json ${D}${datadir}/vss/
install -m 0644 vss_${PV}-agl-control-panel.json ${D}${datadir}/vss/
install -m 0644 vss_${PV}-agl-gw-control-panel.json ${D}${datadir}/vss/
install -m 0644 vss_${PV}-agl-gw-hardware.json ${D}${datadir}/vss/
}
PACKAGE_BEFORE_PN += "${PN}-control-panel ${PN}-gw-control-panel ${PN}-gw-hardware"
ALTERNATIVE_LINK_NAME[vss.json] = "${datadir}/vss/vss.json"
ALTERNATIVE:${PN} = "vss.json"
ALTERNATIVE_TARGET_${PN} = "${datadir}/vss/vss_${PV}-agl.json"
ALTERNATIVE_PRIORITY_${PN} = "20"
FILES:${PN} += "${datadir}/vss/vss_${PV}-agl.json"
ALTERNATIVE:${PN}-control-panel = "vss.json"
ALTERNATIVE_TARGET_${PN}-control-panel = "${datadir}/vss/vss_${PV}-agl-control-panel.json"
ALTERNATIVE_PRIORITY_${PN}-control-panel = "30"
FILES:${PN}-control-panel += "${datadir}/vss/vss_${PV}-agl-control-panel.json"
ALTERNATIVE:${PN}-gw-hardware = "vss.json"
ALTERNATIVE_TARGET_${PN}-gw-hardware = "${datadir}/vss/vss_${PV}-agl-gw-hardware.json"
ALTERNATIVE_PRIORITY_${PN}-gw-hardware = "31"
FILES:${PN}-gw-hardware += "${datadir}/vss/vss_${PV}-agl-gw-hardware.json"
# Higher priority than gw-hardware, as we want it to be the default
# if both are installed (as is the case with the full gateway demo
# setup).
ALTERNATIVE:${PN}-gw-control-panel = "vss.json"
ALTERNATIVE_TARGET_${PN}-gw-control-panel = "${datadir}/vss/vss_${PV}-agl-gw-control-panel.json"
ALTERNATIVE_PRIORITY_${PN}-gw-control-panel = "32"
FILES:${PN}-gw-control-panel += "${datadir}/vss/vss_${PV}-agl-gw-control-panel.json"
|