summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJavier Martinez Canillas <javier@dowhile0.org>2012-08-05 21:48:39 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-08-06 15:18:51 +0100
commit226ec65c5dad96e39d0076e27f3685dd689ddd4d (patch)
tree8b75e7393cd6289ad7cdef202a94217908fcf3bf
parent7ada514100a94f323c762ce16dc1eec4bfb6a81c (diff)
downloadpoky-226ec65c5dad96e39d0076e27f3685dd689ddd4d.tar.gz
lsb: use ${base_bindir} and ${sysconfdir} instead of /bin and /etc
It is considered good practice to use the build system provided variables instead of directly specify hardcoded paths. (From OE-Core rev: 8b94cd639c02bcc653312575592673c36df0ec92) Signed-off-by: Javier Martinez Canillas <javier@dowhile0.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-extended/lsb/lsb_1.4.bb62
1 files changed, 31 insertions, 31 deletions
diff --git a/meta/recipes-extended/lsb/lsb_1.4.bb b/meta/recipes-extended/lsb/lsb_1.4.bb
index 15dbeaafdf..513998cab8 100644
--- a/meta/recipes-extended/lsb/lsb_1.4.bb
+++ b/meta/recipes-extended/lsb/lsb_1.4.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "LSB support for OpenEmbedded"
2SECTION = "console/utils" 2SECTION = "console/utils"
3HOMEPAGE = "http://prdownloads.sourceforge.net/lsb" 3HOMEPAGE = "http://prdownloads.sourceforge.net/lsb"
4LICENSE = "GPLv2+" 4LICENSE = "GPLv2+"
5PR = "r3" 5PR = "r4"
6 6
7# lsb_release needs getopt 7# lsb_release needs getopt
8RDEPENDS_${PN} += "util-linux" 8RDEPENDS_${PN} += "util-linux"
@@ -23,54 +23,54 @@ S = "${WORKDIR}/lsb-release-${PV}"
23 23
24do_install(){ 24do_install(){
25 oe_runmake install prefix=${D} mandir=${D}/${datadir}/man/ DESTDIR=${D} 25 oe_runmake install prefix=${D} mandir=${D}/${datadir}/man/ DESTDIR=${D}
26 mkdir -p ${D}/bin 26 mkdir -p ${D}${base_bindir}
27 mkdir -p ${D}/${baselib} 27 mkdir -p ${D}/${baselib}
28 mkdir -p ${D}/etc/lsb-release.d 28 mkdir -p ${D}${sysconfdir}/lsb-release.d
29 echo -n "LSB_VERSION=\"core-4.1-noarch:" > ${D}/etc/lsb-release 29 echo -n "LSB_VERSION=\"core-4.1-noarch:" > ${D}${sysconfdir}/lsb-release
30 30
31 if [ "${TARGET_ARCH}" = "i586" ];then 31 if [ "${TARGET_ARCH}" = "i586" ];then
32 echo -n "core-4.1-ia32" >> ${D}/etc/lsb-release 32 echo -n "core-4.1-ia32" >> ${D}${sysconfdir}/lsb-release
33 else 33 else
34 echo -n "core-4.1-${TARGET_ARCH}" >> ${D}/etc/lsb-release 34 echo -n "core-4.1-${TARGET_ARCH}" >> ${D}${sysconfdir}/lsb-release
35 fi 35 fi
36 echo "\"" >> ${D}/etc/lsb-release 36 echo "\"" >> ${D}${sysconfdir}/lsb-release
37 echo "DISTRIB_ID=${DISTRO}" >> ${D}/etc/lsb-release 37 echo "DISTRIB_ID=${DISTRO}" >> ${D}${sysconfdir}/lsb-release
38 echo "DISTRIB_RELEASE=${DISTRO_VERSION}" >> ${D}/etc/lsb-release 38 echo "DISTRIB_RELEASE=${DISTRO_VERSION}" >> ${D}${sysconfdir}/lsb-release
39 echo "DISTRIB_DESCRIPTION=\"${DISTRO_NAME} ${DISTRO_VERSION}\"" >> ${D}/etc/lsb-release 39 echo "DISTRIB_DESCRIPTION=\"${DISTRO_NAME} ${DISTRO_VERSION}\"" >> ${D}${sysconfdir}/lsb-release
40 40
41 if [ "${TARGET_ARCH}" = "i586" ];then 41 if [ "${TARGET_ARCH}" = "i586" ];then
42 mkdir -p ${D}/etc/lsb-release.d 42 mkdir -p ${D}${sysconfdir}/lsb-release.d
43 touch ${D}/etc/lsb-release.d/graphics-4.1-noarch 43 touch ${D}${sysconfdir}/lsb-release.d/graphics-4.1-noarch
44 touch ${D}/etc/lsb-release.d/graphics-${PV}-noarch 44 touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-noarch
45 touch ${D}/etc/lsb-release.d/desktop-${PV}-noarch 45 touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-noarch
46 touch ${D}/etc/lsb-release.d/graphics-4.1-ia32 46 touch ${D}${sysconfdir}/lsb-release.d/graphics-4.1-ia32
47 touch ${D}/etc/lsb-release.d/graphics-${PV}-ia32 47 touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-ia32
48 touch ${D}/etc/lsb-release.d/desktop-${PV}-ia32 48 touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-ia32
49 elif [ "${TARGET_ARCH}" = "x86_64" ];then 49 elif [ "${TARGET_ARCH}" = "x86_64" ];then
50 touch ${D}/etc/lsb-release.d/graphics-4.1-noarch 50 touch ${D}${sysconfdir}/lsb-release.d/graphics-4.1-noarch
51 touch ${D}/etc/lsb-release.d/graphics-4.1-amd64 51 touch ${D}${sysconfdir}/lsb-release.d/graphics-4.1-amd64
52 touch ${D}/etc/lsb-release.d/graphics-${PV}-amd64 52 touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-amd64
53 touch ${D}/etc/lsb-release.d/desktop-${PV}-amd64 53 touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-amd64
54 fi 54 fi
55 if [ "${TARGET_ARCH}" = "powerpc" ];then 55 if [ "${TARGET_ARCH}" = "powerpc" ];then
56 touch ${D}/etc/lsb-release.d/graphics-4.1-noarch 56 touch ${D}${sysconfdir}/lsb-release.d/graphics-4.1-noarch
57 touch ${D}/etc/lsb-release.d/graphics-4.1-ppc32 57 touch ${D}${sysconfdir}/lsb-release.d/graphics-4.1-ppc32
58 touch ${D}/etc/lsb-release.d/graphics-${PV}-ppc32 58 touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-ppc32
59 touch ${D}/etc/lsb-release.d/desktop-${PV}-ppc32 59 touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-ppc32
60 elif [ "${TARGET_ARCH}" = "powerpc64" ];then 60 elif [ "${TARGET_ARCH}" = "powerpc64" ];then
61 touch ${D}/etc/lsb-release.d/graphics-4.1-noarch 61 touch ${D}${sysconfdir}/lsb-release.d/graphics-4.1-noarch
62 touch ${D}/etc/lsb-release.d/graphics-4.1-ppc64 62 touch ${D}${sysconfdir}/lsb-release.d/graphics-4.1-ppc64
63 touch ${D}/etc/lsb-release.d/graphics-${PV}-ppc64 63 touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-ppc64
64 touch ${D}/etc/lsb-release.d/desktop-${PV}-ppc64 64 touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-ppc64
65 fi 65 fi
66} 66}
67 67
68do_install_append(){ 68do_install_append(){
69 install -d ${D}/etc/core-lsb 69 install -d ${D}${sysconfdir}/core-lsb
70 install -d ${D}/${baselib}/lsb 70 install -d ${D}/${baselib}/lsb
71 for i in lsb_killproc lsb_log_message lsb_pidofproc lsb_start_daemon 71 for i in lsb_killproc lsb_log_message lsb_pidofproc lsb_start_daemon
72 do 72 do
73 install -m 0755 ${WORKDIR}/${i} ${D}/etc/core-lsb 73 install -m 0755 ${WORKDIR}/${i} ${D}${sysconfdir}/core-lsb
74 done 74 done
75 install -m 0755 ${WORKDIR}/init-functions ${D}/${baselib}/lsb 75 install -m 0755 ${WORKDIR}/init-functions ${D}/${baselib}/lsb
76 if [ "${TARGET_ARCH}" = "x86_64" ];then 76 if [ "${TARGET_ARCH}" = "x86_64" ];then