blob: 98b1544841979d0a2dd42a9973ac29da5cb658fb [file] [log] [blame]
DESCRIPTION = "at_svr"
DEPENDS = "libzxiceap"
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://at_svr \
${@bb.utils.contains("DISTRO_FEATURES", "procd", "file://at_svr.init","", d)} \
${@bb.utils.contains("DISTRO_FEATURES", "systemd", "file://at_svr.service","", d)} \
${@bb.utils.contains("DISTRO_FEATURES", "sysvinit", "file://at_svr.sysvinit","", d)} \
file://preconfigured_urs_policy.xml \
"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/zte;md5=c075689d1d1e06d4ab5bbe53623a6808"
S = "${WORKDIR}"
S_SRC_PATH = "${S}/at_svr"
#引用公用头文件和编译选项。
# include ${BSPDIR}/sources/meta-zxic/conf/app_com.inc
CFLAGS_append = "-I ${BSPDIR}/zxic_code/zxic_source/zxic_app_open/at_svr/inc"
#inherit autotools pkgconfig systemd
do_compile() {
make -C ${S_SRC_PATH}
}
do_install () {
install -d ${D}${bindir}/
install -m 0755 ${S_SRC_PATH}/at_svr ${D}${bindir}/
if ${@bb.utils.contains('DISTRO_FEATURES','procd','true','false',d)}; then
install -Dm 0755 ${WORKDIR}/at_svr.init ${D}${sysconfdir}/init.d/at_svr
fi
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
install -d ${D}${systemd_unitdir}/system
install -m 0644 ${WORKDIR}/at_svr.service ${D}${systemd_unitdir}/system
fi
if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
install -Dm 0755 ${WORKDIR}/at_svr.sysvinit ${D}${sysconfdir}/init.d/at_svr
install -d ${D}${sysconfdir}/rcS.d
ln -s ../init.d/at_svr ${D}${sysconfdir}/rcS.d/S20at_svr
fi
install -d ${D}/etc_ro/config/
install -m 0644 ${WORKDIR}/preconfigured_urs_policy.xml ${D}/etc_ro/config/
#install elfs
install -d ${ELFS-PATH}/
#install -m 0755 ${S_SRC_PATH}/at_svr ${ELFS-PATH}/${PN}/
install -m 0755 ${S_SRC_PATH}/at_svr ${ELFS-PATH}/
}
do_cleanlibs () {
rm -fr ${ELFS-PATH}/at_svr
}
addtask cleanlibs after do_clean before do_cleansstate
FILES_${PN} = "\
${bindir}/ \
${@bb.utils.contains("DISTRO_FEATURES", "procd", "${sysconfdir}/init.d/at_svr","", d)} \
${@bb.utils.contains("DISTRO_FEATURES", "sysvinit", "${sysconfdir}/","", d)} \
etc_ro/ \
"
SYSTEMD_SERVICE_${PN} = "at_svr.service"
SYSTEMD_AUTO_ENABLE_${PN} = "enable"
RDEPENDS_${PN} = " libzxiceap"