summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended
diff options
context:
space:
mode:
authorAmarnath Valluri <amarnath.valluri@intel.com>2017-03-03 14:36:32 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-22 11:35:20 +0000
commit87c2bef1b98a1027017236ce495fc7fbecd02111 (patch)
tree51d7636f9205c7af2776354a5c7c2a3c9a129df4 /meta/recipes-extended
parent63b62e5d80e79962ee5d4c9bbd0692664b2cd2de (diff)
downloadpoky-87c2bef1b98a1027017236ce495fc7fbecd02111.tar.gz
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>
Diffstat (limited to 'meta/recipes-extended')
-rw-r--r--meta/recipes-extended/lsb/lsb_4.1.bb40
1 files changed, 19 insertions, 21 deletions
diff --git a/meta/recipes-extended/lsb/lsb_4.1.bb b/meta/recipes-extended/lsb/lsb_4.1.bb
index b4e8832c70..39cb5445e2 100644
--- a/meta/recipes-extended/lsb/lsb_4.1.bb
+++ b/meta/recipes-extended/lsb/lsb_4.1.bb
@@ -34,14 +34,13 @@ S = "${WORKDIR}/lsb-release-1.4"
34CLEANBROKEN = "1" 34CLEANBROKEN = "1"
35 35
36do_install(){ 36do_install(){
37 oe_runmake install prefix=${D} mandir=${D}/${datadir}/man/ DESTDIR=${D} 37 oe_runmake install prefix=${D}/${base_prefix} mandir=${D}/${datadir}/man/ DESTDIR=${D}
38 38
39 # this 2 dirs are needed by package lsb-dist-checker 39 # this 2 dirs are needed by package lsb-dist-checker
40 mkdir -p ${D}${sysconfdir}/opt 40 mkdir -p ${D}${sysconfdir}/opt
41 mkdir -p ${D}${localstatedir}/opt 41 mkdir -p ${D}${localstatedir}/opt
42 42
43 mkdir -p ${D}${base_bindir} 43 mkdir -p ${D}${base_libdir}
44 mkdir -p ${D}/${baselib}
45 mkdir -p ${D}${sysconfdir}/lsb-release.d 44 mkdir -p ${D}${sysconfdir}/lsb-release.d
46 printf "LSB_VERSION=\"core-4.1-noarch:" > ${D}${sysconfdir}/lsb-release 45 printf "LSB_VERSION=\"core-4.1-noarch:" > ${D}${sysconfdir}/lsb-release
47 46
@@ -87,47 +86,46 @@ do_install_append(){
87 install -m 0755 ${WORKDIR}/${i} ${D}${sysconfdir}/core-lsb 86 install -m 0755 ${WORKDIR}/${i} ${D}${sysconfdir}/core-lsb
88 done 87 done
89 88
90 install -d ${D}/lib/lsb 89 install -d ${D}/${nonarch_base_libdir}/lsb
91 install -m 0755 ${WORKDIR}/init-functions ${D}/lib/lsb 90 install -m 0755 ${WORKDIR}/init-functions ${D}/${nonarch_base_libdir}/lsb
92 91
93 # creat links for LSB test 92 # creat links for LSB test
94 install -d ${D}/usr/lib/lsb 93 if [ "${nonarch_base_libdir}" != "${nonarch_libdir}" ] ; then
95 ln -sf ${sbindir}/chkconfig ${D}/usr/lib/lsb/install_initd 94 install -d ${D}/${nonarch_libdir}/lsb
96 ln -sf ${sbindir}/chkconfig ${D}/usr/lib/lsb/remove_initd 95 fi
96 ln -sf ${sbindir}/chkconfig ${D}/${nonarch_libdir}/lsb/install_initd
97 ln -sf ${sbindir}/chkconfig ${D}/${nonarch_libdir}/lsb/remove_initd
97 98
98 if [ "${TARGET_ARCH}" = "x86_64" ];then 99 if [ "${TARGET_ARCH}" = "x86_64" ];then
99 cd ${D}
100 if [ "${baselib}" != "lib64" ]; then 100 if [ "${baselib}" != "lib64" ]; then
101 ln -sf ${baselib} lib64 101 lnr ${D}${base_libdir} ${D}/lib64
102 fi 102 fi
103 cd ${D}/${baselib} 103 cd ${D}/${base_libdir}
104 ln -sf ld-linux-x86-64.so.2 ld-lsb-x86-64.so.2 104 ln -sf ld-linux-x86-64.so.2 ld-lsb-x86-64.so.2
105 ln -sf ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3 105 ln -sf ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3
106 fi 106 fi
107 if [ "${TARGET_ARCH}" = "i586" ] || [ "${TARGET_ARCH}" = "i686" ];then 107 if [ "${TARGET_ARCH}" = "i586" ] || [ "${TARGET_ARCH}" = "i686" ];then
108 cd ${D}/${baselib} 108 cd ${D}/${base_libdir}
109 ln -sf ld-linux.so.2 ld-lsb.so.2 109 ln -sf ld-linux.so.2 ld-lsb.so.2
110 ln -sf ld-linux.so.2 ld-lsb.so.3 110 ln -sf ld-linux.so.2 ld-lsb.so.3
111 fi 111 fi
112 112
113 if [ "${TARGET_ARCH}" = "powerpc64" ];then 113 if [ "${TARGET_ARCH}" = "powerpc64" ];then
114 cd ${D}
115 if [ "${baselib}" != "lib64" ]; then 114 if [ "${baselib}" != "lib64" ]; then
116 ln -sf ${baselib} lib64 115 lnr ${D}${base_libdir} ${D}/lib64
117 fi 116 fi
118 cd ${D}/${baselib} 117 cd ${D}/${base_libdir}
119 ln -sf ld64.so.1 ld-lsb-ppc64.so.2 118 ln -sf ld64.so.1 ld-lsb-ppc64.so.2
120 ln -sf ld64.so.1 ld-lsb-ppc64.so.3 119 ln -sf ld64.so.1 ld-lsb-ppc64.so.3
121 fi 120 fi
122 if [ "${TARGET_ARCH}" = "powerpc" ];then 121 if [ "${TARGET_ARCH}" = "powerpc" ];then
123 cd ${D}/${baselib} 122 cd ${D}/${base_libdir}
124 ln -sf ld.so.1 ld-lsb-ppc32.so.2 123 ln -sf ld.so.1 ld-lsb-ppc32.so.2
125 ln -sf ld.so.1 ld-lsb-ppc32.so.3 124 ln -sf ld.so.1 ld-lsb-ppc32.so.3
126 fi 125 fi
127} 126}
128FILES_${PN} += "/lib64 \ 127FILES_${PN} += "${@'/lib64' if d.getVar('TARGET_ARCH') == ('x86_64' or 'powerpc64') and '${baselib}' != 'lib64' else ''} \
129 ${base_libdir} \ 128 ${base_libdir} \
130 /usr/lib/lsb \ 129 ${nonarch_libdir}/lsb \
131 ${base_libdir}/lsb/* \ 130 ${nonarch_base_libdir}/lsb/* \
132 /lib/lsb/* \ 131 "
133 "