summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/lsb/lsbtest_1.0.bb
blob: 3dcfc0de2263e638f136dd4bea1300ae66e863a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
DESCRIPTION = "automate test for lsb"
SECTION = "console/utils"
LICENSE = "GPLv2"
PR = "r2"

LIC_FILES_CHKSUM = "file://LSB_Test.sh;beginline=3;endline=16;md5=7063bb54b04719df0716b513447f4fc0"

SRC_URI = "file://LSB_Test.sh \
		   file://packages_list \
		   file://session \
		   "
RDEPENDS_${PN} = "rpm"

S = "${WORKDIR}"

do_install() {
	install -d ${D}${bindir}
	install -m 0755 ${S}/LSB_Test.sh ${D}${bindir}
	install -d  ${D}/opt/lsb-test
	install -m 0644 ${S}/packages_list ${D}/opt/lsb-test/packages_list
	install -m 0644 ${S}/session ${D}/opt/lsb-test/session
	if [ "${TARGET_ARCH}" == "i586" ];then
		sed -i -e 's/lsbarch/ia32/g' -e 's/targetarch/i486/g' ${D}/opt/lsb-test/packages_list
		sed -i -e 's/targetarch/x86/g' ${D}/opt/lsb-test/session
	fi
	if [ "${TARGET_ARCH}" == "x86_64" ];then
		sed -i -e 's/lsbarch/amd64/g' -e 's/targetarch/x86_64/g' ${D}/opt/lsb-test/packages_list
		sed -i -e 's/targetarch/x86-64/g' ${D}/opt/lsb-test/session
	fi
	if [ "${TARGET_ARCH}" == "powerpc" ];then
		sed -i -e 's/lsbarch/ppc32/g' -e 's/targetarch/ppc/g' ${D}/opt/lsb-test/packages_list
		sed -i -e 's/targetarch/PPC32/g' ${D}/opt/lsb-test/session
	fi
}

FILES_${PN} += "/opt/lsb-test/* \
               "