lsbtest_1.0.bb 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. SUMMARY = "Automates Linux Standard Base (LSB) tests"
  2. HOMEPAGE = "https://wiki.debian.org/LSBInitScripts"
  3. SECTION = "console/utils"
  4. LICENSE = "GPLv2"
  5. PR = "r3"
  6. LIC_FILES_CHKSUM = "file://LSB_Test.sh;beginline=3;endline=16;md5=7063bb54b04719df0716b513447f4fc0"
  7. SRC_URI = "file://LSB_Test.sh \
  8. file://packages_list \
  9. file://session \
  10. "
  11. RDEPENDS_${PN} = "lsb rpm"
  12. S = "${WORKDIR}"
  13. do_install() {
  14. install -d ${D}/opt/lsb-test
  15. install -m 0755 ${S}/LSB_Test.sh ${D}/opt/lsb-test/LSB_Test.sh
  16. install -m 0644 ${S}/packages_list ${D}/opt/lsb-test/packages_list
  17. install -m 0644 ${S}/session ${D}/opt/lsb-test/session
  18. if [ "${TARGET_ARCH}" = "i586" ] || [ "${TARGET_ARCH}" = "i686" ];then
  19. sed -i -e 's/lsbarch/ia32/g' -e 's/targetarch/i486/g' ${D}/opt/lsb-test/packages_list
  20. sed -i -e 's/targetarch/x86/g' ${D}/opt/lsb-test/session
  21. fi
  22. if [ "${TARGET_ARCH}" = "x86_64" ];then
  23. sed -i -e 's/lsbarch/amd64/g' -e 's/targetarch/x86_64/g' ${D}/opt/lsb-test/packages_list
  24. sed -i -e 's/targetarch/x86-64/g' ${D}/opt/lsb-test/session
  25. fi
  26. if [ "${TARGET_ARCH}" = "powerpc" ];then
  27. sed -i -e 's/lsbarch/ppc32/g' -e 's/targetarch/ppc/g' ${D}/opt/lsb-test/packages_list
  28. sed -i -e 's/targetarch/PPC32/g' ${D}/opt/lsb-test/session
  29. fi
  30. # For a ppc64 target. the default userspace is 32b.
  31. # Therefore, only change the lsbarch and targetarch
  32. # in the package_list when MLIB=lib64 is being used.
  33. # Otherwise, by default, the ppc32 LSB packages
  34. # will be downloaded by LSB_Test.sh
  35. if [ "${TARGET_ARCH}" = "powerpc64" ];then
  36. if [ "${PN}" != "${BPN}" ];then
  37. sed -i -e 's/lsbarch/ppc64/g' -e 's/targetarch/ppc64/g' ${D}/opt/lsb-test/packages_list
  38. sed -i -e 's/targetarch/PPC64/g' ${D}/opt/lsb-test/session
  39. fi
  40. fi
  41. }
  42. FILES_${PN} += "/opt/lsb-test/* \
  43. "