blob: 1d8d890f41113b95108952be93d84359f07a8abc [file] [log] [blame]
you.chen79d8f932023-12-26 17:03:44 +08001inherit externalsrc package systemd
2
3DESCRIPTION = "lynq_tester.service demo"
4#LICENSE = "MediaTekProprietary"
5LICENSE = "CLOSED"
6LIC_FILES_CHKSUM = "file://LICENSE;md5=e1696b147d49d491bcb4da1a57173fff"
7DEPENDS += "platform-libs dbus glib-2.0"
8inherit workonsrc
9WORKONSRC = "${TOPDIR}/../LYNQ_PUBLIC/common_src/framework/lynq-tester-service/src"
10
11TARGET_CC_ARCH += "${LDFLAGS}"
12SYSTEMD_PACKAGES = "${PN}"
13SYSTEMD_SERVICE_${PN} = "lynq_tester.service"
14FILES_${PN} += "${systemd_unitdir}/system/lynq_tester.service"
15
16#Parameters passed to do_compile()
17EXTRA_OEMAKE = "'RAT_CONFIG_C2K_SUPPORT = ${RAT_CONFIG_C2K_SUPPORT}'\
18 'MTK_MULTI_SIM_SUPPORT = ${MTK_MULTI_SIM_SUPPORT}'\
19 'TARGET_PLATFORM = ${TARGET_PLATFORM}'"
20
21#INHIBIT_PACKAGE_STRIP = "1"
22do_compile () {
23 if test "${PACKAGE_ARCH}" = "cortexa7hf-vfp-vfpv4-neon" || test "${PACKAGE_ARCH}" = "cortexa7hf-neon-vfpv4"; then
24 oe_runmake all ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -mhard-float"
25 else
26 oe_runmake all ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST}"
27 fi
28}
29
30do_install() {
31 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
32 install -d ${D}${systemd_unitdir}/system/
33 install -m 0644 ${B}/lynq_tester.service ${D}${systemd_unitdir}/system
34 fi
35
36 install -d ${D}${bindir}/
37 install -m 0755 ${S}/lynq-tester-service ${D}${bindir}/
38 install -d ${D}${includedir}
39}
40