| you.chen | 79d8f93 | 2023-12-26 17:03:44 +0800 | [diff] [blame] | 1 | inherit externalsrc package systemd |
| 2 | |
| 3 | DESCRIPTION = "lynq_tester.service demo" |
| 4 | #LICENSE = "MediaTekProprietary" |
| 5 | LICENSE = "CLOSED" |
| 6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=e1696b147d49d491bcb4da1a57173fff" |
| 7 | DEPENDS += "platform-libs dbus glib-2.0" |
| 8 | inherit workonsrc |
| 9 | WORKONSRC = "${TOPDIR}/../LYNQ_PUBLIC/common_src/framework/lynq-tester-service/src" |
| 10 | |
| 11 | TARGET_CC_ARCH += "${LDFLAGS}" |
| 12 | SYSTEMD_PACKAGES = "${PN}" |
| 13 | SYSTEMD_SERVICE_${PN} = "lynq_tester.service" |
| 14 | FILES_${PN} += "${systemd_unitdir}/system/lynq_tester.service" |
| 15 | |
| 16 | #Parameters passed to do_compile() |
| 17 | EXTRA_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" |
| 22 | do_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 | |
| 30 | do_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 | |