Start development cycle for Royal Ricefish
[AGL/meta-agl.git] / meta-agl-bsp / meta-agl-refhw-gen3 / recipes-navigation / gpsd / gpsd-conf-refhw_1.0.bb
1 SUMMARY = "AGL Reference Hardware specific gpsd configuration"
2 LICENSE = "MIT"
3 LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
4
5 PACKAGE_ARCH = "${MACHINE_ARCH}"
6
7 SRC_URI = "file://gpsd.refhw \
8            file://refhw-gpsd-helper.sh \
9            file://refhw.conf \
10 "
11
12 inherit update-alternatives
13
14 do_configure[noexec] = "1"
15 do_compile[noexec] = "1"
16
17 do_install() {
18     install -D -m 0644 ${WORKDIR}/gpsd.refhw ${D}/${sysconfdir}/default/gpsd.refhw
19     if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
20         install -D -m 0755 ${WORKDIR}/refhw-gpsd-helper.sh ${D}/${sbindir}/refhw-gpsd-helper.sh
21         install -d ${D}${sysconfdir}/systemd/system/gpsd.service.d
22         install -D -m 0644 ${WORKDIR}/refhw.conf ${D}${sysconfdir}/systemd/system/gpsd.service.d/refhw.conf
23     fi
24 }
25
26 ALTERNATIVE:${PN} = "gpsd-defaults"
27 ALTERNATIVE_LINK_NAME[gpsd-defaults] = "${sysconfdir}/default/gpsd"
28 ALTERNATIVE_TARGET[gpsd-defaults] = "${sysconfdir}/default/gpsd.refhw"
29 # NOTE: Priority needs to be below default of 10 to avoid overriding the
30 #       default configuration.  The script run by the systemd drop-in
31 #       will tweak things on boot to handle h3ulcb vs refhw.
32 ALTERNATIVE_PRIORITY[gpsd-defaults] = "5"
33
34 CONFFILES:${PN} = "${sysconfdir}/default/gpsd.refhw"
35
36 # NOTE: Explicitly not defining RPROVIDES of "virtual/gpsd-conf" to
37 #       avoid conflicting with the default configuration and potentially
38 #       changing behavior on m3ulcb/h3ulcb.