summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-navigation
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2021-08-24 22:26:47 +0200
committerKhem Raj <raj.khem@gmail.com>2021-08-25 08:17:04 -0700
commitef2965f50b40e313d4711a2bc0a9f3f840fee1a8 (patch)
treeeccea9bb51fe74f73324ccb0d509d1328170ca13 /meta-oe/recipes-navigation
parenta88aa7fb426518ca3e2e3992dd19a78d9f48cde8 (diff)
downloadmeta-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.bb45
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
45do_compile:prepend() { 47do_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
66do_install:append() { 68do_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
91PACKAGES =+ "libgps libgpsd python3-pygps gpsd-udev gpsd-conf gpsd-gpsctl gps-utils" 83PACKAGES =+ "libgps libgpsd python3-pygps gpsd-udev gpsd-conf gpsd-gpsctl gps-utils"
@@ -99,7 +91,7 @@ RDEPENDS:${PN} = "gpsd-gpsctl"
99RRECOMMENDS:${PN} = "gpsd-conf gpsd-udev gpsd-machine-conf" 91RRECOMMENDS:${PN} = "gpsd-conf gpsd-udev gpsd-machine-conf"
100 92
101SUMMARY:gpsd-udev = "udev relevant files to use gpsd hotplugging" 93SUMMARY:gpsd-udev = "udev relevant files to use gpsd hotplugging"
102FILES:gpsd-udev = "${base_libdir}/udev ${sysconfdir}/udev/*" 94FILES:gpsd-udev = "${nonarch_base_libdir}/udev"
103RDEPENDS:gpsd-udev += "udev gpsd-conf" 95RDEPENDS:gpsd-udev += "udev gpsd-conf"
104 96
105SUMMARY:libgpsd = "C service library used for communicating with gpsd" 97SUMMARY:libgpsd = "C service library used for communicating with gpsd"
@@ -135,7 +127,6 @@ RREPLACES:${PN} += "${PN}-systemd"
135RCONFLICTS:${PN} += "${PN}-systemd" 127RCONFLICTS:${PN} += "${PN}-systemd"
136SYSTEMD_SERVICE:${PN} = "${BPN}.socket ${BPN}ctl@.service" 128SYSTEMD_SERVICE:${PN} = "${BPN}.socket ${BPN}ctl@.service"
137 129
138
139ALTERNATIVE:${PN} = "gpsd-defaults" 130ALTERNATIVE:${PN} = "gpsd-defaults"
140ALTERNATIVE_LINK_NAME[gpsd-defaults] = "${sysconfdir}/default/gpsd" 131ALTERNATIVE_LINK_NAME[gpsd-defaults] = "${sysconfdir}/default/gpsd"
141ALTERNATIVE_TARGET[gpsd-defaults] = "${sysconfdir}/default/gpsd.default" 132ALTERNATIVE_TARGET[gpsd-defaults] = "${sysconfdir}/default/gpsd.default"