blob: 4b6d890521dfa089e445ad53583ed39bf7771b0a [file] [log] [blame]
Andrew Geissler84ad7c52020-06-27 00:00:16 -05001SUMMARY = "Device tree lopper"
2DESCRIPTION = "Tool to subset a system device tree"
3SECTION = "bootloader"
4LICENSE = "BSD-3-Clause"
5DEPENDS += "python3-dtc"
6
7RDEPENDS_${PN} += "python3-core python3-dtc"
8
9SRC_URI = "git://github.com/devicetree-org/lopper.git"
10
11LIC_FILES_CHKSUM = "file://LICENSE.md;md5=8e5f5f691f01c9fdfa7a7f2d535be619"
12
13SRCREV = "9398385d3ac06419b25d34de21501bc7ac0e8ac3"
14
15S = "${WORKDIR}/git"
16
17do_configure() {
18 :
19}
20
21do_compile() {
22 sed -i 's,#!/usr/bin/python3,#!/usr/bin/env python3,' lopper.py
23 sed -i 's,#!/usr/bin/python3,#!/usr/bin/env python3,' lopper_sanity.py
24}
25
26do_install() {
27 datadirrelpath=${@os.path.relpath(d.getVar('datadir'), d.getVar('bindir'))}
28
29 mkdir -p ${D}/${bindir}
30 mkdir -p ${D}/${datadir}/lopper
31 cp -r ${S}/* ${D}/${datadir}/lopper/.
32 ln -s ${datadirrelpath}/lopper/lopper.py ${D}/${bindir}/.
33}
34
35BBCLASSEXTEND = "native nativesdk"