1 FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
3 SRC_URI = "file://gpsd.refhw \
4 file://refhw-gpsd-helper.sh \
8 inherit update-alternatives
10 do_configure[noexec] = "1"
11 do_compile[noexec] = "1"
14 install -D -m 0644 ${WORKDIR}/gpsd.refhw ${D}/${sysconfdir}/default/gpsd.refhw
16 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
17 install -D -m 0755 ${WORKDIR}/refhw-gpsd-helper.sh ${D}/${sbindir}/refhw-gpsd-helper.sh
18 install -d ${D}${sysconfdir}/systemd/system/gpsd.service.d
19 install -D -m 0644 ${WORKDIR}/refhw.conf ${D}${sysconfdir}/systemd/system/gpsd.service.d/refhw.conf
23 PACKAGE_ARCH = "${MACHINE_ARCH}"
25 CONFFILES:${PN} = "${sysconfdir}/default/gpsd.refhw"
27 ALTERNATIVE:${PN} = "gpsd-defaults"
28 ALTERNATIVE_LINK_NAME[gpsd-defaults] = "${sysconfdir}/default/gpsd"
29 ALTERNATIVE_TARGET[gpsd-defaults] = "${sysconfdir}/default/gpsd.refhw"
30 # NOTE: Priority needs to be below default of 10 to avoid overriding the
31 # default configuration. The script run by the systemd drop-in
32 # will tweak things on boot to handle h3ulcb vs refhw.
33 ALTERNATIVE_PRIORITY[gpsd-defaults] = "5"