android-tools_10.bb 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. LICENSE = "GPL-2.0"
  2. LIC_FILES_CHKSUM = "file://NOTICE;md5=9e0b836a755c0780e75388254f9bb2e4"
  3. DEPENDS = "libbsd libpcre zlib libcap"
  4. DEPENDS_append_class-target = " openssl"
  5. SRC_URI = " \
  6. git://git@gitee.com/thead-yocto/d1_adbd.git;branch=master;protocol=http \
  7. file://adbd-new.mk;subdir=${BPN} \
  8. file://android-tools-adbd.service"
  9. SRCREV="${AUTOREV}"
  10. S = "${WORKDIR}/git"
  11. B = "${WORKDIR}/${BPN}"
  12. # http://errors.yoctoproject.org/Errors/Details/133881/
  13. inherit systemd
  14. #SYSTEMD_PACKAGES = "${PN}-adbd"
  15. #SYSTEMD_SERVICE_${PN}-adbd = "android-tools-adbd.service"
  16. SYSTEMD_SERVICE_${PN} = "android-tools-adbd.service"
  17. # Find libbsd headers during native builds
  18. CC_append_class-native = " -I${STAGING_INCDIR}"
  19. CC_append_class-nativesdk = " -I${STAGING_INCDIR}"
  20. TOOLS = "adbd-new"
  21. do_compile() {
  22. # Setting both variables below causing our makefiles to not work with
  23. # implicit make rules
  24. export SRCDIR=${S}
  25. case "${HOST_ARCH}" in
  26. arm)
  27. export android_arch=linux-arm
  28. ;;
  29. aarch64)
  30. export android_arch=linux-arm64
  31. ;;
  32. riscv64)
  33. export android_arch=linux-riscv64
  34. ;;
  35. mips|mipsel)
  36. export android_arch=linux-mips
  37. ;;
  38. mips64|mips64el)
  39. export android_arch=linux-mips64
  40. ;;
  41. powerpc|powerpc64)
  42. export android_arch=linux-ppc
  43. ;;
  44. i586|i686|x86_64)
  45. export android_arch=linux-x86
  46. ;;
  47. esac
  48. for tool in ${TOOLS}; do
  49. mkdir -p ${B}/${tool}
  50. cp -af ${S}/*.a ${B}/${tool}
  51. cp -af ${S}/adb_shell ${B}/${tool}
  52. cp -af ${S}/adb_profile ${B}/${tool}
  53. #oe_runmake
  54. oe_runmake -f ${B}/${tool}.mk -C ${B}/${tool}
  55. done
  56. }
  57. do_install() {
  58. bbplain "copy the adbd: ${B}, ${D}, ${base_bindir}"
  59. install -d ${D}${base_bindir}
  60. install -m 0755 ${B}/adbd-new/adbd ${D}${base_bindir}
  61. install -m 0755 ${B}/adbd-new/adb_shell ${D}${base_bindir}
  62. install -d ${D}${sysconfdir}
  63. install -m 0755 ${B}/adbd-new/adb_profile ${D}${sysconfdir}
  64. # Outside the if statement to avoid errors during do_package
  65. bbplain "try to copy adbd service"
  66. bbplain "bpn is ${BPN}, bn is ${PN}"
  67. install -D -p -m 0644 ${WORKDIR}/android-tools-adbd.service \
  68. ${D}${systemd_unitdir}/system/android-tools-adbd.service
  69. }
  70. #PACKAGES =+ "${PN}-fstools ${PN}-adbd"
  71. PACKAGES =+ "${PN}-fstools"
  72. RDEPENDS_${BPN} = "${BPN}-conf"
  73. #RDEPENDS_${PN}-adbd = "${PN}-conf"
  74. RDEPENDS_${PN}-fstools = "bash"
  75. #FILES_${PN}-adbd = "\
  76. # ${bindir}/adbd \
  77. # ${systemd_unitdir}/system/android-tools-adbd.service \
  78. #"
  79. BBCLASSEXTEND = "cross"