Andrew Geissler | 84ad7c5 | 2020-06-27 00:00:16 -0500 | [diff] [blame] | 1 | SUMMARY = "Device tree lopper" |
| 2 | DESCRIPTION = "Tool to subset a system device tree" |
| 3 | SECTION = "bootloader" |
| 4 | LICENSE = "BSD-3-Clause" |
| 5 | DEPENDS += "python3-dtc" |
| 6 | |
| 7 | RDEPENDS_${PN} += "python3-core python3-dtc" |
| 8 | |
| 9 | SRC_URI = "git://github.com/devicetree-org/lopper.git" |
| 10 | |
| 11 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=8e5f5f691f01c9fdfa7a7f2d535be619" |
| 12 | |
Andrew Geissler | a9ff2b3 | 2020-10-16 10:11:54 -0500 | [diff] [blame] | 13 | SRCREV = "f4389167a200c5d41ee276ff9ad67d01ef6f0aec" |
Andrew Geissler | 84ad7c5 | 2020-06-27 00:00:16 -0500 | [diff] [blame] | 14 | |
| 15 | S = "${WORKDIR}/git" |
| 16 | |
| 17 | do_configure() { |
| 18 | : |
| 19 | } |
| 20 | |
| 21 | do_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 | |
| 26 | do_install() { |
Andrew Geissler | a9ff2b3 | 2020-10-16 10:11:54 -0500 | [diff] [blame] | 27 | datadirrelpath=${@os.path.relpath(d.getVar('datadir'), d.getVar('bindir'))} |
Andrew Geissler | 84ad7c5 | 2020-06-27 00:00:16 -0500 | [diff] [blame] | 28 | |
Andrew Geissler | a9ff2b3 | 2020-10-16 10:11:54 -0500 | [diff] [blame] | 29 | 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 Geissler | 84ad7c5 | 2020-06-27 00:00:16 -0500 | [diff] [blame] | 39 | ln -s ${datadirrelpath}/lopper/lopper.py ${D}/${bindir}/. |
| 40 | } |
| 41 | |
| 42 | BBCLASSEXTEND = "native nativesdk" |