rjw | 1f88458 | 2022-01-06 17:20:42 +0800 | [diff] [blame^] | 1 | DESCRIPTION = "Different utilities from Android - based on the corresponding ubuntu \ |
| 2 | package" |
| 3 | SECTION = "console/utils" |
| 4 | LICENSE = "Apache-2.0 & GPL-2.0 & BSD-2-Clause & BSD-3-Clause" |
| 5 | LIC_FILES_CHKSUM = " \ |
| 6 | file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10 \ |
| 7 | file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6 \ |
| 8 | file://${COMMON_LICENSE_DIR}/BSD-2-Clause;md5=8bef8e6712b1be5aa76af1ebde9d6378 \ |
| 9 | file://${COMMON_LICENSE_DIR}/BSD-3-Clause;md5=550794465ba0ec5312d6919e203a55f9 \ |
| 10 | file://${WORKDIR}/debian/copyright;md5=141efd1050596168ca05ced04e4f498b \ |
| 11 | " |
| 12 | |
| 13 | DEPENDS = "zlib openssl" |
| 14 | |
| 15 | # Use same version than ubuntu does here |
| 16 | BASE_PV = "4.2.2+git20130218" |
| 17 | PV = "${BASE_PV}-3ubuntu13" |
| 18 | |
| 19 | ALLOW_EMPTY_${PN} = "1" |
| 20 | |
| 21 | SRC_URI = " \ |
| 22 | https://launchpad.net/ubuntu/+archive/primary/+files/android-tools_${BASE_PV}.orig.tar.xz;name=source \ |
| 23 | https://launchpad.net/ubuntu/+archive/primary/+files/android-tools_${PV}.debian.tar.gz;name=debian \ |
| 24 | file://reboot-syscall.patch \ |
| 25 | file://disable-selinux-support.patch \ |
| 26 | file://remove-libselinux.patch;patchdir=.. \ |
| 27 | " |
| 28 | S = "${WORKDIR}/android-tools" |
| 29 | |
| 30 | SRC_URI[source.md5sum] = "0e653b129ab0c95bdffa91410c8b55be" |
| 31 | SRC_URI[source.sha256sum] = "9bfba987e1351b12aa983787b9ae4424ab752e9e646d8e93771538dc1e5d932f" |
| 32 | SRC_URI[debian.md5sum] = "5e409d01caf3c33fc60a2100464754ff" |
| 33 | SRC_URI[debian.sha256sum] = "320757edc8af015f40335c41dc96bf37e2d50c9f3a40a31e64264ff6e2dba5e3" |
| 34 | |
| 35 | do_compile() { |
| 36 | # Setting both variables below causing our makefiles to not work with implicit make |
| 37 | # rules |
| 38 | unset CFLAGS |
| 39 | unset CPPFLAGS |
| 40 | |
| 41 | sed -i "s%^CPPFLAGS+= -I/usr/include%# we don't want to include headers from host CPPFLAGS+= -I/usr/include%g" ${WORKDIR}/debian/makefiles/ext4_utils.mk |
| 42 | |
| 43 | oe_runmake -f ${WORKDIR}/debian/makefiles/fastboot.mk -C ${S}/core/fastboot clean |
| 44 | oe_runmake -f ${WORKDIR}/debian/makefiles/fastboot.mk -C ${S}/core/fastboot |
| 45 | } |
| 46 | |
| 47 | do_install() { |
| 48 | install -d ${D}${bindir} |
| 49 | install -m 0755 ${S}/core/fastboot/fastboot ${D}${bindir} |
| 50 | } |
| 51 | |
| 52 | inherit deploy |
| 53 | |
| 54 | do_deploy () { |
| 55 | install -d ${DEPLOYDIR} |
| 56 | install -m 0755 ${S}/core/fastboot/fastboot ${DEPLOYDIR}/fastboot-linux-arm |
| 57 | } |
| 58 | |
| 59 | addtask deploy before do_build after do_compile |
| 60 | |