Merge "[Feature][T106][task-view-276]move the fota backup code from source to src"
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-fota-backup/lynq-fota-backup.bb b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-fota-backup/lynq-fota-backup.bb
index b89f7ab..89ed7f6 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-fota-backup/lynq-fota-backup.bb
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-fota-backup/lynq-fota-backup.bb
@@ -2,31 +2,28 @@
 
 DESCRIPTION = "lynq-fota-backup.service"
 
-LICENSE = "MIT"
+LICENSE = "CLOSED"
 ##License checksum file is always required
 LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=c794e8ff1acd3b7f156a6497e780dd54"
 
-SRC_URI = "file://lynq-fota-backup.cpp \
-	   file://lynq-fota-backup.sh \
-	   file://makefile \
-	   file://lynq-fota-backup.service \
-	   file://LICENSE \
-"
+WORKONSRC = "${TOPDIR}/../src/lynq/framework/lynq-fota-backup"
 
-
+FILESEXTRAPATHS_prepend :="${TOPDIR}/../src/lynq/framework/:"
+SRC_URI = " \
+          file://lynq-fota-backup \
+          "
+SRC-DIR = "${S}/../lynq-fota-backup"
 TARGET_CC_ARCH += "${LDFLAGS}"
-
-
 DEPENDS += "liblynq-log liblynq-uci liblynq-qser-fota"
-S = "${WORKDIR}"
+
 #INHIBIT_PACKAGE_STRIP = "1"
 do_compile () {
 
 	
 	if test "${PACKAGE_ARCH}" = "cortexa7hf-vfp-vfpv4-neon" || test "${PACKAGE_ARCH}" = "cortexa7hf-neon-vfpv4"; then
-		oe_runmake all ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -mhard-float"
+		oe_runmake all -C ${SRC-DIR} ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -mhard-float"
 	else
-		oe_runmake all ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST}"
+		oe_runmake all -C ${SRC-DIR} ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST}"
 	fi
 }
 #INHIBIT_PACKAGE_STRIP = "1"
@@ -34,21 +31,16 @@
 
 do_install() {
 	install -d ${D}${bindir}/
-	echo "Installing image PN ${PN}"
-	echo "Installing image systemd_unitdir ${systemd_unitdir}"
-	echo "Installing image D ${D}"
-	echo "Installing image B ${B}"
+	install -m 0755 ${SRC-DIR}/lynq-fota-backup ${D}${bindir}/
 
 	if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
 		install -d ${D}${systemd_unitdir}/system/
 		install -m 0644 ${B}/lynq-fota-backup.service ${D}${systemd_unitdir}/system
     else
 		install -d ${D}${sysconfdir}/init.d
-        	install -m 0755  ${S}/lynq-fota-backup.sh ${D}${sysconfdir}/init.d/
+        	install -m 0755  ${SRC-DIR}/lynq-fota-backup.sh ${D}${sysconfdir}/init.d/
         	install -d ${D}${sysconfdir}/rcS.d
         	ln -s ../init.d/lynq-fota-backup.sh ${D}${sysconfdir}/rcS.d/S82lynq-fota-backup-service
 	fi
 
-	install -m 0755 ${S}/lynq-fota-backup ${D}${bindir}/
-	install -d ${D}${includedir}
 }
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-fota-backup/files/LICENSE b/cap/zx297520v3/src/lynq/framework/lynq-fota-backup/LICENSE
similarity index 100%
rename from cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-fota-backup/files/LICENSE
rename to cap/zx297520v3/src/lynq/framework/lynq-fota-backup/LICENSE
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-fota-backup/files/lynq-fota-backup.cpp b/cap/zx297520v3/src/lynq/framework/lynq-fota-backup/lynq-fota-backup.cpp
similarity index 100%
rename from cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-fota-backup/files/lynq-fota-backup.cpp
rename to cap/zx297520v3/src/lynq/framework/lynq-fota-backup/lynq-fota-backup.cpp
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-fota-backup/files/lynq-fota-backup.service b/cap/zx297520v3/src/lynq/framework/lynq-fota-backup/lynq-fota-backup.service
similarity index 100%
rename from cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-fota-backup/files/lynq-fota-backup.service
rename to cap/zx297520v3/src/lynq/framework/lynq-fota-backup/lynq-fota-backup.service
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-fota-backup/files/lynq-fota-backup.sh b/cap/zx297520v3/src/lynq/framework/lynq-fota-backup/lynq-fota-backup.sh
similarity index 100%
rename from cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-fota-backup/files/lynq-fota-backup.sh
rename to cap/zx297520v3/src/lynq/framework/lynq-fota-backup/lynq-fota-backup.sh
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-fota-backup/files/makefile b/cap/zx297520v3/src/lynq/framework/lynq-fota-backup/makefile
similarity index 100%
rename from cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-fota-backup/files/makefile
rename to cap/zx297520v3/src/lynq/framework/lynq-fota-backup/makefile