Difference between revisions of "Directories and installation variables"

From KoanSoftware Wiki
Jump to: navigation, search
(Yocto Project Openembedded directories installation variables)
 
(One intermediate revision by the same user not shown)
Line 5: Line 5:
 
These variables can be used directly by the recipe to refer to paths that will be used after the package is installed.
 
These variables can be used directly by the recipe to refer to paths that will be used after the package is installed.
  
  Variable name Definition         Typical value
+
  Variable name           Definition                 Typical value
  ------------- --------------------   --------------------
+
  ---------------------  ------------------------   --------------------
  prefix         /usr                   /usr
+
  prefix                 /usr                       /usr
  base_prefix (empty)                 (empty)
+
  base_prefix             (empty)                   (empty)
  exec_prefix ${base_prefix}         (empty)
+
  exec_prefix             ${base_prefix}             (empty)
  base_bindir ${base_prefix}/bin /bin
+
  base_bindir             ${base_prefix}/bin         /bin
  base_sbindir ${base_prefix}/sbin /sbin
+
  base_sbindir           ${base_prefix}/sbin       /sbin
  base_libdir ${base_prefix}/lib /lib
+
  base_libdir             ${base_prefix}/lib         /lib
  datadir       ${prefix}/share         /usr/share
+
  datadir                 ${prefix}/share           /usr/share
  sysconfdir /etc                 /etc
+
  sysconfdir             /etc                       /etc
  localstatedir /var                 /var
+
  localstatedir           /var                       /var
  infodir       ${datadir}/info         /usr/share/info
+
  infodir                 ${datadir}/info           /usr/share/info
  mandir         ${datadir}/man         /usr/share/man
+
  mandir                 ${datadir}/man             /usr/share/man
  docdir         ${datadir}/doc         /usr/share/doc
+
  docdir                 ${datadir}/doc             /usr/share/doc
  servicedir /srv                 /srv
+
  servicedir             /srv                       /srv
  bindir         ${exec_prefix}/bin /usr/bin
+
  bindir                 ${exec_prefix}/bin         /usr/bin
  sbindir       ${exec_prefix}/sbin /usr/sbin
+
  sbindir                 ${exec_prefix}/sbin       /usr/sbin
  libexecdir ${exec_prefix}/libexec /usr/libexec
+
  libexecdir             ${exec_prefix}/libexec     /usr/libexec
  libdir         ${exec_prefix}/lib /usr/lib
+
  libdir                 ${exec_prefix}/lib         /usr/lib
  includedir ${exec_prefix}/include /usr/include
+
  includedir             ${exec_prefix}/include     /usr/include
  palmtopdir ${libdir}/opie         /usr/lib/opie
+
  palmtopdir             ${libdir}/opie             /usr/lib/opie
  palmqtdir ${palmtopdir}         /usr/lib/opie
+
  palmqtdir               ${palmtopdir}             /usr/lib/opie
 +
systemd_unitdir         ${systemd_unitdir}        /usr/lib/systemd
 +
systemd_system_unitdir  ${systemd_system_unitdir}  /usr/lib/systemd/system
 +
systemd_user_unitdir    ${systemd_user_unitdir}    /usr/lib/systemd/user
  
When using these variables to actually install the components of a package from within
+
When specifying paths as part of the FILES variable, it is good practice to use appropriate path variables.
a bitbake recipe they should used relative to the destination directory
 
  
A more detailed list is available into the sources
+
For example, use ${sysconfdir} rather than /etc, or ${bindir} rather than /usr/bin.
 +
 
 +
You can find a list of these variables at the top of the meta/conf/bitbake.conf file in the Source Directory.
 +
 
 +
You will also find the default values of the various FILES:* variables in this file.
 
https://git.yoctoproject.org/cgit.cgi/poky/plain/meta/conf/bitbake.conf
 
https://git.yoctoproject.org/cgit.cgi/poky/plain/meta/conf/bitbake.conf

Latest revision as of 07:15, 14 October 2024

Yocto Project Openembedded directories installation variables

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

These variables can be used directly by the recipe to refer to paths that will be used after the package is installed.

Variable name           Definition                 Typical value
---------------------   ------------------------   --------------------
prefix                  /usr                       /usr
base_prefix             (empty)                    (empty)
exec_prefix             ${base_prefix}             (empty)
base_bindir             ${base_prefix}/bin         /bin
base_sbindir            ${base_prefix}/sbin        /sbin
base_libdir             ${base_prefix}/lib         /lib
datadir                 ${prefix}/share            /usr/share
sysconfdir              /etc                       /etc
localstatedir           /var                       /var
infodir                 ${datadir}/info            /usr/share/info
mandir                  ${datadir}/man             /usr/share/man
docdir                  ${datadir}/doc             /usr/share/doc
servicedir              /srv                       /srv
bindir                  ${exec_prefix}/bin         /usr/bin
sbindir                 ${exec_prefix}/sbin        /usr/sbin
libexecdir              ${exec_prefix}/libexec     /usr/libexec
libdir                  ${exec_prefix}/lib         /usr/lib
includedir              ${exec_prefix}/include     /usr/include
palmtopdir              ${libdir}/opie             /usr/lib/opie
palmqtdir               ${palmtopdir}              /usr/lib/opie
systemd_unitdir         ${systemd_unitdir}         /usr/lib/systemd
systemd_system_unitdir  ${systemd_system_unitdir}  /usr/lib/systemd/system
systemd_user_unitdir    ${systemd_user_unitdir}    /usr/lib/systemd/user

When specifying paths as part of the FILES variable, it is good practice to use appropriate path variables.

For example, use ${sysconfdir} rather than /etc, or ${bindir} rather than /usr/bin.

You can find a list of these variables at the top of the meta/conf/bitbake.conf file in the Source Directory.

You will also find the default values of the various FILES:* variables in this file. https://git.yoctoproject.org/cgit.cgi/poky/plain/meta/conf/bitbake.conf