blob: 03fdc32160f6382743f3a74957964158029904cf [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001DESCRIPTION = "fluxstat"
2#fluxstat依赖libnvram库
3DEPENDS = "libnvram libsoftap libsofttimer"
4SECTION = "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://fluxstat \
19 ${@bb.utils.contains("DISTRO_FEATURES", "procd", "file://fluxstat.init","", d)} \
20 ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "file://fluxstat.service","", d)} \
21 ${@bb.utils.contains("DISTRO_FEATURES", "sysvinit", "file://fluxstat.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
29
30#编译
31do_compile() {
32 make -C fluxstat
33}
34
35#库文件的安装,封库的宏MK_SDK_VERSION
36do_install () {
37 install -d ${D}${bindir}/
38 install -m 0755 ${S}/fluxstat/fluxstat ${D}${bindir}/
39
40 if ${@bb.utils.contains('DISTRO_FEATURES','procd','true','false',d)}; then
41 install -Dm 0755 ${WORKDIR}/fluxstat.init ${D}${sysconfdir}/init.d/fluxstat
42 fi
43
44 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
45 install -d ${D}${systemd_unitdir}/system
46 install -m 0644 ${WORKDIR}/fluxstat.service ${D}${systemd_unitdir}/system
47 fi
48
49 if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
50 install -Dm 0755 ${WORKDIR}/fluxstat.sysvinit ${D}${sysconfdir}/init.d/fluxstat
51 install -d ${D}${sysconfdir}/rcS.d
52 ln -s ../init.d/fluxstat ${D}${sysconfdir}/rcS.d/S24fluxstat
53 fi
54
55 #install elfs
56 install -d ${ELFS-PATH}/
57 install -m 0755 ${S}/fluxstat/fluxstat ${ELFS-PATH}/
58}
59#清库
60do_cleanlibs () {
61 rm -fr ${ELFS-PATH}/fluxstat
62}
63
64addtask cleanlibs after do_clean before do_cleansstate
65
66#rootfs包含的文件
67FILES_${PN} = "\
68 ${bindir}/ \
69 ${@bb.utils.contains("DISTRO_FEATURES", "procd", "${sysconfdir}/init.d/fluxstat","", d)} \
70 ${@bb.utils.contains("DISTRO_FEATURES", "sysvinit", "${sysconfdir}/","", d)} \
71 "
72SYSTEMD_SERVICE_${PN} = "fluxstat.service"
lh758261d2023-07-13 05:52:04 -070073SYSTEMD_AUTO_ENABLE_${PN} = "enable"
lh9ed821d2023-04-07 01:36:19 -070074
75RDEPENDS_${PN} = " libnvram libsoftap libsofttimer"