Brad Bishop | 65b40a8 | 2016-06-09 22:22:46 -0400 | [diff] [blame] | 1 | # In general this class should only be used by board layers |
| 2 | # that keep their machine-readable-workbook in the skeleton repository. |
| 3 | |
| 4 | inherit allarch |
| 5 | inherit setuptools |
Brad Bishop | 382cb1b | 2016-06-15 22:01:33 -0400 | [diff] [blame] | 6 | inherit pythonnative |
Brad Bishop | 0e82c3c | 2016-07-06 13:12:48 -0400 | [diff] [blame] | 7 | inherit skeleton-rev |
| 8 | inherit obmc-phosphor-license |
| 9 | |
| 10 | HOMEPAGE = "http://github.com/openbmc/skeleton" |
Brad Bishop | 65b40a8 | 2016-06-09 22:22:46 -0400 | [diff] [blame] | 11 | |
Matt Spinler | 3931483 | 2016-09-13 16:20:01 -0500 | [diff] [blame] | 12 | PROVIDES += "virtual/obmc-inventory-data" |
| 13 | RPROVIDES_${PN} += "virtual-obmc-inventory-data" |
| 14 | |
Brad Bishop | 382cb1b | 2016-06-15 22:01:33 -0400 | [diff] [blame] | 15 | DEPENDS += "python" |
Brad Bishop | 0e82c3c | 2016-07-06 13:12:48 -0400 | [diff] [blame] | 16 | SRC_URI += "${SKELETON_URI};subpath=configs" |
Brad Bishop | 65b40a8 | 2016-06-09 22:22:46 -0400 | [diff] [blame] | 17 | S = "${WORKDIR}/configs" |
| 18 | |
| 19 | python() { |
| 20 | machine = d.getVar('MACHINE', True).capitalize() + '.py' |
| 21 | d.setVar('_config_in_skeleton', machine) |
| 22 | } |
| 23 | |
| 24 | do_make_setup() { |
| 25 | cp ${S}/${_config_in_skeleton} \ |
| 26 | ${S}/obmc_system_config.py |
| 27 | cat <<EOF > ${S}/setup.py |
| 28 | from distutils.core import setup |
| 29 | |
| 30 | setup(name='${BPN}', |
| 31 | version='${PR}', |
| 32 | py_modules=['obmc_system_config'], |
| 33 | ) |
| 34 | EOF |
| 35 | } |
| 36 | |
| 37 | addtask make_setup after do_patch before do_configure |