aboutsummaryrefslogtreecommitdiffstats
path: root/classes
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@rpsys.net>2007-11-17 23:21:03 +0000
committerRichard Purdie <rpurdie@rpsys.net>2007-11-17 23:21:03 +0000
commit4b751ba2557d2e3f448f92589ee0c9d5e30f6388 (patch)
tree1d6d10ef0f954314d31dba063faa454bf33d05f1 /classes
parent702d82aa16bb05d638353677359846af2d125674 (diff)
downloadopenembedded-4b751ba2557d2e3f448f92589ee0c9d5e30f6388.tar.gz
classes: Sync staging layout cleanups from Poky
Diffstat (limited to 'classes')
-rw-r--r--classes/base.bbclass4
-rw-r--r--classes/binconfig.bbclass8
-rw-r--r--classes/cross.bbclass2
-rw-r--r--classes/distutils.bbclass6
-rw-r--r--classes/image.bbclass8
-rw-r--r--classes/mozilla.bbclass2
-rw-r--r--classes/pkgconfig.bbclass4
-rw-r--r--classes/rootfs_deb.bbclass18
-rw-r--r--classes/sdk.bbclass28
-rw-r--r--classes/tmake.bbclass2
-rw-r--r--classes/xlibs.bbclass4
11 files changed, 59 insertions, 27 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass
index c504f78283..06a49814d2 100644
--- a/classes/base.bbclass
+++ b/classes/base.bbclass
@@ -684,8 +684,8 @@ base_do_stage () {
:
}
-do_populate_staging[dirs] = "${STAGING_DIR_TARGET}/bin ${STAGING_DIR_TARGET}/lib \
- ${STAGING_DIR_TARGET}/include \
+do_populate_staging[dirs] = "${STAGING_DIR_TARGET}/${layout_bindir} ${STAGING_DIR_TARGET}/${layout_libdir} \
+ ${STAGING_DIR_TARGET}/${layout_includedir} \
${STAGING_BINDIR_NATIVE} ${STAGING_LIBDIR_NATIVE} \
${STAGING_INCDIR_NATIVE} \
${STAGING_DATADIR} \
diff --git a/classes/binconfig.bbclass b/classes/binconfig.bbclass
index 497b78f454..4e425a76d6 100644
--- a/classes/binconfig.bbclass
+++ b/classes/binconfig.bbclass
@@ -16,8 +16,8 @@ def get_binconfig_mangle(d):
s += " -e 's:OELIBDIR:${STAGING_LIBDIR}:;'"
s += " -e 's:OEINCDIR:${STAGING_INCDIR}:;'"
s += " -e 's:OEDATADIR:${STAGING_DATADIR}:'"
- s += " -e 's:OEPREFIX:${STAGING_LIBDIR}/..:'"
- s += " -e 's:OEEXECPREFIX:${STAGING_LIBDIR}/..:'"
+ s += " -e 's:OEPREFIX:${STAGING_DIR_HOST}${layout_prefix}:'"
+ s += " -e 's:OEEXECPREFIX:${STAGING_DIR_HOST}${layout_exec_prefix}:'"
s += " -e 's:-I${WORKDIR}:-I${STAGING_INCDIR}:'"
s += " -e 's:-L${WORKDIR}:-L${STAGING_LIBDIR}:'"
return s
@@ -33,7 +33,7 @@ do_install_append() {
-e 's:${STAGING_LIBDIR}:${libdir}:g;' \
-e 's:${STAGING_INCDIR}:${includedir}:g;' \
-e 's:${STAGING_DATADIR}:${datadir}:' \
- -e 's:${STAGING_LIBDIR}/..:${prefix}:' > ${D}${bindir}/`basename $config`
+ -e 's:${STAGING_DIR_HOST}${layout_prefix}:${prefix}:' > ${D}${bindir}/`basename $config`
done
fi
@@ -42,7 +42,7 @@ do_install_append() {
-e 's:${STAGING_LIBDIR}:${libdir}:g;' \
-e 's:${STAGING_INCDIR}:${includedir}:g;' \
-e 's:${STAGING_DATADIR}:${datadir}:' \
- -e 's:${STAGING_LIBDIR}/..:${prefix}:' \
+ -e 's:${STAGING_DIR_HOST}${layout_prefix}:${prefix}:' \
$lafile
done
}
diff --git a/classes/cross.bbclass b/classes/cross.bbclass
index a6b000cb6a..6e5480a2a0 100644
--- a/classes/cross.bbclass
+++ b/classes/cross.bbclass
@@ -18,7 +18,7 @@ CPPFLAGS = "${BUILD_CPPFLAGS}"
CFLAGS = "${BUILD_CFLAGS}"
CXXFLAGS = "${BUILD_CFLAGS}"
LDFLAGS = "${BUILD_LDFLAGS}"
-LDFLAGS_build-darwin = "-L${STAGING_LIBDIR_NATIVE} "
+LDFLAGS_build-darwin = "-L${STAGING_LIBDIR_NATIVE}"
# Overrides for paths
diff --git a/classes/distutils.bbclass b/classes/distutils.bbclass
index c07a9911cd..7a18e71c04 100644
--- a/classes/distutils.bbclass
+++ b/classes/distutils.bbclass
@@ -13,10 +13,10 @@ distutils_stage_headers() {
}
distutils_stage_all() {
- install -d ${STAGING_INCDIR}/../${PYTHON_DIR}/site-packages
- PYTHONPATH=${STAGING_INCDIR}/../${PYTHON_DIR}/site-packages \
+ install -d ${STAGING_DIR_HOST}${layout_prefix}/${PYTHON_DIR}/site-packages
+ PYTHONPATH=${STAGING_DIR_HOST}${layout_prefix}/${PYTHON_DIR}/site-packages \
BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
- ${STAGING_BINDIR_NATIVE}/python setup.py install --prefix=${STAGING_INCDIR}/.. --install-data=${STAGING_INCDIR}/../share || \
+ ${STAGING_BINDIR_NATIVE}/python setup.py install --prefix=${STAGING_DIR_HOST}${layout_prefix} --install-data=${STAGING_DATADIR} || \
oefatal "python setup.py install (stage) execution failed."
}
diff --git a/classes/image.bbclass b/classes/image.bbclass
index 3420e3f53a..312307c831 100644
--- a/classes/image.bbclass
+++ b/classes/image.bbclass
@@ -4,6 +4,7 @@ LICENSE = "MIT"
PACKAGES = ""
RDEPENDS += "${IMAGE_INSTALL}"
+# "export IMAGE_BASENAME" not supported at this time
IMAGE_BASENAME[export] = "1"
export PACKAGE_INSTALL ?= "${IMAGE_INSTALL}"
@@ -179,8 +180,13 @@ set_image_autologin () {
sed -i 's%^AUTOLOGIN=\"false"%AUTOLOGIN="true"%g' ${IMAGE_ROOTFS}/etc/sysconfig/gpelogin
}
+# Can be use to create /etc/timestamp during image construction to give a reasonably
+# sane default time setting
+rootfs_update_timestamp () {
+ date "+%m%d%H%M%Y" >${IMAGE_ROOTFS}/etc/timestamp
+}
# export the zap_root_password, create_etc_timestamp and remote_init_link
-EXPORT_FUNCTIONS zap_root_password create_etc_timestamp remove_init_link do_rootfs make_zimage_symlink_relative set_image_autologin
+EXPORT_FUNCTIONS zap_root_password create_etc_timestamp remove_init_link do_rootfs make_zimage_symlink_relative set_image_autologin rootfs_update_timestamp
addtask rootfs before do_build after do_install
diff --git a/classes/mozilla.bbclass b/classes/mozilla.bbclass
index abf2bc7623..84c83ebe05 100644
--- a/classes/mozilla.bbclass
+++ b/classes/mozilla.bbclass
@@ -19,7 +19,7 @@ export MOZ_OBJDIR = "${S}"
export CONFIGURE_ARGS = "${EXTRA_OECONF}"
export HOST_LIBIDL_CFLAGS = "`${HOST_LIBIDL_CONFIG} --cflags`"
export HOST_LIBIDL_LIBS = "`${HOST_LIBIDL_CONFIG} --libs`"
-export HOST_LIBIDL_CONFIG = "PKG_CONFIG_PATH=${STAGING_DATADIR_NATIVE}/pkgconfig pkg-config libIDL-2.0"
+export HOST_LIBIDL_CONFIG = "PKG_CONFIG_PATH=${STAGING_LIBDIR_NATIVE}/pkgconfig pkg-config libIDL-2.0"
export HOST_CC = "${BUILD_CC}"
export HOST_CXX = "${BUILD_CXX}"
export HOST_CFLAGS = "${BUILD_CFLAGS}"
diff --git a/classes/pkgconfig.bbclass b/classes/pkgconfig.bbclass
index c795c8a709..c50e0b484f 100644
--- a/classes/pkgconfig.bbclass
+++ b/classes/pkgconfig.bbclass
@@ -15,8 +15,8 @@ def get_pkgconfig_mangle(d):
s += " -e 's:OELIBDIR:${STAGING_LIBDIR}:;'"
s += " -e 's:OEINCDIR:${STAGING_INCDIR}:;'"
s += " -e 's:OEDATADIR:${STAGING_DATADIR}:'"
- s += " -e 's:OEPREFIX:${STAGING_LIBDIR}/..:'"
- s += " -e 's:OEEXECPREFIX:${STAGING_LIBDIR}/..:'"
+ s += " -e 's:OEPREFIX:${STAGING_DIR_HOST}${layout_prefix}:'"
+ s += " -e 's:OEEXECPREFIX:${STAGING_DIR_HOST}${layout_exec_prefix}:'"
s += " -e 's:-L${WORKDIR}\S*: :g'"
s += " -e 's:-I${WORKDIR}\S*: :g'"
diff --git a/classes/rootfs_deb.bbclass b/classes/rootfs_deb.bbclass
index 5571f699e7..935ef6e3f7 100644
--- a/classes/rootfs_deb.bbclass
+++ b/classes/rootfs_deb.bbclass
@@ -10,8 +10,8 @@ fakeroot rootfs_deb_do_rootfs () {
mkdir -p ${IMAGE_ROOTFS}/var/dpkg/info
mkdir -p ${IMAGE_ROOTFS}/var/dpkg/updates
- rm -f ${STAGING_DIR}${sysconfdir}/apt/sources.list.rev
- rm -f ${STAGING_DIR}${sysconfdir}/apt/preferences
+ rm -f ${STAGING_ETCDIR_NATIVE}/apt/sources.list.rev
+ rm -f ${STAGING_ETCDIR_NATIVE}/apt/preferences
> ${IMAGE_ROOTFS}/var/dpkg/status
> ${IMAGE_ROOTFS}/var/dpkg/available
# > ${STAGING_DIR}/var/dpkg/status
@@ -28,25 +28,27 @@ fakeroot rootfs_deb_do_rootfs () {
apt-ftparchive packages . | bzip2 > Packages.bz2
echo "Label: $arch" > Release
- echo "deb file:${DEPLOY_DIR_DEB}/$arch/ ./" >> ${STAGING_DIR}${sysconfdir}/apt/sources.list.rev
+ echo "deb file:${DEPLOY_DIR_DEB}/$arch/ ./" >> ${STAGING_ETCDIR_NATIVE}/apt/sources.list.rev
(echo "Package: *"
echo "Pin: release l=$arch"
echo "Pin-Priority: $((800 + $priority))"
- echo) >> ${STAGING_DIR}${sysconfdir}/apt/preferences
+ echo) >> ${STAGING_ETCDIR_NATIVE}/apt/preferences
priority=$(expr $priority + 5)
done
- tac ${STAGING_DIR}${sysconfdir}/apt/sources.list.rev > ${STAGING_DIR}${sysconfdir}/apt/sources.list
+ tac ${STAGING_ETCDIR_NATIVE}/apt/sources.list.rev > ${STAGING_ETCDIR_NATIVE}/apt/sources.list
- cat "${STAGING_DIR}${sysconfdir}/apt/apt.conf.sample" \
+ cat "${STAGING_ETCDIR_NATIVE}/apt/apt.conf.sample" \
| sed -e 's#Architecture ".*";#Architecture "${TARGET_ARCH}";#' \
- > "${STAGING_DIR}${sysconfdir}/apt/apt-rootfs.conf"
+ > "${STAGING_ETCDIR_NATIVE}/apt/apt-rootfs.conf"
- export APT_CONFIG="${STAGING_DIR}${sysconfdir}/apt/apt-rootfs.conf"
+ export APT_CONFIG="${STAGING_ETCDIR_NATIVE}/apt/apt-rootfs.conf"
export D=${IMAGE_ROOTFS}
export OFFLINE_ROOT=${IMAGE_ROOTFS}
export IPKG_OFFLINE_ROOT=${IMAGE_ROOTFS}
+ mkdir -p ${IMAGE_ROOTFS}/var/lib/dpkg/alternatives
+
apt-get update
_flag () {
diff --git a/classes/sdk.bbclass b/classes/sdk.bbclass
index 441da77bd0..63f12117eb 100644
--- a/classes/sdk.bbclass
+++ b/classes/sdk.bbclass
@@ -16,12 +16,36 @@ CFLAGS = "${BUILD_CFLAGS}"
CXXFLAGS = "${BUILD_CFLAGS}"
LDFLAGS = "${BUILD_LDFLAGS}"
+# Path prefixes
prefix = "${SDK_PREFIX}"
exec_prefix = "${prefix}"
-base_prefix = "${exec_prefix}"
+base_prefix = "${prefix}"
+
+# Base paths
+export base_bindir = "${prefix}/bin"
+export base_sbindir = "${prefix}/bin"
+export base_libdir = "${prefix}/lib"
+
+# Architecture independent paths
+export datadir = "${prefix}/share"
+export sysconfdir = "${prefix}/etc"
+export sharedstatedir = "${datadir}/com"
+export localstatedir = "${prefix}/var"
+export infodir = "${datadir}/info"
+export mandir = "${datadir}/man"
+export docdir = "${datadir}/doc"
+export servicedir = "${prefix}/srv"
+
+# Architecture dependent paths
+export bindir = "${prefix}/bin"
+export sbindir = "${prefix}/bin"
+export libexecdir = "${prefix}/libexec"
+export libdir = "${prefix}/lib"
+export includedir = "${prefix}/include"
+export oldincludedir = "${prefix}/include"
FILES_${PN} = "${prefix}"
FILES_${PN}-dbg += "${prefix}/.debug \
${prefix}/bin/.debug \
- ${prefix}/sbin/.debug \
"
+
diff --git a/classes/tmake.bbclass b/classes/tmake.bbclass
index 05b82e496d..dbd0bf2763 100644
--- a/classes/tmake.bbclass
+++ b/classes/tmake.bbclass
@@ -54,7 +54,7 @@ python tmake_do_createpro() {
}
tmake_do_configure() {
- paths="${STAGING_DATADIR}/tmake/qws/${TARGET_OS}-${TARGET_ARCH}-g++ $STAGING_DIR/share/tmake/$OS-g++"
+ paths="${STAGING_DATADIR}/tmake/qws/${TARGET_OS}-${TARGET_ARCH}-g++ ${STAGING_DATADIR}/tmake/$OS-g++"
if (echo "${TARGET_ARCH}"|grep -q 'i.86'); then
paths="${STAGING_DATADIR}/tmake/qws/${TARGET_OS}-x86-g++ $paths"
fi
diff --git a/classes/xlibs.bbclass b/classes/xlibs.bbclass
index e797748770..ae8f928f1e 100644
--- a/classes/xlibs.bbclass
+++ b/classes/xlibs.bbclass
@@ -6,10 +6,10 @@ XLIBS_CVS = "${FREEDESKTOP_CVS}/xlibs"
inherit autotools pkgconfig
do_stage() {
- oe_runmake install prefix=${STAGING_DIR} \
+ oe_runmake install prefix=${STAGING_DIR_HOST}${layout_prefix} \
bindir=${STAGING_BINDIR} \
includedir=${STAGING_INCDIR} \
libdir=${STAGING_LIBDIR} \
datadir=${STAGING_DATADIR} \
- mandir=${STAGING_DATADIR}/man
+ mandir=${STAGING_DIR_HOST}${layout_mandir}
}