blob: 12ea54bb84575296da0e626f1b5354eaff4373b8 [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001DESCRIPTION = "at_ctl"
xf.li9d1a0e12023-09-20 01:43:20 -07002DEPENDS = "libnvram libsoftap libsofttimer libatutils sqlcipher libatext libmxml libtelsvr libsd-daemon"
lh9ed821d2023-04-07 01:36:19 -07003SECTION = "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
15DEPENDS += " \
16 ${@bb.utils.contains('DISTRO_FEATURES', 'volte', 'libvoice', '', d)} \
17 "
18
19#配置code路径信息。
xf.libdd93d52023-05-12 07:10:14 -070020FILESEXTRAPATHS_prepend :="${APP-OPEN-PATH}/platform:"
lh9ed821d2023-04-07 01:36:19 -070021SRC_URI = " \
22 file://at_ctl \
23 ${@bb.utils.contains("DISTRO_FEATURES", "procd", "file://at_ctl.init","", d)} \
24 ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "file://at_ctl.service","", d)} \
25 ${@bb.utils.contains("DISTRO_FEATURES", "sysvinit", "file://at_ctl.sysvinit","", d)} \
26 file://preconfigured_urs_policy.xml \
27 "
28LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/zte;md5=c075689d1d1e06d4ab5bbe53623a6808"
29S = "${WORKDIR}"
30S_SRC_PATH = "${S}/at_ctl"
31
32#引用公用头文件和编译选项。
33include ${BSPDIR}/sources/meta-zxic/conf/app_com.inc
34include ${BSPDIR}/sources/meta-zxic/conf/pub.inc
xf.libdd93d52023-05-12 07:10:14 -070035CFLAGS_append = "-I ${BSPDIR}/zxic_code/zxic_source/zxic_app_open/platform/at_ctl/src/phone/inc"
lh9ed821d2023-04-07 01:36:19 -070036CFLAGS_append += "${ZXIC_EXTRA_CFLAGS}"
37LDLIBS_EXT = "${@bb.utils.contains('DISTRO_FEATURES', 'volte', '-lvoice', '', d)}"
38#include at-ctl.inc
39
40#inherit autotools pkgconfig systemd
41
42do_compile() {
43 make -C ${S_SRC_PATH} LDLIBS_EXT=${LDLIBS_EXT}
44}
45
46do_install () {
47 install -d ${D}${bindir}/
48 install -m 0755 ${S_SRC_PATH}/at_ctl ${D}${bindir}/
49
50 if ${@bb.utils.contains('DISTRO_FEATURES','procd','true','false',d)}; then
51 install -Dm 0755 ${WORKDIR}/at_ctl.init ${D}${sysconfdir}/init.d/at_ctl
52 fi
53
54 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
55 install -d ${D}${systemd_unitdir}/system
56 install -m 0644 ${WORKDIR}/at_ctl.service ${D}${systemd_unitdir}/system
57 fi
58
59 if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
60 install -Dm 0755 ${WORKDIR}/at_ctl.sysvinit ${D}${sysconfdir}/init.d/at_ctl
61 install -d ${D}${sysconfdir}/rcS.d
62 ln -s ../init.d/at_ctl ${D}${sysconfdir}/rcS.d/S20at_ctl
xf.li9d1a0e12023-09-20 01:43:20 -070063 ln -s ../init.d/at_ctl ${D}${sysconfdir}/rcS.d/K80at_ctl
lh9ed821d2023-04-07 01:36:19 -070064 fi
65
66 install -d ${D}/etc_ro/config/
67 install -m 0644 ${WORKDIR}/preconfigured_urs_policy.xml ${D}/etc_ro/config/
68
69 #install elfs
70 install -d ${ELFS-PATH}/
71 #install -m 0755 ${S_SRC_PATH}/at_ctl ${ELFS-PATH}/${PN}/
72 install -m 0755 ${S_SRC_PATH}/at_ctl ${ELFS-PATH}/
73}
74
75do_cleanlibs () {
76 rm -fr ${ELFS-PATH}/at_ctl
77}
78
79addtask cleanlibs after do_clean before do_cleansstate
80
81FILES_${PN} = "\
82 ${bindir}/ \
83 ${@bb.utils.contains("DISTRO_FEATURES", "procd", "${sysconfdir}/init.d/at_ctl","", d)} \
84 ${@bb.utils.contains("DISTRO_FEATURES", "sysvinit", "${sysconfdir}/","", d)} \
85 etc_ro/ \
86 "
87SYSTEMD_SERVICE_${PN} = "at_ctl.service"
88SYSTEMD_AUTO_ENABLE_${PN} = "enable"
89
xf.li9d1a0e12023-09-20 01:43:20 -070090RDEPENDS_${PN} = " libnvram libsoftap libsofttimer libatutils sqlcipher libatext libmxml libvoice libsd-daemon"