blob: 55b48ce972106a70a6515380022242661a128bfb [file] [log] [blame]
DESCRIPTION = "service_test"
DEPENDS = "libbinder"
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}
FILESEXTRAPATHS_prepend :="${APP-OPEN-PATH}/test:"
SRC_URI = " \
file://service_test \
${@bb.utils.contains("DISTRO_FEATURES", "procd", "file://test_binder_server.init","", d)} \
${@bb.utils.contains("DISTRO_FEATURES", "systemd", "file://test_binder_server.service","", d)} \
${@bb.utils.contains("DISTRO_FEATURES", "sysvinit", "file://test_binder_server.sysvinit","", d)} \
"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/zte;md5=c075689d1d1e06d4ab5bbe53623a6808"
S = "${WORKDIR}"
#引用公用头文件和编译选项。
include ${BSPDIR}/sources/meta-zxic/conf/app_com.inc
#编译
do_compile() {
make -C service_test
}
#库文件的安装
do_install() {
install -d ${D}${bindir}/
install -m 0755 ${S}/service_test/test_binder_client ${D}${bindir}/
install -m 0755 ${S}/service_test/test_binder_server ${D}${bindir}/
if ${@bb.utils.contains('DISTRO_FEATURES','procd','true','false',d)}; then
install -Dm 0755 ${WORKDIR}/test_binder_server.init ${D}${sysconfdir}/init.d/test_binder_server
fi
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
install -d ${D}${systemd_unitdir}/system
install -m 0644 ${WORKDIR}/test_binder_server.service ${D}${systemd_unitdir}/system
fi
if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
install -Dm 0755 ${WORKDIR}/test_binder_server.sysvinit ${D}${sysconfdir}/init.d/test_binder_server
install -d ${D}${sysconfdir}/rcS.d
ln -s ../init.d/test_binder_server ${D}${sysconfdir}/rcS.d
#/S22test_binder_server
fi
#install elfs
install -d ${ELFS-PATH}/
install -m 0755 ${S}/service_test/test_binder_client ${ELFS-PATH}/
install -m 0755 ${S}/service_test/test_binder_server ${ELFS-PATH}/
}
#清库
do_cleanlibs () {
rm -fr ${ELFS-PATH}/test_binder_client
rm -fr ${ELFS-PATH}/test_binder_server
}
addtask cleanlibs after do_clean before do_cleansstate
#rootfs包含的文件
FILES_${PN} = "\
${bindir}/ \
${@bb.utils.contains("DISTRO_FEATURES", "procd", "${sysconfdir}/init.d/test_binder_server","", d)} \
${@bb.utils.contains("DISTRO_FEATURES", "sysvinit", "${sysconfdir}/","", d)} \
"
SYSTEMD_SERVICE_${PN} = "test_binder_server.service"
SYSTEMD_AUTO_ENABLE_${PN} = "enable"
RDEPENDS_${PN} = "libbinder"