lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | DESCRIPTION = "at_ctl" |
xf.li | 9d1a0e1 | 2023-09-20 01:43:20 -0700 | [diff] [blame] | 2 | DEPENDS = "libnvram libsoftap libsofttimer libatutils sqlcipher libatext libmxml libtelsvr libsd-daemon" |
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 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 | |
| 15 | DEPENDS += " \ |
| 16 | ${@bb.utils.contains('DISTRO_FEATURES', 'volte', 'libvoice', '', d)} \ |
| 17 | " |
| 18 | |
| 19 | #配置code路径信息。 |
xf.li | bdd93d5 | 2023-05-12 07:10:14 -0700 | [diff] [blame] | 20 | FILESEXTRAPATHS_prepend :="${APP-OPEN-PATH}/platform:" |
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 21 | SRC_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 | " |
| 28 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/zte;md5=c075689d1d1e06d4ab5bbe53623a6808" |
| 29 | S = "${WORKDIR}" |
| 30 | S_SRC_PATH = "${S}/at_ctl" |
| 31 | |
| 32 | #引用公用头文件和编译选项。 |
| 33 | include ${BSPDIR}/sources/meta-zxic/conf/app_com.inc |
| 34 | include ${BSPDIR}/sources/meta-zxic/conf/pub.inc |
xf.li | bdd93d5 | 2023-05-12 07:10:14 -0700 | [diff] [blame] | 35 | CFLAGS_append = "-I ${BSPDIR}/zxic_code/zxic_source/zxic_app_open/platform/at_ctl/src/phone/inc" |
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 36 | CFLAGS_append += "${ZXIC_EXTRA_CFLAGS}" |
| 37 | LDLIBS_EXT = "${@bb.utils.contains('DISTRO_FEATURES', 'volte', '-lvoice', '', d)}" |
| 38 | #include at-ctl.inc |
| 39 | |
| 40 | #inherit autotools pkgconfig systemd |
| 41 | |
| 42 | do_compile() { |
| 43 | make -C ${S_SRC_PATH} LDLIBS_EXT=${LDLIBS_EXT} |
| 44 | } |
| 45 | |
| 46 | do_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.li | 9d1a0e1 | 2023-09-20 01:43:20 -0700 | [diff] [blame] | 63 | ln -s ../init.d/at_ctl ${D}${sysconfdir}/rcS.d/K80at_ctl |
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 64 | 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 | |
| 75 | do_cleanlibs () { |
| 76 | rm -fr ${ELFS-PATH}/at_ctl |
| 77 | } |
| 78 | |
| 79 | addtask cleanlibs after do_clean before do_cleansstate |
| 80 | |
| 81 | FILES_${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 | " |
| 87 | SYSTEMD_SERVICE_${PN} = "at_ctl.service" |
| 88 | SYSTEMD_AUTO_ENABLE_${PN} = "enable" |
| 89 | |
xf.li | 9d1a0e1 | 2023-09-20 01:43:20 -0700 | [diff] [blame] | 90 | RDEPENDS_${PN} = " libnvram libsoftap libsofttimer libatutils sqlcipher libatext libmxml libvoice libsd-daemon" |