blob: 61650fad7ad0e876a49f121ca3e6a5220e423ee0 [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001DESCRIPTION = "zxic-debug"
xf.libdd93d52023-05-12 07:10:14 -07002#zxic-debug依赖libnvram库
3DEPENDS = "libnvram"
lh9ed821d2023-04-07 01:36:19 -07004SECTION = "app"
5LICENSE = "zte"
6PV = "1.0.0"
7PR = "r0"
8
9CLASS_COM = " \
10 ${@bb.utils.contains('DISTRO_FEATURES', 'procd', 'openwrt openwrt-services', '', d)} \
11 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
12"
13inherit ${CLASS_COM}
14
15#配置code路径信息。
xf.libdd93d52023-05-12 07:10:14 -070016FILESEXTRAPATHS_prepend :="${APP-OPEN-PATH}/platform:"
lh9ed821d2023-04-07 01:36:19 -070017SRC_URI = " \
18 file://zxic_debug \
xf.lidf7f8ba2024-09-12 23:53:34 -070019 ${@bb.utils.contains("DISTRO_FEATURES", "procd", "file://zxic_debug.init","", d)} \
20 ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "file://zxic_debug.service","", d)} \
lh9ed821d2023-04-07 01:36:19 -070021 ${@bb.utils.contains("DISTRO_FEATURES", "sysvinit", "file://zxic_debug.sysvinit","", d)} \
22 "
23
24LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/zte;md5=c075689d1d1e06d4ab5bbe53623a6808"
25S = "${WORKDIR}"
26
27#引用公用头文件和编译选项。
28include ${BSPDIR}/sources/meta-zxic/conf/app_com.inc
29include ${BSPDIR}/sources/meta-zxic/conf/pub.inc
30CFLAGS_append = "${ZXIC_EXTRA_CFLAGS}"
31
32#编译
33do_compile() {
34 make -C zxic_debug
35}
36
37#库文件的安装
38do_install() {
39 install -d ${D}${bindir}/
40 install -m 0755 ${S}/zxic_debug/zxic_debug ${D}${bindir}/
41
xf.lidf7f8ba2024-09-12 23:53:34 -070042 if ${@bb.utils.contains('DISTRO_FEATURES','procd','true','false',d)}; then
43 install -Dm 0755 ${WORKDIR}/zxic_debug.init ${D}${sysconfdir}/init.d/zxic_debug
44 fi
45
46 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
47 install -d ${D}${systemd_unitdir}/system
48 install -m 0644 ${WORKDIR}/zxic_debug.service ${D}${systemd_unitdir}/system
49 fi
50
lh9ed821d2023-04-07 01:36:19 -070051 if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
52 install -Dm 0755 ${WORKDIR}/zxic_debug.sysvinit ${D}${sysconfdir}/init.d/zxic_debug
53 install -d ${D}${sysconfdir}/rcS.d
xf.libdd93d52023-05-12 07:10:14 -070054 ln -s ../init.d/zxic_debug ${D}${sysconfdir}/rcS.d/S90zxic_debug
xf.lidf7f8ba2024-09-12 23:53:34 -070055 ln -s ../init.d/zxic_debug ${D}${sysconfdir}/rcS.d/K10zxic_debug
lh9ed821d2023-04-07 01:36:19 -070056 fi
57
58 #install elfs
59 install -d ${ELFS-PATH}/
60 install -m 0755 ${S}/zxic_debug/zxic_debug ${ELFS-PATH}/
61}
62#清库
63do_cleanlibs () {
64 rm -fr ${ELFS-PATH}/zxic_debug
65}
66
67addtask cleanlibs after do_clean before do_cleansstate
68
69#rootfs包含的文件
70FILES_${PN} = "\
71 ${bindir}/ \
xf.lidf7f8ba2024-09-12 23:53:34 -070072 ${@bb.utils.contains("DISTRO_FEATURES", "procd", "${sysconfdir}/","", d)} \
73 ${@bb.utils.contains("DISTRO_FEATURES", "sysvinit", "${sysconfdir}/","", d)} \
lh9ed821d2023-04-07 01:36:19 -070074 "
xf.lidf7f8ba2024-09-12 23:53:34 -070075SYSTEMD_SERVICE_${PN} = "zxic_debug.service"
76SYSTEMD_AUTO_ENABLE_${PN} = "enable"
77
78
79