blob: 9dd2489725fa174696df4effa84327e283a0196d [file] [log] [blame]
Patrick Williams92b42cb2022-09-03 06:53:57 -05001#
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
Andrew Geissler5082cc72023-09-11 08:41:39 -040023# Nothing is being built so there is no need for the cross-compiler.
24INHIBIT_DEFAULT_DEPS = "1"
25
Patrick Williams92b42cb2022-09-03 06:53:57 -050026# Skip the unwanted steps
27do_configure[noexec] = "1"
28do_compile[noexec] = "1"
29
30# Install the files to ${D}
31bin_package_do_install () {
32 # Do it carefully
33 [ -d "${S}" ] || exit 1
34 if [ -z "$(ls -A ${S})" ]; then
35 bbfatal bin_package has nothing to install. Be sure the SRC_URI unpacks into S.
36 fi
37 cd ${S}
38 install -d ${D}${base_prefix}
39 tar --no-same-owner --exclude='./patches' --exclude='./.pc' -cpf - . \
40 | tar --no-same-owner -xpf - -C ${D}${base_prefix}
41}
42
43FILES:${PN} = "/"
44
45EXPORT_FUNCTIONS do_install