blob: ea3a9a34d64ab8566bec3fbae7a25b19f07d6897 [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
Andrew Geisslera9ff2b32020-10-16 10:11:54 -050013SRCREV = "f4389167a200c5d41ee276ff9ad67d01ef6f0aec"
Andrew Geissler84ad7c52020-06-27 00:00:16 -050014
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() {
Andrew Geisslera9ff2b32020-10-16 10:11:54 -050027 datadirrelpath=${@os.path.relpath(d.getVar('datadir'), d.getVar('bindir'))}
Andrew Geissler84ad7c52020-06-27 00:00:16 -050028
Andrew Geisslera9ff2b32020-10-16 10:11:54 -050029 mkdir -p ${D}/${bindir}
30 mkdir -p ${D}/${datadir}/lopper
31
32 cp -r ${S}/README* ${D}/${datadir}/lopper/.
33 cp -r ${S}/assists* ${D}/${datadir}/lopper/.
34 cp -r ${S}/lop* ${D}/${datadir}/lopper/.
35 cp -r ${S}/LICENSE* ${D}/${datadir}/lopper/.
36 cp -r ${S}/device-tree* ${D}/${datadir}/lopper/.
37 cp -r ${S}/.gitignore ${D}/${datadir}/lopper/.
38
Andrew Geissler84ad7c52020-06-27 00:00:16 -050039 ln -s ${datadirrelpath}/lopper/lopper.py ${D}/${bindir}/.
40}
41
42BBCLASSEXTEND = "native nativesdk"