Skip to content

Commit 2e17cc4

Browse files
camxlib-lemans: Make file installation conditional for source-based builds (#1591)
Added checks for installing files conditionally to support chicdk source compilation
2 parents b0630ff + 835ecd7 commit 2e17cc4

File tree

2 files changed

+20
-17
lines changed

2 files changed

+20
-17
lines changed

dynamic-layers/openembedded-layer/recipes-multimedia/camx/camxlib-lemans_1.0.12.bb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ SRC_URI[chicdk.sha256sum] = "a7eb5b2161ccfc091fac513f40966a3ca13cb952eb206c
99
SRC_URI[camxcommon.sha256sum] = "2a78ffe1a6d475d77640d0e70ed730e6a88ea19337cb8e31f6dc9c7e8083385a"
1010

1111
do_install:append() {
12-
install -d ${D}${sysconfdir}/camera/test/NHX/
13-
14-
cp -r ${S}/etc/camera/test/NHX/*.json ${D}${sysconfdir}/camera/test/NHX/
12+
# Copy json only when /etc folder exists in ${S}
13+
if [ -d "${S}/etc" ]; then
14+
install -d ${D}${sysconfdir}/camera/test/NHX/
15+
cp -r ${S}/etc/camera/test/NHX/*.json ${D}${sysconfdir}/camera/test/NHX/
16+
fi
1517
}
1618

1719
RPROVIDES:${PN} = "camxlib-monaco"

dynamic-layers/openembedded-layer/recipes-multimedia/camx/common.inc

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,18 @@ DEPENDS += "glib-2.0 fastrpc protobuf-camx libxml2"
3131
COMPATIBLE_MACHINE = "^$"
3232
COMPATIBLE_MACHINE:aarch64 = "(.*)"
3333

34-
# Prebuilt binaries: skip configure/compile
35-
do_configure[noexec] = "1"
36-
do_compile[noexec] = "1"
37-
3834
do_install() {
3935
install -d ${D}${libdir}
40-
install -d ${D}${bindir}
4136
install -d ${D}${datadir}/doc/${BPN}
4237
install -d ${D}${datadir}/doc/camx-${PLATFORM}
4338
install -d ${D}${datadir}/doc/chicdk-${PLATFORM}
4439

4540
cp -r ${S}/usr/lib/* ${D}${libdir}
46-
cp -r ${S}/usr/bin/* ${D}${bindir}
47-
41+
# Install bin files only if /usr/bin exists in ${S}
42+
if [ -d "${S}${bindir}" ]; then
43+
install -d ${D}${bindir}
44+
cp -r ${S}/usr/bin/* ${D}${bindir}
45+
fi
4846
# Remove unnecessary development symlinks (.so) from the staged image
4947
rm -f ${D}${libdir}/camx/${PLATFORM}/*${SOLIBSDEV}
5048
rm -f ${D}${libdir}/camx/${PLATFORM}/camera/components/*${SOLIBSDEV}
@@ -63,11 +61,13 @@ do_install() {
6361
install -m 0644 ${S}/usr/share/doc/${BPN}/LICENSE.QCOM-2.txt \
6462
${D}${datadir}/doc/camx-${PLATFORM}
6563

66-
# chicdk docs
67-
install -m 0644 ${S}/usr/share/doc/chicdk-${PLATFORM}/NOTICE \
68-
${D}${datadir}/doc/chicdk-${PLATFORM}
69-
install -m 0644 ${S}/usr/share/doc/${BPN}/LICENSE.QCOM-2.txt \
70-
${D}${datadir}/doc/chicdk-${PLATFORM}
64+
# install chicdk docs only if /usr/share/doc/chicdk-${PLATFORM} exists in ${S}
65+
if [ -d "${S}/usr/share/doc/chicdk-${PLATFORM}" ]; then
66+
install -m 0644 ${S}/usr/share/doc/chicdk-${PLATFORM}/NOTICE \
67+
${D}${datadir}/doc/chicdk-${PLATFORM}
68+
install -m 0644 ${S}/usr/share/doc/${BPN}/LICENSE.QCOM-2.txt \
69+
${D}${datadir}/doc/chicdk-${PLATFORM}
70+
fi
7171
}
7272

7373

@@ -91,7 +91,7 @@ FILES:chicdk-${PLATFORM} = "\
9191
${libdir}/camx/${PLATFORM}/libcommonchiutils*${SOLIBS} \
9292
${libdir}/camx/${PLATFORM}/libiccprofile*${SOLIBS} \
9393
${libdir}/camx/${PLATFORM}/com.qti.chiusecaseselector*${SOLIBS} \
94-
${libdir}/camx/${PLATFORM}/camera/components/com.qti.node*${SOLIBS} \
94+
${libdir}/camx/${PLATFORM}/camera/components/com.qti*${SOLIBS} \
9595
${libdir}/camx/${PLATFORM}/camera/com.qti.sensormodule*${SOLIBS} \
9696
${libdir}/camx/${PLATFORM}/camera/*.bin \
9797
${libdir}/camx/${PLATFORM}/camera/com.qti.sensor*${SOLIBS} \
@@ -103,13 +103,14 @@ FILES:${PN} = "\
103103
${libdir}/libcamera_metadata_${PLATFORM}*${SOLIBS} \
104104
${libdir}/camx/${PLATFORM}/*${SOLIBS} \
105105
${libdir}/camx/${PLATFORM}/camera/components/com.qti.node.swregistration*${SOLIBS} \
106-
${libdir}/camx/${PLATFORM}/hw/*${SOLIBS} \
107106
${libdir}/camx/${PLATFORM}/camera/components/*${SOLIBS} \
108107
"
109108

110109
FILES:${PN}-dev = "\
111110
${libdir}/*${SOLIBSDEV} \
112111
"
113112

113+
FILES:${PN}-staticdev = "${libdir}/camx/${PLATFORM}/*.a"
114+
114115
# Preserve ${PN} naming to avoid ambiguity in package identification.
115116
DEBIAN_NOAUTONAME:${PN} = "1"

0 commit comments

Comments
 (0)