[OE-core] [PATCH 2/2] bitbake.conf: Define source package, disabled by default

Haris Okanovic haris.okanovic at ni.com
Tue Dec 15 00:25:52 UTC 2015


Add ${PN}-src to PACKAGES with a default set of FILES_{PV}-src
per FHS:
https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#usrsrcSourceCode

Define a staging directory SRC_D under ${D}.

Define ENABLE_SRC_INSTALL to enable source staging via package.bbclass's
do_install_source() task. It's disabled by default, but may be
overridden by distro configs or individual recipes as needed.

This is change is part of a series which add source packages to OE.
See the following thread for more information:
http://thread.gmane.org/gmane.comp.handhelds.openembedded.core/72660

Signed-off-by: Haris Okanovic <haris.okanovic at ni.com>
---
 meta/conf/bitbake.conf | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 06971da..4674288 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -36,6 +36,7 @@ export systemd_unitdir = "${nonarch_base_libdir}/systemd"
 export systemd_system_unitdir = "${nonarch_base_libdir}/systemd/system"
 export nonarch_libdir = "${exec_prefix}/lib"
 export systemd_user_unitdir = "${nonarch_libdir}/systemd/user"
+srcdir = "${prefix}/src"
 
 # Architecture dependent paths
 export bindir = "${exec_prefix}/bin"
@@ -267,7 +268,7 @@ SOLIBSDEV = ".so"
 SOLIBSDEV_darwin = ".dylibbroken"
 
 PACKAGE_BEFORE_PN ?= ""
-PACKAGES = "${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale ${PACKAGE_BEFORE_PN} ${PN}"
+PACKAGES = "${PN}-src ${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale ${PACKAGE_BEFORE_PN} ${PN}"
 PACKAGES_DYNAMIC = "^${PN}-locale-.*"
 FILES = ""
 
@@ -313,6 +314,12 @@ ALLOW_EMPTY_${PN}-dbg = "1"
 
 FILES_${PN}-locale = "${datadir}/locale"
 
+FILES_${PN}-src = "${srcdir}/${PN}"
+SRC_D = "${D}${srcdir}/${PN}"
+
+ENABLE_SRC_INSTALL = "0"
+ENABLE_SRC_INSTALL_${PN} = "${ENABLE_SRC_INSTALL}"
+
 # File manifest
 
 FILE_DIRNAME = "${@os.path.dirname(d.getVar('FILE', False))}"
-- 
2.6.2




More information about the Openembedded-core mailing list