rjw | 1f88458 | 2022-01-06 17:20:42 +0800 | [diff] [blame^] | 1 | DESCRIPTION = "Android Platform Tools" |
| 2 | LICENSE = "Apache-2.0 & GPL-2.0 & BSD-2-Clause & BSD-3-Clause" |
| 3 | |
| 4 | LIC_FILES_CHKSUM = "file://${S}/platform-tools-linux/platform-tools/NOTICE.txt;md5=d4b39e3d79095f051d1f61901cec410e" |
| 5 | |
| 6 | BBCLASSEXTEND = "native" |
| 7 | |
| 8 | SRC_URI = " \ |
| 9 | https://dl.google.com/android/repository/platform-tools_${PV}-windows.zip;name=platform-tools-windows \ |
| 10 | https://dl.google.com/android/repository/platform-tools_${PV}-darwin.zip;name=platform-tools-darwin \ |
| 11 | https://dl.google.com/android/repository/platform-tools_${PV}-linux.zip;name=platform-tools-linux \ |
| 12 | " |
| 13 | |
| 14 | SRC_URI[platform-tools-windows.md5sum] = "4a2d2e09d3ffdce8252c9136754a1ce9" |
| 15 | SRC_URI[platform-tools-windows.sha256sum] = "4850c695724ad0328d9100cc3b4475dcd1af1bec904675362259595a3e03ae2e" |
| 16 | SRC_URI[platform-tools-darwin.md5sum] = "00fa1426da56ed9477f65219213ae1a5" |
| 17 | SRC_URI[platform-tools-darwin.sha256sum] = "a6d0504e560713af2a3ae71449bcadf011b50ba78f7bf303a9d6d69bf855c73f" |
| 18 | SRC_URI[platform-tools-linux.md5sum] = "ef952bb31497f7535e061ad0e712bed8" |
| 19 | SRC_URI[platform-tools-linux.sha256sum] = "63b15a38c2b64e6ec8b54febe9f69fce5fe6c898c554c73b826b49daf7b52519" |
| 20 | |
| 21 | SSTATE_DUPWHITELIST += "${DEPLOY_DIR_IMAGE}" |
| 22 | |
| 23 | do_unpack () { |
| 24 | unzip -q ${DL_DIR}/platform-tools_${PV}-linux.zip -d ${S}/platform-tools-linux |
| 25 | unzip -q ${DL_DIR}/platform-tools_${PV}-darwin.zip -d ${S}/platform-tools-darwin |
| 26 | unzip -q ${DL_DIR}/platform-tools_${PV}-windows.zip -d ${S}/platform-tools-windows |
| 27 | } |
| 28 | |
| 29 | inherit deploy |
| 30 | |
| 31 | do_deploy () { |
| 32 | install -d ${DEPLOYDIR} |
| 33 | install -m 0755 ${S}/platform-tools-linux/platform-tools/fastboot ${DEPLOYDIR}/fastboot-linux-x86_64 |
| 34 | install -m 0755 ${S}/platform-tools-darwin/platform-tools/fastboot ${DEPLOYDIR}/fastboot-darwin |
| 35 | install -m 0755 ${S}/platform-tools-windows/platform-tools/fastboot.exe ${DEPLOYDIR}/fastboot.exe |
| 36 | install -m 0755 ${S}/platform-tools-linux/platform-tools/adb ${DEPLOYDIR}/adb-linux-x86_64 |
| 37 | install -m 0755 ${S}/platform-tools-darwin/platform-tools/adb ${DEPLOYDIR}/adb-darwin |
| 38 | install -m 0755 ${S}/platform-tools-windows/platform-tools/adb.exe ${DEPLOYDIR}/adb.exe |
| 39 | } |
| 40 | |
| 41 | addtask deploy before do_build after do_compile |
| 42 | |