Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 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 | |
Andrew Geissler | 5082cc7 | 2023-09-11 08:41:39 -0400 | [diff] [blame] | 23 | # Nothing is being built so there is no need for the cross-compiler. |
| 24 | INHIBIT_DEFAULT_DEPS = "1" |
| 25 | |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 26 | # Skip the unwanted steps |
| 27 | do_configure[noexec] = "1" |
| 28 | do_compile[noexec] = "1" |
| 29 | |
| 30 | # Install the files to ${D} |
| 31 | bin_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 | |
| 43 | FILES:${PN} = "/" |
| 44 | |
| 45 | EXPORT_FUNCTIONS do_install |