blob: 735e22286f8a5f4c75d894364366dfa420b8a086 [file] [log] [blame]
xf.li742dd022023-06-08 01:43:32 -07001DESCRIPTION = "rtc_timer_demo"
2DEPENDS = "libsctel libscipc libsoftap libnvram libsofttimer"
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/rtc_timer_demo \
18 ${@bb.utils.contains("DISTRO_FEATURES", "procd", "file://rtc_timer_demo.init","", d)} \
19 ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "file://rtc_timer_demo.service","", d)} \
20 "
21LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/zte;md5=c075689d1d1e06d4ab5bbe53623a6808"
22S = "${WORKDIR}"
23S_SRC_PATH = "${S}/test/rtc_timer_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}/rtc_timer_demo ${D}${bindir}/
36
37 if ${@bb.utils.contains('DISTRO_FEATURES','procd','true','false',d)}; then
38 install -Dm 0755 ${WORKDIR}/rtc_timer_demo.init ${D}${sysconfdir}/init.d/rtc_timer_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}/rtc_timer_demo.service ${D}${systemd_unitdir}/system
44 fi
45
46 #install elfs
47 install -d ${ELFS-PATH}/
48 install -m 0755 ${S_SRC_PATH}/rtc_timer_demo ${ELFS-PATH}/
49}
50
51do_cleanlibs () {
52 rm -fr ${ELFS-PATH}/rtc_timer_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/rtc_timer_demo","", d)} \
60 "
61SYSTEMD_SERVICE_${PN} = "rtc_timer_demo.service"
62SYSTEMD_AUTO_ENABLE_${PN} = "disable"
63
64RDEPENDS_${PN} = " libsctel libscipc libsoftap libnvram libsofttimer"