aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-navigation
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2013-04-13 14:29:26 +0200
committerMartin Jansa <Martin.Jansa@gmail.com>2013-04-15 16:22:04 +0200
commite965f6efc0942b08f5ab39a623833ebe8f39115e (patch)
tree7727c3308f9b5adbca406d591242ac0a974903ee /meta-oe/recipes-navigation
parent87259e3768de680a7cb39fc9e0959a4387fb57f2 (diff)
downloadmeta-openembedded-contrib-e965f6efc0942b08f5ab39a623833ebe8f39115e.tar.gz
gpsd: move systemd support from meta-systemd back to meta-oe
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-navigation')
-rw-r--r--meta-oe/recipes-navigation/gpsd/gpsd/gpsd.service10
-rw-r--r--meta-oe/recipes-navigation/gpsd/gpsd_3.7.bb17
2 files changed, 24 insertions, 3 deletions
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 00000000000..7131a589d75
--- /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.7.bb b/meta-oe/recipes-navigation/gpsd/gpsd_3.7.bb
index ceb700a61e4..1228614790d 100644
--- a/meta-oe/recipes-navigation/gpsd/gpsd_3.7.bb
+++ b/meta-oe/recipes-navigation/gpsd/gpsd_3.7.bb
@@ -7,7 +7,7 @@ PROVIDES = "virtual/gpsd"
EXTRANATIVEPATH += "chrpath-native"
-PR = "r3"
+PR = "r6"
SRC_URI = "http://download.savannah.gnu.org/releases/${PN}/${P}.tar.gz \
file://0002-SConstruct-respect-sysroot-also-in-SPLINTOPTS.patch \
@@ -17,16 +17,17 @@ SRC_URI = "http://download.savannah.gnu.org/releases/${PN}/${P}.tar.gz \
file://gpsd-default \
file://gpsd \
file://60-gpsd.rules \
+ file://gpsd.service \
"
SRC_URI[md5sum] = "52d9785eaf1a51298bb8900dbde88f98"
SRC_URI[sha256sum] = "7800c478ee9d7ca7a502b0f892828561b1fbf7bc69d9d38c447c82c3628302ac"
-inherit scons update-rc.d python-dir pythonnative
+inherit scons update-rc.d python-dir pythonnative systemd
INITSCRIPT_NAME = "gpsd"
INITSCRIPT_PARAMS = "defaults 35"
-SYSTEMD_OESCONS ??= "false"
+SYSTEMD_OESCONS = "${@base_contains('DISTRO_FEATURES', 'systemd', 'true', 'false',d)}"
export STAGING_INCDIR
export STAGING_LIBDIR
@@ -79,6 +80,11 @@ do_install_append() {
#support for python
install -d ${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 ${WORKDIR}/${PN}.service ${D}${systemd_unitdir}/system/${PN}.service
+ install -m 0644 ${S}/systemd/${PN}.socket ${D}${systemd_unitdir}/system/${PN}.socket
}
pkg_postinst_${PN}-conf() {
@@ -121,3 +127,8 @@ RDEPENDS_gps-utils = "python-pygps"
DESCRIPTION_python-pygps = "Python bindings to gpsd"
FILES_python-pygps = "${PYTHON_SITEPACKAGES_DIR}/*"
RDEPENDS_python-pygps = "python-core python-curses gpsd python-json"
+
+RPROVIDES_${PN} += "${PN}-systemd"
+RREPLACES_${PN} += "${PN}-systemd"
+RCONFLICTS_${PN} += "${PN}-systemd"
+SYSTEMD_SERVICE_${PN} = "${PN}.socket"