blob: f96197a8f9e4dfda6f1813a15fbe158bba745b90 [file] [log] [blame]
xf.lidf7f8ba2024-09-12 23:53:34 -07001DESCRIPTION = "vb_demo"
2DEPENDS = "libvoice libmedia"
3SECTION = "app"
4LICENSE = "zte"
5PV = "1.0.0"
6PR = "r0"
7
8CLASS_COM = " \
9 ${@bb.utils.contains('DISTRO_FEATURES', 'procd', 'openwrt openwrt-services', '', d)} \
10 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
11"
12inherit ${CLASS_COM}
13
14#配置code路径信息。
15FILESEXTRAPATHS_prepend :="${APP-OPEN-PATH}:"
16SRC_URI = " \
17 file://test/vb_demo \
18 ${@bb.utils.contains("DISTRO_FEATURES", "procd", "file://vb_demo.init","", d)} \
19 ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "file://vb_demo.service","", d)} \
20 "
21LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/zte;md5=c075689d1d1e06d4ab5bbe53623a6808"
22S = "${WORKDIR}"
23S_SRC_PATH = "${S}/test/vb_demo"
24#引用公用头文件和编译选项。
25include ${BSPDIR}/sources/meta-zxic/conf/app_com.inc
26
27#inherit autotools pkgconfig systemd
28
29do_compile() {
30 make -C ${S_SRC_PATH}
31}
32
33do_install () {
34 install -d ${D}${bindir}/
35 install -m 0755 ${S_SRC_PATH}/vb_demo ${D}${bindir}/
36
37 if ${@bb.utils.contains('DISTRO_FEATURES','procd','true','false',d)}; then
38 install -Dm 0755 ${WORKDIR}/vb_demo.init ${D}${sysconfdir}/init.d/vb_demo
39 fi
40
41 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
42 install -d ${D}${systemd_unitdir}/system
43 install -m 0644 ${WORKDIR}/vb_demo.service ${D}${systemd_unitdir}/system
44 fi
45
46 #install elfs
47 install -d ${ELFS-PATH}/
48 install -m 0755 ${S_SRC_PATH}/vb_demo ${ELFS-PATH}/
49}
50
51do_cleanlibs () {
52 rm -fr ${ELFS-PATH}/vb_demo
53}
54
55addtask cleanlibs after do_clean before do_cleansstate
56
57FILES_${PN} = "\
58 ${bindir}/ \
59 ${@bb.utils.contains("DISTRO_FEATURES", "procd", "${sysconfdir}/init.d/vb_demo","", d)} \
60 "
61SYSTEMD_SERVICE_${PN} = "vb_demo.service"
62SYSTEMD_AUTO_ENABLE_${PN} = "disable"
63
64RDEPENDS_${PN} = " libvoice libmedia"