enigma2-plugin-skincomponents-weathercomponent: new recipe
[opendreambox.git] / meta-opendreambox / classes / opendreambox-precompiled-binary.bbclass
1 LICENSE = "CLOSED"
2 PRECOMPILED_NAME ?= "${PN}"
3 PRECOMPILED_ARCH ?= "${PACKAGE_ARCH}"
4 PRECOMPILED_VERSION ?= "${PV}"
5 PRECOMPILED_URI ?= "http://dreamboxupdate.com/download/${DISTRO}/${DISTRO_VERSION}/${@precompiledPath(d)};name=${PRECOMPILED_ARCH}"
6
7 SRC_URI += "${PRECOMPILED_URI}"
8
9 S = "${WORKDIR}/${PRECOMPILED_NAME}_${PRECOMPILED_VERSION}_${PRECOMPILED_ARCH}"
10
11 def precompiledPath(d):
12     pn = d.getVar('PRECOMPILED_NAME', True)
13     pv = d.getVar('PRECOMPILED_VERSION', True)
14     package_arch = d.getVar('PRECOMPILED_ARCH', True)
15     md5sum = d.getVarFlag('SRC_URI', '%s.md5sum' % package_arch, True)
16     return '%s/%s/%s/%s/%s_%s_%s.tar.xz' % (pn, pv, package_arch, md5sum, pn, pv, package_arch)
17
18 python () {
19     package_arch = d.getVar('PRECOMPILED_ARCH', True)
20     varflags = (d.getVarFlags('SRC_URI') or {}).keys()
21     if '%s.md5sum' % package_arch not in varflags:
22         pn = d.getVar('PRECOMPILED_NAME', True)
23         pv = d.getVar('PRECOMPILED_VERSION', True)
24         raise bb.parse.SkipPackage("No checksum for %s found in recipe for precompiled binary %s version %s" % (package_arch, pn, pv))
25 }
26
27 do_install() {
28     find . -depth -not -path "./patches*" -not -path "./.pc*" -print0 | cpio --null -pdlu ${D}
29     chown -hR root:root ${D}
30 }
31
32 INHIBIT_PACKAGE_STRIP = "1"
33 INHIBIT_SYSROOT_STRIP = "1"
34
35 INSANE_SKIP_${PN}_append = " already-stripped"