summaryrefslogtreecommitdiffstats
path: root/meta/classes-recipe/bin_package.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2022-08-10 14:35:29 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-08-12 15:27:17 +0100
commitfd1517e2b51a170f2427122c6b95396db251d827 (patch)
treedabfe3e631339c2fc99a9ee7febb0f9c128e325e /meta/classes-recipe/bin_package.bbclass
parent10317912ee319ccf7f83605d438b5cbf9663f296 (diff)
downloadpoky-fd1517e2b51a170f2427122c6b95396db251d827.tar.gz
classes: Update classes to match new bitbake class scope functionality
Move classes to classes-global or classes-recipe as appropriate to take advantage of new bitbake functionality to check class scope/usage. (From OE-Core rev: f5c128008365e141082c129417eb72d2751e8045) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes-recipe/bin_package.bbclass')
-rw-r--r--meta/classes-recipe/bin_package.bbclass42
1 files changed, 42 insertions, 0 deletions
diff --git a/meta/classes-recipe/bin_package.bbclass b/meta/classes-recipe/bin_package.bbclass
new file mode 100644
index 0000000000..3a1befc29c
--- /dev/null
+++ b/meta/classes-recipe/bin_package.bbclass
@@ -0,0 +1,42 @@
1#
2# Copyright OpenEmbedded Contributors
3#
4# SPDX-License-Identifier: MIT
5#
6
7# Common variable and task for the binary package recipe.
8# Basic principle:
9# * The files have been unpacked to ${S} by base.bbclass
10# * Skip do_configure and do_compile
11# * Use do_install to install the files to ${D}
12#
13# Note:
14# The "subdir" parameter in the SRC_URI is useful when the input package
15# is rpm, ipk, deb and so on, for example:
16#
17# SRC_URI = "http://foo.com/foo-1.0-r1.i586.rpm;subdir=foo-1.0"
18#
19# Then the files would be unpacked to ${WORKDIR}/foo-1.0, otherwise
20# they would be in ${WORKDIR}.
21#
22
23# Skip the unwanted steps
24do_configure[noexec] = "1"
25do_compile[noexec] = "1"
26
27# Install the files to ${D}
28bin_package_do_install () {
29 # Do it carefully
30 [ -d "${S}" ] || exit 1
31 if [ -z "$(ls -A ${S})" ]; then
32 bbfatal bin_package has nothing to install. Be sure the SRC_URI unpacks into S.
33 fi
34 cd ${S}
35 install -d ${D}${base_prefix}
36 tar --no-same-owner --exclude='./patches' --exclude='./.pc' -cpf - . \
37 | tar --no-same-owner -xpf - -C ${D}${base_prefix}
38}
39
40FILES:${PN} = "/"
41
42EXPORT_FUNCTIONS do_install