mirror of
https://git.yoctoproject.org/poky
synced 2026-05-09 17:39:31 +00:00
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>
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user