diff options
| -rw-r--r-- | meta/classes/bin_package.bbclass | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/meta/classes/bin_package.bbclass b/meta/classes/bin_package.bbclass new file mode 100644 index 0000000000..a52b75be5c --- /dev/null +++ b/meta/classes/bin_package.bbclass | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | # | ||
| 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 | ||
| 22 | do_configure[noexec] = "1" | ||
| 23 | do_compile[noexec] = "1" | ||
| 24 | |||
| 25 | # Install the files to ${D} | ||
| 26 | bin_package_do_install () { | ||
| 27 | # Do it carefully | ||
| 28 | [ -d "${S}" ] || exit 1 | ||
| 29 | cd ${S} || exit 1 | ||
| 30 | tar --no-same-owner --exclude='./patches' --exclude='./.pc' -cpf - . \ | ||
| 31 | | tar --no-same-owner -xpf - -C ${D} | ||
| 32 | } | ||
| 33 | |||
| 34 | FILES_${PN} = "/" | ||
| 35 | |||
| 36 | EXPORT_FUNCTIONS do_install | ||
