aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-connectivity/vss/vss_4.2.bb
blob: 0535166290be454ba7a1140384ba89c1b5febe82 (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
SUMMARY = "Vehicle Signal Specification"
LICENSE = "MPL-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=9741c346eef56131163e13b9db1241b3"

DEPENDS = "vss-tools-native"

inherit allarch update-alternatives

require vss.inc

UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)"

S = "${WORKDIR}/git"

do_configure[noexec] = "1"

EXTRA_OEMAKE = "TOOLSDIR=${STAGING_BINDIR_NATIVE}"

do_compile() {
    oe_runmake json
}

do_install() {
    # Cannot use the "install" target in the project Makefile, as it is
    # intended for setting the repo up for builds.
    # For now, just the generated JSON is installed. It is possible that
    # installing the vspec files somewhere as a development package may
    # be useful, but for now things will be kept simple.
    install -d ${D}${datadir}/vss
    install -m 0644 ${S}/vss_rel_${PV}.json ${D}${datadir}/vss/
}

# NOTE:
# A virtual RPROVIDES is not used for now, as packages such as KUKSA.val
# provide their own copies of the VSS JSON, so we can install this one
# and any alternatives in parallel and point e.g. KUKSA.val at the desired
# file with a configuration change. This may be worth revisiting down the
# road.

ALTERNATIVE_LINK_NAME[vss.json] = "${datadir}/vss/vss.json"

ALTERNATIVE:${PN} = "vss.json"
ALTERNATIVE_TARGET_${PN} = "${datadir}/vss/vss_rel_${PV}.json"