Richard Marian Thomaiyar | 14fddef | 2018-07-13 23:55:56 +0530 | [diff] [blame] | 1 | inherit allarch |
| 2 | |
| 3 | SUMMARY = "Operating release identification" |
| 4 | DESCRIPTION = "The /etc/openembedded-release file contains operating system identification data." |
| 5 | LICENSE = "MIT" |
| 6 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" |
| 7 | INHIBIT_DEFAULT_DEPS = "1" |
| 8 | |
| 9 | do_fetch[noexec] = "1" |
| 10 | do_unpack[noexec] = "1" |
| 11 | do_patch[noexec] = "1" |
| 12 | do_configure[noexec] = "1" |
| 13 | |
| 14 | VERSION = "0" |
| 15 | RELEASE_NAME = "${DISTRO_NAME} ${DISTRO} ${VERSION}" |
| 16 | |
| 17 | def sanitise_version(ver): |
| 18 | ret = ver.replace('+', '-').replace(' ','_') |
| 19 | return ret.lower() |
| 20 | |
| 21 | python do_compile () { |
| 22 | import shutil |
| 23 | release_name = d.getVar('RELEASE_NAME') |
| 24 | with open(d.expand('${B}/openemebedded-release'), 'w') as f: |
| 25 | f.write('%s\n' % release_name) |
| 26 | } |
| 27 | do_compile[vardeps] += "${RELEASE_NAME}" |
| 28 | |
| 29 | do_install () { |
| 30 | install -d ${D}${sysconfdir} |
| 31 | install -m 0644 openemebedded-release ${D}${sysconfdir}/ |
| 32 | } |