diff options
author | Michael Opdenacker <michael.opdenacker@bootlin.com> | 2021-07-29 15:34:51 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-08-02 15:44:11 +0100 |
commit | 3778e45af976741083b52f38e22ad0d075282584 (patch) | |
tree | 5f6e8e26a1d8da13d7c53b3424fe7303a8d00591 /meta-skeleton/recipes-skeleton | |
parent | 697d460090a52f066b48f49b013eba35f3fa809b (diff) | |
download | poky-3778e45af976741083b52f38e22ad0d075282584.tar.gz |
meta-skeleton: add recipe examples from documentation sources
This adds three examples previously located in the yocto-docs
repository (under documentation/ref-manual/examples).
The examples were not used for building the documentation
so it's better to keep them here where they can automatically be
tested.
Fixed the "hello-single" to add a version number to the .bb file.
After this, all examples build fine with the "master" branch of Poky.
Note that the "mtd-utils" example, and example of a recipe
for an Autotools page, was not copied over. It doesn't build any
more, and anyway, we already have an official recipe for a recent version
of "mtd-utils" in OE-core.
(From OE-Core rev: a186c746e431831ccbd459be2175cdaa7ed42a54)
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta-skeleton/recipes-skeleton')
4 files changed, 48 insertions, 0 deletions
diff --git a/meta-skeleton/recipes-skeleton/hello-autotools/hello_2.10.bb b/meta-skeleton/recipes-skeleton/hello-autotools/hello_2.10.bb new file mode 100644 index 0000000000..aa2beb9a9b --- /dev/null +++ b/meta-skeleton/recipes-skeleton/hello-autotools/hello_2.10.bb | |||
@@ -0,0 +1,9 @@ | |||
1 | DESCRIPTION = "GNU Helloworld application" | ||
2 | SECTION = "examples" | ||
3 | LICENSE = "GPLv3" | ||
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" | ||
5 | |||
6 | SRC_URI = "${GNU_MIRROR}/hello/hello-${PV}.tar.gz" | ||
7 | SRC_URI[sha256sum] = "31e066137a962676e89f69d1b65382de95a7ef7d914b8cb956f41ea72e0f516b" | ||
8 | |||
9 | inherit autotools-brokensep gettext | ||
diff --git a/meta-skeleton/recipes-skeleton/hello-single/files/helloworld.c b/meta-skeleton/recipes-skeleton/hello-single/files/helloworld.c new file mode 100644 index 0000000000..fc7169b7b8 --- /dev/null +++ b/meta-skeleton/recipes-skeleton/hello-single/files/helloworld.c | |||
@@ -0,0 +1,8 @@ | |||
1 | #include <stdio.h> | ||
2 | |||
3 | int main(void) | ||
4 | { | ||
5 | printf("Hello world!\n"); | ||
6 | |||
7 | return 0; | ||
8 | } | ||
diff --git a/meta-skeleton/recipes-skeleton/hello-single/hello_1.0.bb b/meta-skeleton/recipes-skeleton/hello-single/hello_1.0.bb new file mode 100644 index 0000000000..90d3aefd86 --- /dev/null +++ b/meta-skeleton/recipes-skeleton/hello-single/hello_1.0.bb | |||
@@ -0,0 +1,17 @@ | |||
1 | DESCRIPTION = "Simple helloworld application" | ||
2 | SECTION = "examples" | ||
3 | LICENSE = "MIT" | ||
4 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
5 | |||
6 | SRC_URI = "file://helloworld.c" | ||
7 | |||
8 | S = "${WORKDIR}" | ||
9 | |||
10 | do_compile() { | ||
11 | ${CC} ${LDFLAGS} helloworld.c -o helloworld | ||
12 | } | ||
13 | |||
14 | do_install() { | ||
15 | install -d ${D}${bindir} | ||
16 | install -m 0755 helloworld ${D}${bindir} | ||
17 | } | ||
diff --git a/meta-skeleton/recipes-skeleton/libxpm/libxpm_3.5.6.bb b/meta-skeleton/recipes-skeleton/libxpm/libxpm_3.5.6.bb new file mode 100644 index 0000000000..a1ad2e87d4 --- /dev/null +++ b/meta-skeleton/recipes-skeleton/libxpm/libxpm_3.5.6.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | require recipes-graphics/xorg-lib/xorg-lib-common.inc | ||
2 | |||
3 | DESCRIPTION = "X11 Pixmap library" | ||
4 | LICENSE = "X-BSD" | ||
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=3e07763d16963c3af12db271a31abaa5" | ||
6 | DEPENDS += "libxext" | ||
7 | PR = "r2" | ||
8 | PE = "1" | ||
9 | |||
10 | XORG_PN = "libXpm" | ||
11 | |||
12 | PACKAGES =+ "sxpm cxpm" | ||
13 | FILES:cxpm = "${bindir}/cxpm" | ||
14 | FILES:sxpm = "${bindir}/sxpm" | ||