mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-07-16 04:17:25 +00:00
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>
This commit is contained in:
committed by
Khem Raj
parent
a88aa7fb42
commit
ef2965f50b
@@ -35,11 +35,13 @@ EXTRA_OESCONS = " \
|
|||||||
nostrip='true' \
|
nostrip='true' \
|
||||||
systemd='${SYSTEMD_OESCONS}' \
|
systemd='${SYSTEMD_OESCONS}' \
|
||||||
libdir='${libdir}' \
|
libdir='${libdir}' \
|
||||||
|
udevdir='${nonarch_base_libdir}/udev' \
|
||||||
|
unitdir='${systemd_system_unitdir}' \
|
||||||
manbuild='false' \
|
manbuild='false' \
|
||||||
LINK='${CC}' \
|
LINK='${CC}' \
|
||||||
${PACKAGECONFIG_CONFARGS} \
|
${PACKAGECONFIG_CONFARGS} \
|
||||||
"
|
"
|
||||||
# this cannot be used, because then chrpath is not found and only static lib is built
|
# This cannot be used, because then chrpath is not found and only static lib is built
|
||||||
# target=${HOST_SYS}
|
# target=${HOST_SYS}
|
||||||
|
|
||||||
do_compile:prepend() {
|
do_compile:prepend() {
|
||||||
@@ -58,34 +60,24 @@ do_install() {
|
|||||||
export LINKFLAGS="${LDFLAGS}"
|
export LINKFLAGS="${LDFLAGS}"
|
||||||
|
|
||||||
export DESTDIR="${D}"
|
export DESTDIR="${D}"
|
||||||
# prefix is used for RPATH and DESTDIR/prefix for instalation
|
# prefix is used for RPATH and DESTDIR/prefix for installation
|
||||||
${STAGING_BINDIR_NATIVE}/scons prefix=${prefix} python_libdir=${libdir} install ${EXTRA_OESCONS} || \
|
${STAGING_BINDIR_NATIVE}/scons prefix=${prefix} python_libdir=${libdir} udev-install ${EXTRA_OESCONS} || \
|
||||||
bbfatal "scons install execution failed."
|
bbfatal "scons install execution failed."
|
||||||
}
|
}
|
||||||
|
|
||||||
do_install:append() {
|
do_install:append() {
|
||||||
install -d ${D}/${sysconfdir}/init.d
|
install -d ${D}${sysconfdir}/init.d
|
||||||
install -m 0755 ${WORKDIR}/gpsd.init ${D}/${sysconfdir}/init.d/gpsd
|
install -m 0755 ${WORKDIR}/gpsd.init ${D}${sysconfdir}/init.d/gpsd
|
||||||
install -d ${D}/${sysconfdir}/default
|
install -d ${D}${sysconfdir}/default
|
||||||
install -m 0644 ${S}/packaging/deb/etc_default_gpsd ${D}/${sysconfdir}/default/gpsd.default
|
install -m 0644 ${S}/packaging/deb/etc_default_gpsd ${D}${sysconfdir}/default/gpsd.default
|
||||||
|
|
||||||
#support for udev
|
# Support for udev
|
||||||
install -d ${D}/${sysconfdir}/udev/rules.d
|
install -d ${D}${nonarch_base_libdir}/udev
|
||||||
install -m 0644 ${S}/gpsd.rules.in ${D}/${sysconfdir}/udev/rules.d/
|
install -m 0755 ${S}/gpsd.hotplug ${D}${nonarch_base_libdir}/udev
|
||||||
install -d ${D}${base_libdir}/udev/
|
|
||||||
install -m 0755 ${S}/gpsd.hotplug ${D}${base_libdir}/udev/
|
|
||||||
|
|
||||||
#support for python
|
# Support for python
|
||||||
install -d ${D}/${PYTHON_SITEPACKAGES_DIR}/gps
|
install -d ${D}${PYTHON_SITEPACKAGES_DIR}/gps
|
||||||
install -m 755 ${S}/gps/*.py ${D}/${PYTHON_SITEPACKAGES_DIR}/gps
|
install -m 755 ${S}/gps/*.py ${D}${PYTHON_SITEPACKAGES_DIR}/gps
|
||||||
|
|
||||||
#support for systemd
|
|
||||||
install -d ${D}${systemd_unitdir}/system/
|
|
||||||
install -m 0644 ${S}/systemd/${BPN}.service.in ${D}${systemd_unitdir}/system/${BPN}.service
|
|
||||||
sed -i -e 's,@SBINDIR@,/usr/sbin,g' ${D}${systemd_unitdir}/system/${BPN}.service
|
|
||||||
install -m 0644 ${S}/systemd/${BPN}ctl@.service.in ${D}${systemd_unitdir}/system/${BPN}ctl@.service
|
|
||||||
sed -i -e 's,@SBINDIR@,/usr/sbin,g' ${D}${systemd_unitdir}/system/${BPN}ctl@.service
|
|
||||||
install -m 0644 ${S}/systemd/${BPN}.socket.in ${D}${systemd_unitdir}/system/${BPN}.socket
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PACKAGES =+ "libgps libgpsd python3-pygps gpsd-udev gpsd-conf gpsd-gpsctl gps-utils"
|
PACKAGES =+ "libgps libgpsd python3-pygps gpsd-udev gpsd-conf gpsd-gpsctl gps-utils"
|
||||||
@@ -99,7 +91,7 @@ RDEPENDS:${PN} = "gpsd-gpsctl"
|
|||||||
RRECOMMENDS:${PN} = "gpsd-conf gpsd-udev gpsd-machine-conf"
|
RRECOMMENDS:${PN} = "gpsd-conf gpsd-udev gpsd-machine-conf"
|
||||||
|
|
||||||
SUMMARY:gpsd-udev = "udev relevant files to use gpsd hotplugging"
|
SUMMARY:gpsd-udev = "udev relevant files to use gpsd hotplugging"
|
||||||
FILES:gpsd-udev = "${base_libdir}/udev ${sysconfdir}/udev/*"
|
FILES:gpsd-udev = "${nonarch_base_libdir}/udev"
|
||||||
RDEPENDS:gpsd-udev += "udev gpsd-conf"
|
RDEPENDS:gpsd-udev += "udev gpsd-conf"
|
||||||
|
|
||||||
SUMMARY:libgpsd = "C service library used for communicating with gpsd"
|
SUMMARY:libgpsd = "C service library used for communicating with gpsd"
|
||||||
@@ -135,7 +127,6 @@ RREPLACES:${PN} += "${PN}-systemd"
|
|||||||
RCONFLICTS:${PN} += "${PN}-systemd"
|
RCONFLICTS:${PN} += "${PN}-systemd"
|
||||||
SYSTEMD_SERVICE:${PN} = "${BPN}.socket ${BPN}ctl@.service"
|
SYSTEMD_SERVICE:${PN} = "${BPN}.socket ${BPN}ctl@.service"
|
||||||
|
|
||||||
|
|
||||||
ALTERNATIVE:${PN} = "gpsd-defaults"
|
ALTERNATIVE:${PN} = "gpsd-defaults"
|
||||||
ALTERNATIVE_LINK_NAME[gpsd-defaults] = "${sysconfdir}/default/gpsd"
|
ALTERNATIVE_LINK_NAME[gpsd-defaults] = "${sysconfdir}/default/gpsd"
|
||||||
ALTERNATIVE_TARGET[gpsd-defaults] = "${sysconfdir}/default/gpsd.default"
|
ALTERNATIVE_TARGET[gpsd-defaults] = "${sysconfdir}/default/gpsd.default"
|
||||||
|
|||||||
Reference in New Issue
Block a user