blob: 907f226e1d0977ce8c2f1004653fe519f26728c6 [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
Brad Bishop382cb1b2016-06-15 22:01:33 -040012DEPENDS += "python"
Brad Bishop0e82c3c2016-07-06 13:12:48 -040013SRC_URI += "${SKELETON_URI};subpath=configs"
Brad Bishop65b40a82016-06-09 22:22:46 -040014S = "${WORKDIR}/configs"
15
16python() {
17 machine = d.getVar('MACHINE', True).capitalize() + '.py'
18 d.setVar('_config_in_skeleton', machine)
19}
20
21do_make_setup() {
22 cp ${S}/${_config_in_skeleton} \
23 ${S}/obmc_system_config.py
24 cat <<EOF > ${S}/setup.py
25from distutils.core import setup
26
27setup(name='${BPN}',
28 version='${PR}',
29 py_modules=['obmc_system_config'],
30 )
31EOF
32}
33
34addtask make_setup after do_patch before do_configure