mjpegtools: inherit pkgconfig
[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)
16     if md5sum is None:
17         raise bb.parse.SkipPackage("No checksum found for precompiled binary package %s" % pn)
18     return '%s/%s/%s/%s/%s_%s_%s.tar.xz' % (pn, pv, package_arch, md5sum, pn, pv, package_arch)
19
20 do_install() {
21     find . -depth -not -path "./patches*" -not -path "./.pc*" -print0 | cpio --null -pdlu ${D}
22     chown -hR root:root ${D}
23 }
24
25 INHIBIT_PACKAGE_STRIP = "1"