From d6ae8d2004f8ac3aab4571e0077d406b2d19b542 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 1 May 2024 22:52:57 +0100 Subject: 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 --- meta-skeleton/recipes-kernel/hello-mod/hello-mod_0.1.bb | 3 ++- meta-skeleton/recipes-skeleton/hello-single/hello_1.0.bb | 3 ++- meta-skeleton/recipes-skeleton/service/service_0.1.bb | 11 ++++++----- 3 files changed, 10 insertions(+), 7 deletions(-) (limited to 'meta-skeleton') 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 \ file://COPYING \ " -S = "${WORKDIR}" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" # The inherit of module.bbclass will automatically name module packages with # "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 SRC_URI = "file://helloworld.c" -S = "${WORKDIR}" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" do_compile() { ${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" SECTION = "base" DESCRIPTION = "This recipe is a canonical example of init scripts" LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://${WORKDIR}/COPYRIGHT;md5=349c872e0066155e1818b786938876a4" +LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=349c872e0066155e1818b786938876a4" SRC_URI = "file://skeleton \ file://skeleton_test.c \ file://COPYRIGHT \ " -S = "${WORKDIR}" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" do_compile () { - ${CC} ${CFLAGS} ${LDFLAGS} ${WORKDIR}/skeleton_test.c -o ${WORKDIR}/skeleton-test + ${CC} ${CFLAGS} ${LDFLAGS} ${S}/skeleton_test.c -o ${B}/skeleton-test } do_install () { install -d ${D}${sysconfdir}/init.d - cat ${WORKDIR}/skeleton | \ + cat ${S}/skeleton | \ sed -e 's,/etc,${sysconfdir},g' \ -e 's,/usr/sbin,${sbindir},g' \ -e 's,/var,${localstatedir},g' \ @@ -26,7 +27,7 @@ do_install () { chmod a+x ${D}${sysconfdir}/init.d/skeleton install -d ${D}${sbindir} - install -m 0755 ${WORKDIR}/skeleton-test ${D}${sbindir}/ + install -m 0755 ${S}/skeleton-test ${D}${sbindir}/ } RDEPENDS:${PN} = "initscripts" -- cgit v1.2.3-54-g00ecf