[Feature][task-view-306]merge P56U08(patch6) version

Only Configure: No
Affected branch: master
Affected module: unknow
Is it affected on both ZXIC and MTK: only ZXIC
Self-test: Yes
Doc Update: No

Change-Id: I8e809511ac30c97228dd110c304b4a08f4af36d7
diff --git a/cap/zx297520v3/sources/meta-zxic/recipes-app/vb-demo/vb-demo.bb b/cap/zx297520v3/sources/meta-zxic/recipes-app/vb-demo/vb-demo.bb
new file mode 100755
index 0000000..f96197a
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-zxic/recipes-app/vb-demo/vb-demo.bb
@@ -0,0 +1,64 @@
+DESCRIPTION = "vb_demo"
+DEPENDS     = "libvoice libmedia"
+SECTION     = "app"
+LICENSE     = "zte"
+PV = "1.0.0"
+PR = "r0"
+
+CLASS_COM = " \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'procd', 'openwrt openwrt-services', '', d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
+"
+inherit ${CLASS_COM}
+
+#配置code路径信息。
+FILESEXTRAPATHS_prepend :="${APP-OPEN-PATH}:"
+SRC_URI = " \
+          file://test/vb_demo \		  
+		  ${@bb.utils.contains("DISTRO_FEATURES", "procd", "file://vb_demo.init","", d)} \
+		  ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "file://vb_demo.service","", d)} \
+          "
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/zte;md5=c075689d1d1e06d4ab5bbe53623a6808"
+S = "${WORKDIR}"
+S_SRC_PATH = "${S}/test/vb_demo"
+#引用公用头文件和编译选项。
+include ${BSPDIR}/sources/meta-zxic/conf/app_com.inc
+
+#inherit autotools pkgconfig systemd
+
+do_compile() {
+	make -C ${S_SRC_PATH}
+}
+
+do_install () {
+	install -d ${D}${bindir}/
+	install -m 0755 ${S_SRC_PATH}/vb_demo ${D}${bindir}/
+	
+	if ${@bb.utils.contains('DISTRO_FEATURES','procd','true','false',d)}; then
+		install -Dm 0755 ${WORKDIR}/vb_demo.init ${D}${sysconfdir}/init.d/vb_demo
+	fi
+
+	if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+		install -d ${D}${systemd_unitdir}/system
+		install -m 0644 ${WORKDIR}/vb_demo.service ${D}${systemd_unitdir}/system
+	fi
+	
+	#install elfs
+	install -d ${ELFS-PATH}/
+	install -m 0755 ${S_SRC_PATH}/vb_demo ${ELFS-PATH}/	
+}
+
+do_cleanlibs () {
+	rm -fr ${ELFS-PATH}/vb_demo
+}
+
+addtask  cleanlibs after do_clean  before do_cleansstate
+
+FILES_${PN} = "\
+    ${bindir}/ \
+    ${@bb.utils.contains("DISTRO_FEATURES", "procd", "${sysconfdir}/init.d/vb_demo","", d)} \
+    "
+SYSTEMD_SERVICE_${PN}     = "vb_demo.service"
+SYSTEMD_AUTO_ENABLE_${PN} = "disable"
+
+RDEPENDS_${PN} = " libvoice libmedia"