blob: 95c2d6423e1d1675dee57aa42f981fbd124fb00b [file] [log] [blame]
Brad Bishop65b40a82016-06-09 22:22:46 -04001# In general this class should only be used by board layers
2# that keep their machine-readable-workbook in the skeleton repository.
3
4inherit allarch
5inherit setuptools
Brad Bishop382cb1b2016-06-15 22:01:33 -04006inherit pythonnative
Brad Bishop0e82c3c2016-07-06 13:12:48 -04007inherit skeleton-rev
8inherit obmc-phosphor-license
9
10HOMEPAGE = "http://github.com/openbmc/skeleton"
Brad Bishop65b40a82016-06-09 22:22:46 -040011
Matt Spinler39314832016-09-13 16:20:01 -050012PROVIDES += "virtual/obmc-inventory-data"
13RPROVIDES_${PN} += "virtual-obmc-inventory-data"
14
Brad Bishop382cb1b2016-06-15 22:01:33 -040015DEPENDS += "python"
Brad Bishop0e82c3c2016-07-06 13:12:48 -040016SRC_URI += "${SKELETON_URI};subpath=configs"
Brad Bishop65b40a82016-06-09 22:22:46 -040017S = "${WORKDIR}/configs"
18
19python() {
20 machine = d.getVar('MACHINE', True).capitalize() + '.py'
21 d.setVar('_config_in_skeleton', machine)
22}
23
24do_make_setup() {
25 cp ${S}/${_config_in_skeleton} \
26 ${S}/obmc_system_config.py
27 cat <<EOF > ${S}/setup.py
28from distutils.core import setup
29
30setup(name='${BPN}',
31 version='${PR}',
32 py_modules=['obmc_system_config'],
33 )
34EOF
35}
36
37addtask make_setup after do_patch before do_configure