blob: 2b9b27a19de51f3dd59d36c4cd22a1b6f787b8aa [file] [log] [blame]
xf.li742dd022023-06-08 01:43:32 -07001DESCRIPTION = "sc_net_test"
2DEPENDS = "libsctel libsoftap libatutils libsofttimer libnvram libscipc"
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/sc_net_test \
18 ${@bb.utils.contains("DISTRO_FEATURES", "procd", "file://sc_net_test.init","", d)} \
19 ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "file://sc_net_test.service","", d)} \
20 "
21LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/zte;md5=c075689d1d1e06d4ab5bbe53623a6808"
22S = "${WORKDIR}"
23S_SRC_PATH = "${S}/test/sc_net_test"
24#引用公用头文件和编译选项。
25include ${BSPDIR}/sources/meta-zxic/conf/app_com.inc
26#include +=
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}/sc_net_test ${D}${bindir}/
36
37 if ${@bb.utils.contains('DISTRO_FEATURES','procd','true','false',d)}; then
38 install -Dm 0755 ${WORKDIR}/sc_net_test.init ${D}${sysconfdir}/init.d/sc_net_test
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}/sc_net_test.service ${D}${systemd_unitdir}/system
44 fi
45
46 #install elfs
47 install -d ${ELFS-PATH}/
48 install -m 0755 ${S_SRC_PATH}/sc_net_test ${ELFS-PATH}/
49}
50
51do_cleanlibs () {
52 rm -fr ${ELFS-PATH}/sc_net_test
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/sc_net_test","", d)} \
60 "
61SYSTEMD_SERVICE_${PN} = "sc_net_test.service"
62SYSTEMD_AUTO_ENABLE_${PN} = "disable"
63
64RDEPENDS_${PN} = "libsctel libsoftap libatutils libsofttimer libnvram libscipc"