blob: f0407e13293364cef171aeb1f04b366cadc3f3b9 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001#
2# ex:ts=4:sw=4:sts=4:et
3# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
4#
5# Common variable and task for the binary package recipe.
6# Basic principle:
7# * The files have been unpacked to ${S} by base.bbclass
8# * Skip do_configure and do_compile
9# * Use do_install to install the files to ${D}
10#
11# Note:
12# The "subdir" parameter in the SRC_URI is useful when the input package
13# is rpm, ipk, deb and so on, for example:
14#
15# SRC_URI = "http://foo.com/foo-1.0-r1.i586.rpm;subdir=foo-1.0"
16#
17# Then the files would be unpacked to ${WORKDIR}/foo-1.0, otherwise
18# they would be in ${WORKDIR}.
19#
20
21# Skip the unwanted steps
22do_configure[noexec] = "1"
23do_compile[noexec] = "1"
24
25# Install the files to ${D}
26bin_package_do_install () {
27 # Do it carefully
28 [ -d "${S}" ] || exit 1
Brad Bishop316dfdd2018-06-25 12:45:53 -040029 if [ -z "$(ls -A ${S})" ]; then
30 bbfatal bin_package has nothing to install. Be sure the SRC_URI unpacks into S.
31 fi
32 cd ${S}
Andrew Geissler615f2f12022-07-15 14:00:58 -050033 install -d ${D}${base_prefix}
Patrick Williamsc124f4f2015-09-15 14:41:29 -050034 tar --no-same-owner --exclude='./patches' --exclude='./.pc' -cpf - . \
Andrew Geissler615f2f12022-07-15 14:00:58 -050035 | tar --no-same-owner -xpf - -C ${D}${base_prefix}
Patrick Williamsc124f4f2015-09-15 14:41:29 -050036}
37
Patrick Williams213cb262021-08-07 19:21:33 -050038FILES:${PN} = "/"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050039
40EXPORT_FUNCTIONS do_install