Directories: Staging variables

The following table provides a list of the variables that are used to control the directories into which files are staged.

Staging is used for headers, libraries and binaries that are generated by packages and are to be used in the generation of other packages. For example the libpcre recipe needs to make the include files and libraries for the target available on the host for other applications that depend on libpcre. So in addition to packaging these files up for use in the binary package they are need to be installed in the staging are for use by other packages.

There are two common situations in which you will need to directly refer to the staging directories:

  1. To specify where headers and libraries are to be found for libraries that your package depends on. In some cases these will be found automatically due to the default compiler settings used by OE, but in other cases you will need to explicitly tell your package to look in the staging area. This is more commonly needed with autoconf based packages that check for the presence of a specific package during the configure task.

  2. In the stage task for libraries to specify where to install the headers and libraries.

The following example from libpcre shows the installation of the libraries and headers from the package into the staging area. Note the use of the oe_libinstall helper function for installation of the libraries:

do_stage () {
    oe_libinstall -a -so libpcre ${STAGING_LIBDIR}
    oe_libinstall -a -so libpcreposix ${STAGING_LIBDIR}
    install -m 0644 pcre.h ${STAGING_INCDIR}/
    install -m 0644 pcreposix.h ${STAGING_INCDIR}/
}

The following example from the flac recipe shows the location of the ogg libraries and included before explicitly passed to the configured script via EXTRA_OECONF so that it will correctly find ogg and enable support for it:

EXTRA_OECONF = "--disable-oggtest --disable-id3libtest \
        --with-ogg-libraries=${STAGING_LIBDIR} \
        --with-ogg-includes=${STAGING_INCDIR} \
        --without-xmms-prefix \
        --without-xmms-exec-prefix \
        --without-libiconv-prefix \
        --without-id3lib"

The following table lists the available variables for referring to the staging area:

DirectoryDefinition
STAGING_DIR${TMPDIR}/staging
STAGING_BINDIR${STAGING_DIR}/${HOST_SYS}/bin
STAGING_BINDIR_CROSS${STAGING_DIR}/${BUILD_SYS}/bin/${HOST_SYS}
STAGING_BINDIR_NATIVE${STAGING_DIR}/${BUILD_SYS}/bin
STAGING_LIBDIR${STAGING_DIR}/${HOST_SYS}/lib
STAGING_INCDIR${STAGING_DIR}/${HOST_SYS}/include
STAGING_DATADIR${STAGING_DIR}/${HOST_SYS}/share
STAGING_LOADER_DIR${STAGING_DIR}/${HOST_SYS}/loader
STAGING_FIRMWARE_DIR${STAGING_DIR}/${HOST_SYS}/firmware
STAGING_PYDIR${STAGING_DIR}/lib/python2.4
STAGING_KERNEL_DIR${STAGING_DIR}/${HOST_SYS}/kernel
PKG_CONFIG_PATH${STAGING_LIBDIR}/pkgconfig
QTDIR${STAGING_DIR}/${HOST_SYS}/qt2
QPEDIR${STAGING_DIR}/${HOST_SYS}
OPIEDIR${STAGING_DIR}/${HOST_SYS}