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