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 | |
| 13 | SRCREV = "9398385d3ac06419b25d34de21501bc7ac0e8ac3" |
| 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() { |
| 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 | |
| 35 | BBCLASSEXTEND = "native nativesdk" |