summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/lopper/lopper.bb
blob: 274d5b9a42c7e3a02dfd27ba748a058e5caed783 (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
SUMMARY = "Device Tree Lopper"
DESCRIPTION = "Tool for manipulation of system device tree files"
LICENSE = "BSD-3-Clause"
SECTION = "bootloader"

SRC_URI = "git://github.com/devicetree-org/lopper.git"
SRCREV = "0c23e51d585608ab04009ccf3499f168e2f4d478"
S = "${WORKDIR}/git"

LIC_FILES_CHKSUM = "file://LICENSE.md;md5=8e5f5f691f01c9fdfa7a7f2d535be619"

RDEPENDS_${PN} = " \
    python3-core \
    python3-dtc \
    python3-humanfriendly \
    "

do_install() {
    install -d "${D}/${bindir}"
    install -d "${D}/${datadir}/${BPN}"

    install -m 0644 "${S}/README" "${D}/${datadir}/${BPN}"
    install -m 0644 "${S}/README-architecture.txt" "${D}/${datadir}/${BPN}"
    install -m 0644 "${S}/README.pydoc" "${D}/${datadir}/${BPN}"
    install -m 0644 "${S}/LICENSE.md" "${D}/${datadir}/${BPN}"

    install -d "${D}/${datadir}/${BPN}/assists"
    install -m 0644 "${S}/assists/"* "${D}/${datadir}/${BPN}/assists/"

    install -d "${D}/${datadir}/${BPN}/lops"
    install -m 0644 "${S}/lops/"* "${D}/${datadir}/${BPN}/lops/"

    install -d "${D}/${datadir}/${BPN}/device-trees"
    install -m 0644 "${S}/device-trees/"* "${D}/${datadir}/${BPN}/device-trees/"

    install -m 0755 "${S}/"lopper*.py "${D}/${datadir}/${BPN}/"

    datadir_relpath=${@os.path.relpath(d.getVar('datadir'), d.getVar('bindir'))}
    ln -s "${datadir_relpath}/${BPN}/lopper.py" "${D}/${bindir}/"
}

do_configure[noexec] = "1"
do_compile[noexec] = "1"

BBCLASSEXTEND = "native nativesdk"