1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-01 00:59:48 +00:00

lsb: Make use of appropriate bitbake variables.

Using of bitbake environment variables in-place of hardcoded strings makes this
recipe portable to all environments.

(From OE-Core rev: 61135e4134b7e0b42b57a87a9a30c32002cb1067)

Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Amarnath Valluri
2017-03-03 14:36:32 +02:00
committed by Richard Purdie
parent 63b62e5d80
commit 87c2bef1b9
+19 -21
View File
@@ -34,14 +34,13 @@ S = "${WORKDIR}/lsb-release-1.4"
CLEANBROKEN = "1" CLEANBROKEN = "1"
do_install(){ do_install(){
oe_runmake install prefix=${D} mandir=${D}/${datadir}/man/ DESTDIR=${D} oe_runmake install prefix=${D}/${base_prefix} mandir=${D}/${datadir}/man/ DESTDIR=${D}
# this 2 dirs are needed by package lsb-dist-checker # this 2 dirs are needed by package lsb-dist-checker
mkdir -p ${D}${sysconfdir}/opt mkdir -p ${D}${sysconfdir}/opt
mkdir -p ${D}${localstatedir}/opt mkdir -p ${D}${localstatedir}/opt
mkdir -p ${D}${base_bindir} mkdir -p ${D}${base_libdir}
mkdir -p ${D}/${baselib}
mkdir -p ${D}${sysconfdir}/lsb-release.d mkdir -p ${D}${sysconfdir}/lsb-release.d
printf "LSB_VERSION=\"core-4.1-noarch:" > ${D}${sysconfdir}/lsb-release printf "LSB_VERSION=\"core-4.1-noarch:" > ${D}${sysconfdir}/lsb-release
@@ -87,47 +86,46 @@ do_install_append(){
install -m 0755 ${WORKDIR}/${i} ${D}${sysconfdir}/core-lsb install -m 0755 ${WORKDIR}/${i} ${D}${sysconfdir}/core-lsb
done done
install -d ${D}/lib/lsb install -d ${D}/${nonarch_base_libdir}/lsb
install -m 0755 ${WORKDIR}/init-functions ${D}/lib/lsb install -m 0755 ${WORKDIR}/init-functions ${D}/${nonarch_base_libdir}/lsb
# creat links for LSB test # creat links for LSB test
install -d ${D}/usr/lib/lsb if [ "${nonarch_base_libdir}" != "${nonarch_libdir}" ] ; then
ln -sf ${sbindir}/chkconfig ${D}/usr/lib/lsb/install_initd install -d ${D}/${nonarch_libdir}/lsb
ln -sf ${sbindir}/chkconfig ${D}/usr/lib/lsb/remove_initd fi
ln -sf ${sbindir}/chkconfig ${D}/${nonarch_libdir}/lsb/install_initd
ln -sf ${sbindir}/chkconfig ${D}/${nonarch_libdir}/lsb/remove_initd
if [ "${TARGET_ARCH}" = "x86_64" ];then if [ "${TARGET_ARCH}" = "x86_64" ];then
cd ${D}
if [ "${baselib}" != "lib64" ]; then if [ "${baselib}" != "lib64" ]; then
ln -sf ${baselib} lib64 lnr ${D}${base_libdir} ${D}/lib64
fi fi
cd ${D}/${baselib} cd ${D}/${base_libdir}
ln -sf ld-linux-x86-64.so.2 ld-lsb-x86-64.so.2 ln -sf ld-linux-x86-64.so.2 ld-lsb-x86-64.so.2
ln -sf ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3 ln -sf ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3
fi fi
if [ "${TARGET_ARCH}" = "i586" ] || [ "${TARGET_ARCH}" = "i686" ];then if [ "${TARGET_ARCH}" = "i586" ] || [ "${TARGET_ARCH}" = "i686" ];then
cd ${D}/${baselib} cd ${D}/${base_libdir}
ln -sf ld-linux.so.2 ld-lsb.so.2 ln -sf ld-linux.so.2 ld-lsb.so.2
ln -sf ld-linux.so.2 ld-lsb.so.3 ln -sf ld-linux.so.2 ld-lsb.so.3
fi fi
if [ "${TARGET_ARCH}" = "powerpc64" ];then if [ "${TARGET_ARCH}" = "powerpc64" ];then
cd ${D}
if [ "${baselib}" != "lib64" ]; then if [ "${baselib}" != "lib64" ]; then
ln -sf ${baselib} lib64 lnr ${D}${base_libdir} ${D}/lib64
fi fi
cd ${D}/${baselib} cd ${D}/${base_libdir}
ln -sf ld64.so.1 ld-lsb-ppc64.so.2 ln -sf ld64.so.1 ld-lsb-ppc64.so.2
ln -sf ld64.so.1 ld-lsb-ppc64.so.3 ln -sf ld64.so.1 ld-lsb-ppc64.so.3
fi fi
if [ "${TARGET_ARCH}" = "powerpc" ];then if [ "${TARGET_ARCH}" = "powerpc" ];then
cd ${D}/${baselib} cd ${D}/${base_libdir}
ln -sf ld.so.1 ld-lsb-ppc32.so.2 ln -sf ld.so.1 ld-lsb-ppc32.so.2
ln -sf ld.so.1 ld-lsb-ppc32.so.3 ln -sf ld.so.1 ld-lsb-ppc32.so.3
fi fi
} }
FILES_${PN} += "/lib64 \ FILES_${PN} += "${@'/lib64' if d.getVar('TARGET_ARCH') == ('x86_64' or 'powerpc64') and '${baselib}' != 'lib64' else ''} \
${base_libdir} \ ${base_libdir} \
/usr/lib/lsb \ ${nonarch_libdir}/lsb \
${base_libdir}/lsb/* \ ${nonarch_base_libdir}/lsb/* \
/lib/lsb/* \ "
"