summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/lsb/lsb_4.1.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/lsb/lsb_4.1.bb')
-rw-r--r--meta/recipes-extended/lsb/lsb_4.1.bb121
1 files changed, 121 insertions, 0 deletions
diff --git a/meta/recipes-extended/lsb/lsb_4.1.bb b/meta/recipes-extended/lsb/lsb_4.1.bb
new file mode 100644
index 0000000000..d265731e04
--- /dev/null
+++ b/meta/recipes-extended/lsb/lsb_4.1.bb
@@ -0,0 +1,121 @@
1SUMMARY = "LSB support for OpenEmbedded"
2SECTION = "console/utils"
3HOMEPAGE = "http://prdownloads.sourceforge.net/lsb"
4LICENSE = "GPLv2+"
5PR = "r2"
6
7# lsb_release needs getopt
8RDEPENDS_${PN} += "util-linux"
9
10LIC_FILES_CHKSUM = "file://README;md5=12da544b1a3a5a1795a21160b49471cf"
11
12SRC_URI = "${SOURCEFORGE_MIRROR}/project/lsb/lsb_release/1.4/lsb-release-1.4.tar.gz \
13 file://init-functions \
14 file://lsb_killproc \
15 file://lsb_log_message \
16 file://lsb_pidofproc \
17 file://lsb_start_daemon \
18 "
19
20SRC_URI[md5sum] = "30537ef5a01e0ca94b7b8eb6a36bb1e4"
21SRC_URI[sha256sum] = "99321288f8d62e7a1d485b7c6bdccf06766fb8ca603c6195806e4457fdf17172"
22S = "${WORKDIR}/lsb-release-1.4"
23
24do_install(){
25 oe_runmake install prefix=${D} mandir=${D}/${datadir}/man/ DESTDIR=${D}
26
27 # this 2 dirs are needed by package lsb-dist-checker
28 mkdir -p ${D}${sysconfdir}/opt
29 mkdir -p ${D}${localstatedir}/opt
30
31 mkdir -p ${D}${base_bindir}
32 mkdir -p ${D}/${baselib}
33 mkdir -p ${D}${sysconfdir}/lsb-release.d
34 printf "LSB_VERSION=\"core-4.1-noarch:" > ${D}${sysconfdir}/lsb-release
35
36 if [ "${TARGET_ARCH}" = "i586" ];then
37 printf "core-4.1-ia32" >> ${D}${sysconfdir}/lsb-release
38 else
39 printf "core-4.1-${TARGET_ARCH}" >> ${D}${sysconfdir}/lsb-release
40 fi
41 echo "\"" >> ${D}${sysconfdir}/lsb-release
42 echo "DISTRIB_ID=${DISTRO}" >> ${D}${sysconfdir}/lsb-release
43 echo "DISTRIB_RELEASE=${DISTRO_VERSION}" >> ${D}${sysconfdir}/lsb-release
44 if [ -n "${DISTRO_CODENAME}" ]; then
45 echo "DISTRIB_CODENAME=${DISTRO_CODENAME}" >> ${D}${sysconfdir}/lsb-release
46 fi
47 echo "DISTRIB_DESCRIPTION=\"${DISTRO_NAME} ${DISTRO_VERSION}\"" >> ${D}${sysconfdir}/lsb-release
48
49 if [ "${TARGET_ARCH}" = "i586" ];then
50 mkdir -p ${D}${sysconfdir}/lsb-release.d
51 touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-noarch
52 touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-noarch
53 touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-ia32
54 touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-ia32
55 elif [ "${TARGET_ARCH}" = "x86_64" ];then
56 touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-noarch
57 touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-amd64
58 touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-amd64
59 fi
60 if [ "${TARGET_ARCH}" = "powerpc" ];then
61 touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-noarch
62 touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-ppc32
63 touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-ppc32
64 elif [ "${TARGET_ARCH}" = "powerpc64" ];then
65 touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-noarch
66 touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-ppc64
67 touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-ppc64
68 fi
69}
70
71do_install_append(){
72 install -d ${D}${sysconfdir}/core-lsb
73 install -d ${D}/${baselib}/lsb
74 for i in lsb_killproc lsb_log_message lsb_pidofproc lsb_start_daemon
75 do
76 install -m 0755 ${WORKDIR}/${i} ${D}${sysconfdir}/core-lsb
77 done
78 install -m 0755 ${WORKDIR}/init-functions ${D}/${baselib}/lsb
79
80 # creat links for LSB test
81 install -d ${D}/usr/lib/lsb
82 ln -sf ${sbindir}/chkconfig ${D}/usr/lib/lsb/install_initd
83 ln -sf ${sbindir}/chkconfig ${D}/usr/lib/lsb/remove_initd
84 install -d ${D}/${libdir}
85 ln -sf ${sbindir}/sendmail ${D}/${libdir}/sendmail
86
87 if [ "${TARGET_ARCH}" = "x86_64" ];then
88 cd ${D}
89 if [ "${baselib}" != "lib64" ]; then
90 ln -sf ${baselib} lib64
91 fi
92 cd ${D}/${baselib}
93 ln -sf ld-linux-x86-64.so.2 ld-lsb-x86-64.so.2
94 ln -sf ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3
95 fi
96 if [ "${TARGET_ARCH}" = "i586" ];then
97 cd ${D}/${baselib}
98 ln -sf ld-linux.so.2 ld-lsb.so.2
99 ln -sf ld-linux.so.2 ld-lsb.so.3
100 fi
101
102 if [ "${TARGET_ARCH}" = "powerpc64" ];then
103 cd ${D}
104 if [ "${baselib}" != "lib64" ]; then
105 ln -sf ${baselib} lib64
106 fi
107 cd ${D}/${baselib}
108 ln -sf ld64.so.1 ld-lsb-ppc64.so.2
109 ln -sf ld64.so.1 ld-lsb-ppc64.so.3
110 fi
111 if [ "${TARGET_ARCH}" = "powerpc" ];then
112 cd ${D}/${baselib}
113 ln -sf ld.so.1 ld-lsb-ppc32.so.2
114 ln -sf ld.so.1 ld-lsb-ppc32.so.3
115 fi
116}
117FILES_${PN} += "/lib64 \
118 /usr/lib/lsb \
119 ${base_libdir}/lsb/* \
120 ${libdir}/sendmail \
121 "