[Feature][ZXW-41] merged 0601 version
Change-Id: I667af6bb09d65581d455b73f8984c160b2c67ad8
diff --git a/cap/zx297520v3/sources/meta-zxic/recipes-app/rtc-timer-demo/rtc-timer-demo.bb b/cap/zx297520v3/sources/meta-zxic/recipes-app/rtc-timer-demo/rtc-timer-demo.bb
new file mode 100755
index 0000000..735e222
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-zxic/recipes-app/rtc-timer-demo/rtc-timer-demo.bb
@@ -0,0 +1,64 @@
+DESCRIPTION = "rtc_timer_demo"
+DEPENDS = "libsctel libscipc libsoftap libnvram libsofttimer"
+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/rtc_timer_demo \
+ ${@bb.utils.contains("DISTRO_FEATURES", "procd", "file://rtc_timer_demo.init","", d)} \
+ ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "file://rtc_timer_demo.service","", d)} \
+ "
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/zte;md5=c075689d1d1e06d4ab5bbe53623a6808"
+S = "${WORKDIR}"
+S_SRC_PATH = "${S}/test/rtc_timer_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}/rtc_timer_demo ${D}${bindir}/
+
+ if ${@bb.utils.contains('DISTRO_FEATURES','procd','true','false',d)}; then
+ install -Dm 0755 ${WORKDIR}/rtc_timer_demo.init ${D}${sysconfdir}/init.d/rtc_timer_demo
+ fi
+
+ if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/rtc_timer_demo.service ${D}${systemd_unitdir}/system
+ fi
+
+ #install elfs
+ install -d ${ELFS-PATH}/
+ install -m 0755 ${S_SRC_PATH}/rtc_timer_demo ${ELFS-PATH}/
+}
+
+do_cleanlibs () {
+ rm -fr ${ELFS-PATH}/rtc_timer_demo
+}
+
+addtask cleanlibs after do_clean before do_cleansstate
+
+FILES_${PN} = "\
+ ${bindir}/ \
+ ${@bb.utils.contains("DISTRO_FEATURES", "procd", "${sysconfdir}/init.d/rtc_timer_demo","", d)} \
+ "
+SYSTEMD_SERVICE_${PN} = "rtc_timer_demo.service"
+SYSTEMD_AUTO_ENABLE_${PN} = "disable"
+
+RDEPENDS_${PN} = " libsctel libscipc libsoftap libnvram libsofttimer"