rjw | 1f88458 | 2022-01-06 17:20:42 +0800 | [diff] [blame^] | 1 | DESCRIPTION = "MTK GNSS driver" |
| 2 | LICENSE = "MediaTekProprietary" |
| 3 | LIC_FILES_CHKSUM = "file://LICENSE;md5=e1696b147d49d491bcb4da1a57173fff" |
| 4 | |
| 5 | inherit workonsrc |
| 6 | WORKONSRC = "${TOPDIR}/../src/connectivity/gps/mtk_mnld/" |
| 7 | inherit systemd |
| 8 | SYSTEMD_PACKAGES = "${PN}" |
| 9 | SYSTEMD_SERVICE_${PN} = "mnld.service" |
| 10 | |
| 11 | FILES_${PN} += "${systemd_unitdir}/system/mnld.service" |
| 12 | FILES_${PN} += "${libdir}/libmnl_gnss.so*" |
| 13 | FILES_${PN} += "${bindir}/mnld0" |
| 14 | FILES_${PN} += "/data/misc" |
| 15 | FILES_${PN} += "/data/misc/gps" |
| 16 | FILES_${PN} += "/data/gps_mnl" |
| 17 | FILES_${PN} += "/data/mpe_mnl" |
| 18 | FILES_${PN} += "/data/agps_supl" |
| 19 | FILES_${PN} += "/usr/share/gps" |
| 20 | FILES_${PN} += "/usr/share/gps/mpe_mnl" |
| 21 | |
| 22 | DEPENDS += "openssl curl" |
| 23 | |
| 24 | # Avoid QA Issue: No GNU_HASH in the elf binary |
| 25 | INSANE_SKIP_${PN} = "ldflags" |
| 26 | INSANE_SKIP_${PN}-dev = "ldflags" |
| 27 | #FILES_${PN} = "${libdir}/*.so" |
| 28 | FILES_${PN}-dev = "${includedir}" |
| 29 | |
| 30 | # Avoid QA Issue: 'Files/directories were installed but not shipped' |
| 31 | INSANE_SKIP_${PN} += "installed-vs-shipped" |
| 32 | FLAGS = "-Os -flto ${@bb.utils.contains("ADR_SUPPORT","YES", "-DMTK_ADR_SUPPORT","",d)}" |
| 33 | |
| 34 | EXTRA_OEMAKE = "\ |
| 35 | 'PACKAGE_ARCH=${PACKAGE_ARCH}' \ |
| 36 | 'DNS_FLAGS=${FLAGS}' \ |
| 37 | " |
| 38 | |
| 39 | do_compile_append() { |
| 40 | cp mnl/libs/linux/${PACKAGE_ARCH}/lib* mnl/libs/ |
| 41 | } |
| 42 | |
| 43 | do_install_append() { |
| 44 | install -d ${D}${libdir} |
| 45 | install -d ${D}${bindir} |
| 46 | install -d ${D}/data/misc |
| 47 | install -d ${D}/data/misc/gps |
| 48 | install -d ${D}/data/gps_mnl |
| 49 | install -d ${D}/data/mpe_mnl |
| 50 | install -d ${D}/data/agps_supl |
| 51 | install -d ${D}/usr/share/gps |
| 52 | install -d ${D}/usr/share/gps/mpe_mnl |
| 53 | install -m 0755 mnld0 ${D}${bindir} |
| 54 | install -m 0755 ${TOPDIR}/../src/connectivity/gps/mtk_mnld/mnl/libs/linux/${PACKAGE_ARCH}/libmnl_gnss.so ${D}${libdir} |
| 55 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then |
| 56 | install -d ${D}${systemd_unitdir}/system/ |
| 57 | install -m 0644 ${B}/mnld.service ${D}${systemd_unitdir}/system |
| 58 | fi |
| 59 | } |
| 60 | |
| 61 | |
| 62 | INSANE_SKIP_${PN} += "already-stripped" |
| 63 | |
| 64 | inherit autotools |
| 65 | |