Patchwork [meta-oe,meta-efl,1/5] gpsd: override gpsd.service to use GPS_DEVICES from /etc/default/gpsd

login
register
mail settings
Submitter Martin Jansa
Date June 21, 2012, 8:18 a.m.
Message ID <41447e05fd0f4a1ffcba42b036928fd759116092.1340266416.git.Martin.Jansa@gmail.com>
Download mbox | patch
Permalink /patch/30393/
State Accepted
Commit 6ba88f7ad957bf2f6fb4527f77697429f7d98a52
Headers show

Comments

Martin Jansa - June 21, 2012, 8:18 a.m.
From: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>

Without that fix gpsd starts without using the machine specific
  gps serial port.

On some devices like the GTA04, not only that makes GPS not work,
  but that also prevent suspend because GPS has to be off in order
  for suspend to succeed(and the program powering off the GPS
  has to know if the GPS is on or off by using gpsd).

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
---
 meta-oe/recipes-navigation/gpsd/gpsd/gpsd.service |   10 ++++++++++
 meta-oe/recipes-navigation/gpsd/gpsd_3.4.bb       |    5 +++--
 meta-oe/recipes-navigation/gpsd/gpsd_3.5.bb       |    5 +++--
 3 files changed, 16 insertions(+), 4 deletions(-)
 create mode 100644 meta-oe/recipes-navigation/gpsd/gpsd/gpsd.service

Patch

diff --git a/meta-oe/recipes-navigation/gpsd/gpsd/gpsd.service b/meta-oe/recipes-navigation/gpsd/gpsd/gpsd.service
new file mode 100644
index 0000000..7131a58
--- /dev/null
+++ b/meta-oe/recipes-navigation/gpsd/gpsd/gpsd.service
@@ -0,0 +1,10 @@ 
+[Unit]
+Description=GPS (Global Positioning System) Daemon
+Requires=gpsd.socket
+
+[Service]
+EnvironmentFile=/etc/default/gpsd
+ExecStart=/usr/sbin/gpsd -N $GPS_DEVICES
+
+[Install]
+Also=gpsd.socket
diff --git a/meta-oe/recipes-navigation/gpsd/gpsd_3.4.bb b/meta-oe/recipes-navigation/gpsd/gpsd_3.4.bb
index 4f00cf4..ebc4af6 100644
--- a/meta-oe/recipes-navigation/gpsd/gpsd_3.4.bb
+++ b/meta-oe/recipes-navigation/gpsd/gpsd_3.4.bb
@@ -5,7 +5,7 @@  LIC_FILES_CHKSUM = "file://COPYING;md5=d217a23f408e91c94359447735bc1800"
 DEPENDS = "dbus dbus-glib ncurses python libusb1 chrpath-native"
 PROVIDES = "virtual/gpsd"
 
-PR = "r1"
+PR = "r2"
 
 SRC_URI = "http://download.savannah.gnu.org/releases/${PN}/${P}.tar.gz \
   file://0001-SConstruct-fix-DSO-build-for-ntpshm-garmin_monitor.patch \
@@ -15,6 +15,7 @@  SRC_URI = "http://download.savannah.gnu.org/releases/${PN}/${P}.tar.gz \
   file://0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch \
   file://0001-SConstruct-disable-html-and-man-docs-building-becaus.patch \
   file://gpsd-default \
+  file://gpsd.service \
   file://gpsd \
   file://60-gpsd.rules \
 "
@@ -83,7 +84,7 @@  do_install_append() {
 
     #support for systemd
     install -d ${D}${systemd_unitdir}/system/
-    install -m 0644 ${S}/systemd/${PN}.service ${D}${systemd_unitdir}/system/${PN}.service
+    install -m 0644 ${WORKDIR}/${PN}.service ${D}${systemd_unitdir}/system/${PN}.service
     install -m 0644 ${S}/systemd/${PN}.socket ${D}${systemd_unitdir}/system/${PN}.socket
 }
 
diff --git a/meta-oe/recipes-navigation/gpsd/gpsd_3.5.bb b/meta-oe/recipes-navigation/gpsd/gpsd_3.5.bb
index 60b30df..083163b 100644
--- a/meta-oe/recipes-navigation/gpsd/gpsd_3.5.bb
+++ b/meta-oe/recipes-navigation/gpsd/gpsd_3.5.bb
@@ -5,7 +5,7 @@  LIC_FILES_CHKSUM = "file://COPYING;md5=d217a23f408e91c94359447735bc1800"
 DEPENDS = "dbus dbus-glib ncurses python libusb1"
 PROVIDES = "virtual/gpsd"
 
-PR = "r1"
+PR = "r2"
 
 DEFAULT_PREFERENCE = "-1"
 SRC_URI = "http://download.savannah.gnu.org/releases/${PN}/${P}.tar.gz \
@@ -16,6 +16,7 @@  SRC_URI = "http://download.savannah.gnu.org/releases/${PN}/${P}.tar.gz \
   file://0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch \
   file://0001-SConstruct-disable-html-and-man-docs-building-becaus.patch \
   file://gpsd-default \
+  file://gpsd.service \
   file://gpsd \
   file://60-gpsd.rules \
 "
@@ -84,7 +85,7 @@  do_install_append() {
 
     #support for systemd
     install -d ${D}${systemd_unitdir}/system/
-    install -m 0644 ${S}/systemd/${PN}.service ${D}${systemd_unitdir}/system/${PN}.service
+    install -m 0644 ${WORKDIR}/${PN}.service ${D}${systemd_unitdir}/system/${PN}.service
     install -m 0644 ${S}/systemd/${PN}.socket ${D}${systemd_unitdir}/system/${PN}.socket
 }