diff options
author | Peter Kjellerstedt <peter.kjellerstedt@axis.com> | 2021-08-24 22:26:47 +0200 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2021-08-25 08:17:04 -0700 |
commit | ef2965f50b40e313d4711a2bc0a9f3f840fee1a8 (patch) | |
tree | eccea9bb51fe74f73324ccb0d509d1328170ca13 /meta-oe/recipes-navigation | |
parent | a88aa7fb426518ca3e2e3992dd19a78d9f48cde8 (diff) | |
download | meta-openembedded-ef2965f50b40e313d4711a2bc0a9f3f840fee1a8.tar.gz |
gpsd: Let scons install the udev and systemd files
With the update to 3.23 (commit 87f3070f), the recipe was changed to
incorrectly install the gpsd.rules.in file instead of gpsd.rules. It
also missed that a new template string (@RUNDIR@) was introduced in the
systemd files, making them unusable.
Instead of trying to keep up with upstream changes, let scons do the job
and install the udev and systemd files by using the "udev-install"
production instead of "install".
In addition to the correct files being installed,
"/etc/udev/rules.d/gpsd.rules" is now "/lib/udev/rules.d/25-gpsd.rules".
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-navigation')
-rw-r--r-- | meta-oe/recipes-navigation/gpsd/gpsd_3.23.bb | 45 |
1 files changed, 18 insertions, 27 deletions
diff --git a/meta-oe/recipes-navigation/gpsd/gpsd_3.23.bb b/meta-oe/recipes-navigation/gpsd/gpsd_3.23.bb index 1d031ee95..350eaaf12 100644 --- a/meta-oe/recipes-navigation/gpsd/gpsd_3.23.bb +++ b/meta-oe/recipes-navigation/gpsd/gpsd_3.23.bb | |||
@@ -35,11 +35,13 @@ EXTRA_OESCONS = " \ | |||
35 | nostrip='true' \ | 35 | nostrip='true' \ |
36 | systemd='${SYSTEMD_OESCONS}' \ | 36 | systemd='${SYSTEMD_OESCONS}' \ |
37 | libdir='${libdir}' \ | 37 | libdir='${libdir}' \ |
38 | udevdir='${nonarch_base_libdir}/udev' \ | ||
39 | unitdir='${systemd_system_unitdir}' \ | ||
38 | manbuild='false' \ | 40 | manbuild='false' \ |
39 | LINK='${CC}' \ | 41 | LINK='${CC}' \ |
40 | ${PACKAGECONFIG_CONFARGS} \ | 42 | ${PACKAGECONFIG_CONFARGS} \ |
41 | " | 43 | " |
42 | # this cannot be used, because then chrpath is not found and only static lib is built | 44 | # This cannot be used, because then chrpath is not found and only static lib is built |
43 | # target=${HOST_SYS} | 45 | # target=${HOST_SYS} |
44 | 46 | ||
45 | do_compile:prepend() { | 47 | do_compile:prepend() { |
@@ -58,34 +60,24 @@ do_install() { | |||
58 | export LINKFLAGS="${LDFLAGS}" | 60 | export LINKFLAGS="${LDFLAGS}" |
59 | 61 | ||
60 | export DESTDIR="${D}" | 62 | export DESTDIR="${D}" |
61 | # prefix is used for RPATH and DESTDIR/prefix for instalation | 63 | # prefix is used for RPATH and DESTDIR/prefix for installation |
62 | ${STAGING_BINDIR_NATIVE}/scons prefix=${prefix} python_libdir=${libdir} install ${EXTRA_OESCONS} || \ | 64 | ${STAGING_BINDIR_NATIVE}/scons prefix=${prefix} python_libdir=${libdir} udev-install ${EXTRA_OESCONS} || \ |
63 | bbfatal "scons install execution failed." | 65 | bbfatal "scons install execution failed." |
64 | } | 66 | } |
65 | 67 | ||
66 | do_install:append() { | 68 | do_install:append() { |
67 | install -d ${D}/${sysconfdir}/init.d | 69 | install -d ${D}${sysconfdir}/init.d |
68 | install -m 0755 ${WORKDIR}/gpsd.init ${D}/${sysconfdir}/init.d/gpsd | 70 | install -m 0755 ${WORKDIR}/gpsd.init ${D}${sysconfdir}/init.d/gpsd |
69 | install -d ${D}/${sysconfdir}/default | 71 | install -d ${D}${sysconfdir}/default |
70 | install -m 0644 ${S}/packaging/deb/etc_default_gpsd ${D}/${sysconfdir}/default/gpsd.default | 72 | install -m 0644 ${S}/packaging/deb/etc_default_gpsd ${D}${sysconfdir}/default/gpsd.default |
71 | 73 | ||
72 | #support for udev | 74 | # Support for udev |
73 | install -d ${D}/${sysconfdir}/udev/rules.d | 75 | install -d ${D}${nonarch_base_libdir}/udev |
74 | install -m 0644 ${S}/gpsd.rules.in ${D}/${sysconfdir}/udev/rules.d/ | 76 | install -m 0755 ${S}/gpsd.hotplug ${D}${nonarch_base_libdir}/udev |
75 | install -d ${D}${base_libdir}/udev/ | 77 | |
76 | install -m 0755 ${S}/gpsd.hotplug ${D}${base_libdir}/udev/ | 78 | # Support for python |
77 | 79 | install -d ${D}${PYTHON_SITEPACKAGES_DIR}/gps | |
78 | #support for python | 80 | install -m 755 ${S}/gps/*.py ${D}${PYTHON_SITEPACKAGES_DIR}/gps |
79 | install -d ${D}/${PYTHON_SITEPACKAGES_DIR}/gps | ||
80 | install -m 755 ${S}/gps/*.py ${D}/${PYTHON_SITEPACKAGES_DIR}/gps | ||
81 | |||
82 | #support for systemd | ||
83 | install -d ${D}${systemd_unitdir}/system/ | ||
84 | install -m 0644 ${S}/systemd/${BPN}.service.in ${D}${systemd_unitdir}/system/${BPN}.service | ||
85 | sed -i -e 's,@SBINDIR@,/usr/sbin,g' ${D}${systemd_unitdir}/system/${BPN}.service | ||
86 | install -m 0644 ${S}/systemd/${BPN}ctl@.service.in ${D}${systemd_unitdir}/system/${BPN}ctl@.service | ||
87 | sed -i -e 's,@SBINDIR@,/usr/sbin,g' ${D}${systemd_unitdir}/system/${BPN}ctl@.service | ||
88 | install -m 0644 ${S}/systemd/${BPN}.socket.in ${D}${systemd_unitdir}/system/${BPN}.socket | ||
89 | } | 81 | } |
90 | 82 | ||
91 | PACKAGES =+ "libgps libgpsd python3-pygps gpsd-udev gpsd-conf gpsd-gpsctl gps-utils" | 83 | PACKAGES =+ "libgps libgpsd python3-pygps gpsd-udev gpsd-conf gpsd-gpsctl gps-utils" |
@@ -99,7 +91,7 @@ RDEPENDS:${PN} = "gpsd-gpsctl" | |||
99 | RRECOMMENDS:${PN} = "gpsd-conf gpsd-udev gpsd-machine-conf" | 91 | RRECOMMENDS:${PN} = "gpsd-conf gpsd-udev gpsd-machine-conf" |
100 | 92 | ||
101 | SUMMARY:gpsd-udev = "udev relevant files to use gpsd hotplugging" | 93 | SUMMARY:gpsd-udev = "udev relevant files to use gpsd hotplugging" |
102 | FILES:gpsd-udev = "${base_libdir}/udev ${sysconfdir}/udev/*" | 94 | FILES:gpsd-udev = "${nonarch_base_libdir}/udev" |
103 | RDEPENDS:gpsd-udev += "udev gpsd-conf" | 95 | RDEPENDS:gpsd-udev += "udev gpsd-conf" |
104 | 96 | ||
105 | SUMMARY:libgpsd = "C service library used for communicating with gpsd" | 97 | SUMMARY:libgpsd = "C service library used for communicating with gpsd" |
@@ -135,7 +127,6 @@ RREPLACES:${PN} += "${PN}-systemd" | |||
135 | RCONFLICTS:${PN} += "${PN}-systemd" | 127 | RCONFLICTS:${PN} += "${PN}-systemd" |
136 | SYSTEMD_SERVICE:${PN} = "${BPN}.socket ${BPN}ctl@.service" | 128 | SYSTEMD_SERVICE:${PN} = "${BPN}.socket ${BPN}ctl@.service" |
137 | 129 | ||
138 | |||
139 | ALTERNATIVE:${PN} = "gpsd-defaults" | 130 | ALTERNATIVE:${PN} = "gpsd-defaults" |
140 | ALTERNATIVE_LINK_NAME[gpsd-defaults] = "${sysconfdir}/default/gpsd" | 131 | ALTERNATIVE_LINK_NAME[gpsd-defaults] = "${sysconfdir}/default/gpsd" |
141 | ALTERNATIVE_TARGET[gpsd-defaults] = "${sysconfdir}/default/gpsd.default" | 132 | ALTERNATIVE_TARGET[gpsd-defaults] = "${sysconfdir}/default/gpsd.default" |