diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-05-01 22:52:57 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-05-21 12:08:04 +0100 |
| commit | d6ae8d2004f8ac3aab4571e0077d406b2d19b542 (patch) | |
| tree | 6fee0cb55968ea21155c7556bcfb56af956eda2c /meta-skeleton | |
| parent | 71c6db8e65ced98db74fd18b726fa4b4c0346f05 (diff) | |
| download | poky-d6ae8d2004f8ac3aab4571e0077d406b2d19b542.tar.gz | |
recipes: Switch away from S = WORKDIR
Where recipes use S = ${WORKDIR}, change them to set UNPACKDIR to
a subdir of WORKDIR and make S point at this instead.
I've chosen not to force S into any standard UNPACKDIR we may pick in
future just so the S = UNPACKDIR case is clearly visible by the
directory naming under WORKDIR as that should aid usability.
(From OE-Core rev: d9328e3b0b062f0621de3d114584b44f384a1c02)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta-skeleton')
3 files changed, 10 insertions, 7 deletions
diff --git a/meta-skeleton/recipes-kernel/hello-mod/hello-mod_0.1.bb b/meta-skeleton/recipes-kernel/hello-mod/hello-mod_0.1.bb index a2fb212a68..79f2e8a092 100644 --- a/meta-skeleton/recipes-kernel/hello-mod/hello-mod_0.1.bb +++ b/meta-skeleton/recipes-kernel/hello-mod/hello-mod_0.1.bb | |||
| @@ -10,7 +10,8 @@ SRC_URI = "file://Makefile \ | |||
| 10 | file://COPYING \ | 10 | file://COPYING \ |
| 11 | " | 11 | " |
| 12 | 12 | ||
| 13 | S = "${WORKDIR}" | 13 | S = "${WORKDIR}/sources" |
| 14 | UNPACKDIR = "${S}" | ||
| 14 | 15 | ||
| 15 | # The inherit of module.bbclass will automatically name module packages with | 16 | # The inherit of module.bbclass will automatically name module packages with |
| 16 | # "kernel-module-" prefix as required by the oe-core build environment. | 17 | # "kernel-module-" prefix as required by the oe-core build environment. |
diff --git a/meta-skeleton/recipes-skeleton/hello-single/hello_1.0.bb b/meta-skeleton/recipes-skeleton/hello-single/hello_1.0.bb index 90d3aefd86..8be7980919 100644 --- a/meta-skeleton/recipes-skeleton/hello-single/hello_1.0.bb +++ b/meta-skeleton/recipes-skeleton/hello-single/hello_1.0.bb | |||
| @@ -5,7 +5,8 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda | |||
| 5 | 5 | ||
| 6 | SRC_URI = "file://helloworld.c" | 6 | SRC_URI = "file://helloworld.c" |
| 7 | 7 | ||
| 8 | S = "${WORKDIR}" | 8 | S = "${WORKDIR}/sources" |
| 9 | UNPACKDIR = "${S}" | ||
| 9 | 10 | ||
| 10 | do_compile() { | 11 | do_compile() { |
| 11 | ${CC} ${LDFLAGS} helloworld.c -o helloworld | 12 | ${CC} ${LDFLAGS} helloworld.c -o helloworld |
diff --git a/meta-skeleton/recipes-skeleton/service/service_0.1.bb b/meta-skeleton/recipes-skeleton/service/service_0.1.bb index 912f6b0f61..54b834d45f 100644 --- a/meta-skeleton/recipes-skeleton/service/service_0.1.bb +++ b/meta-skeleton/recipes-skeleton/service/service_0.1.bb | |||
| @@ -2,22 +2,23 @@ SUMMARY = "The canonical example of init scripts" | |||
| 2 | SECTION = "base" | 2 | SECTION = "base" |
| 3 | DESCRIPTION = "This recipe is a canonical example of init scripts" | 3 | DESCRIPTION = "This recipe is a canonical example of init scripts" |
| 4 | LICENSE = "GPL-2.0-only" | 4 | LICENSE = "GPL-2.0-only" |
| 5 | LIC_FILES_CHKSUM = "file://${WORKDIR}/COPYRIGHT;md5=349c872e0066155e1818b786938876a4" | 5 | LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=349c872e0066155e1818b786938876a4" |
| 6 | 6 | ||
| 7 | SRC_URI = "file://skeleton \ | 7 | SRC_URI = "file://skeleton \ |
| 8 | file://skeleton_test.c \ | 8 | file://skeleton_test.c \ |
| 9 | file://COPYRIGHT \ | 9 | file://COPYRIGHT \ |
| 10 | " | 10 | " |
| 11 | 11 | ||
| 12 | S = "${WORKDIR}" | 12 | S = "${WORKDIR}/sources" |
| 13 | UNPACKDIR = "${S}" | ||
| 13 | 14 | ||
| 14 | do_compile () { | 15 | do_compile () { |
| 15 | ${CC} ${CFLAGS} ${LDFLAGS} ${WORKDIR}/skeleton_test.c -o ${WORKDIR}/skeleton-test | 16 | ${CC} ${CFLAGS} ${LDFLAGS} ${S}/skeleton_test.c -o ${B}/skeleton-test |
| 16 | } | 17 | } |
| 17 | 18 | ||
| 18 | do_install () { | 19 | do_install () { |
| 19 | install -d ${D}${sysconfdir}/init.d | 20 | install -d ${D}${sysconfdir}/init.d |
| 20 | cat ${WORKDIR}/skeleton | \ | 21 | cat ${S}/skeleton | \ |
| 21 | sed -e 's,/etc,${sysconfdir},g' \ | 22 | sed -e 's,/etc,${sysconfdir},g' \ |
| 22 | -e 's,/usr/sbin,${sbindir},g' \ | 23 | -e 's,/usr/sbin,${sbindir},g' \ |
| 23 | -e 's,/var,${localstatedir},g' \ | 24 | -e 's,/var,${localstatedir},g' \ |
| @@ -26,7 +27,7 @@ do_install () { | |||
| 26 | chmod a+x ${D}${sysconfdir}/init.d/skeleton | 27 | chmod a+x ${D}${sysconfdir}/init.d/skeleton |
| 27 | 28 | ||
| 28 | install -d ${D}${sbindir} | 29 | install -d ${D}${sbindir} |
| 29 | install -m 0755 ${WORKDIR}/skeleton-test ${D}${sbindir}/ | 30 | install -m 0755 ${S}/skeleton-test ${D}${sbindir}/ |
| 30 | } | 31 | } |
| 31 | 32 | ||
| 32 | RDEPENDS:${PN} = "initscripts" | 33 | RDEPENDS:${PN} = "initscripts" |
