blob: ef3b61e614bfe9cc3e976c40ae1120f0370f0e02 [file] [log] [blame]
rjw1f884582022-01-06 17:20:42 +08001DESCRIPTION = "MTK GNSS driver"
2LICENSE = "MediaTekProprietary"
3LIC_FILES_CHKSUM = "file://LICENSE;md5=e1696b147d49d491bcb4da1a57173fff"
4
5inherit workonsrc
6WORKONSRC = "${TOPDIR}/../src/connectivity/gps/mtk_mnld/"
7inherit systemd
8SYSTEMD_PACKAGES = "${PN}"
9SYSTEMD_SERVICE_${PN} = "mnld.service"
10
11FILES_${PN} += "${systemd_unitdir}/system/mnld.service"
12FILES_${PN} += "${libdir}/libmnl_gnss.so*"
13FILES_${PN} += "${bindir}/mnld0"
14FILES_${PN} += "/data/misc"
15FILES_${PN} += "/data/misc/gps"
16FILES_${PN} += "/data/gps_mnl"
17FILES_${PN} += "/data/mpe_mnl"
18FILES_${PN} += "/data/agps_supl"
19FILES_${PN} += "/usr/share/gps"
20FILES_${PN} += "/usr/share/gps/mpe_mnl"
21
22DEPENDS += "openssl curl"
23
24# Avoid QA Issue: No GNU_HASH in the elf binary
25INSANE_SKIP_${PN} = "ldflags"
26INSANE_SKIP_${PN}-dev = "ldflags"
27#FILES_${PN} = "${libdir}/*.so"
28FILES_${PN}-dev = "${includedir}"
29
30# Avoid QA Issue: 'Files/directories were installed but not shipped'
31INSANE_SKIP_${PN} += "installed-vs-shipped"
32FLAGS = "-Os -flto ${@bb.utils.contains("ADR_SUPPORT","YES", "-DMTK_ADR_SUPPORT","",d)}"
33
34EXTRA_OEMAKE = "\
35 'PACKAGE_ARCH=${PACKAGE_ARCH}' \
36 'DNS_FLAGS=${FLAGS}' \
37 "
38
39do_compile_append() {
40 cp mnl/libs/linux/${PACKAGE_ARCH}/lib* mnl/libs/
41}
42
43do_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
62INSANE_SKIP_${PN} += "already-stripped"
63
64inherit autotools
65