xf.li | 742dd02 | 2023-06-08 01:43:32 -0700 | [diff] [blame] | 1 | DESCRIPTION = "rtc_timer_demo" |
| 2 | DEPENDS = "libsctel libscipc libsoftap libnvram libsofttimer" |
| 3 | SECTION = "app" |
| 4 | LICENSE = "zte" |
| 5 | PV = "1.0.0" |
| 6 | PR = "r0" |
| 7 | |
| 8 | CLASS_COM = " \ |
| 9 | ${@bb.utils.contains('DISTRO_FEATURES', 'procd', 'openwrt openwrt-services', '', d)} \ |
| 10 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \ |
| 11 | " |
| 12 | inherit ${CLASS_COM} |
| 13 | |
| 14 | #配置code路径信息。 |
| 15 | FILESEXTRAPATHS_prepend :="${APP-OPEN-PATH}:" |
| 16 | SRC_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 | " |
| 21 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/zte;md5=c075689d1d1e06d4ab5bbe53623a6808" |
| 22 | S = "${WORKDIR}" |
| 23 | S_SRC_PATH = "${S}/test/rtc_timer_demo/" |
| 24 | #引用公用头文件和编译选项。 |
| 25 | include ${BSPDIR}/sources/meta-zxic/conf/app_com.inc |
| 26 | |
| 27 | #inherit autotools pkgconfig systemd |
| 28 | |
| 29 | do_compile() { |
| 30 | make -C ${S_SRC_PATH} |
| 31 | } |
| 32 | |
| 33 | do_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 | |
| 51 | do_cleanlibs () { |
| 52 | rm -fr ${ELFS-PATH}/rtc_timer_demo |
| 53 | } |
| 54 | |
| 55 | addtask cleanlibs after do_clean before do_cleansstate |
| 56 | |
| 57 | FILES_${PN} = "\ |
| 58 | ${bindir}/ \ |
| 59 | ${@bb.utils.contains("DISTRO_FEATURES", "procd", "${sysconfdir}/init.d/rtc_timer_demo","", d)} \ |
| 60 | " |
| 61 | SYSTEMD_SERVICE_${PN} = "rtc_timer_demo.service" |
| 62 | SYSTEMD_AUTO_ENABLE_${PN} = "disable" |
| 63 | |
| 64 | RDEPENDS_${PN} = " libsctel libscipc libsoftap libnvram libsofttimer" |