diff options
author | Martin Jansa <Martin.Jansa@gmail.com> | 2012-01-18 10:51:57 +0100 |
---|---|---|
committer | Koen Kooi <koen@dominion.thruhere.net> | 2012-01-23 16:23:12 +0100 |
commit | 987222181d91e7feca31d5e0b923b7c88bcccfa9 (patch) | |
tree | 2419bd5fef86fc819e9aaf9b685c0e0ad6b3fb92 /meta-oe | |
parent | dfdc35f7b6910638ed03fa0aa09b0fa077ce29e0 (diff) | |
download | meta-openembedded-987222181d91e7feca31d5e0b923b7c88bcccfa9.tar.gz |
gpsd: add systemd support
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe')
-rw-r--r-- | meta-oe/recipes-navigation/gpsd/gpsd-2.96/gpsd.service | 9 | ||||
-rw-r--r-- | meta-oe/recipes-navigation/gpsd/gpsd-2.96/gpsd.socket | 9 | ||||
-rw-r--r-- | meta-oe/recipes-navigation/gpsd/gpsd_2.96.bb | 22 |
3 files changed, 37 insertions, 3 deletions
diff --git a/meta-oe/recipes-navigation/gpsd/gpsd-2.96/gpsd.service b/meta-oe/recipes-navigation/gpsd/gpsd-2.96/gpsd.service new file mode 100644 index 000000000..8deaf759a --- /dev/null +++ b/meta-oe/recipes-navigation/gpsd/gpsd-2.96/gpsd.service | |||
@@ -0,0 +1,9 @@ | |||
1 | [Unit] | ||
2 | Description=GPS (Global Positioning System) Daemon | ||
3 | Requires=gpsd.socket | ||
4 | |||
5 | [Service] | ||
6 | ExecStart=/usr/sbin/gpsd -N | ||
7 | |||
8 | [Install] | ||
9 | Also=gpsd.socket | ||
diff --git a/meta-oe/recipes-navigation/gpsd/gpsd-2.96/gpsd.socket b/meta-oe/recipes-navigation/gpsd/gpsd-2.96/gpsd.socket new file mode 100644 index 000000000..13c17f248 --- /dev/null +++ b/meta-oe/recipes-navigation/gpsd/gpsd-2.96/gpsd.socket | |||
@@ -0,0 +1,9 @@ | |||
1 | [Unit] | ||
2 | Description=GPS (Global Positioning System) Daemon Sockets | ||
3 | |||
4 | [Socket] | ||
5 | ListenStream=/var/run/gpsd.sock | ||
6 | ListenStream=127.0.0.1:2947 | ||
7 | |||
8 | [Install] | ||
9 | WantedBy=sockets.target | ||
diff --git a/meta-oe/recipes-navigation/gpsd/gpsd_2.96.bb b/meta-oe/recipes-navigation/gpsd/gpsd_2.96.bb index 69b26b394..ce2ab0238 100644 --- a/meta-oe/recipes-navigation/gpsd/gpsd_2.96.bb +++ b/meta-oe/recipes-navigation/gpsd/gpsd_2.96.bb | |||
@@ -5,6 +5,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d217a23f408e91c94359447735bc1800" | |||
5 | DEPENDS = "dbus-glib ncurses python libusb1" | 5 | DEPENDS = "dbus-glib ncurses python libusb1" |
6 | PROVIDES = "virtual/gpsd" | 6 | PROVIDES = "virtual/gpsd" |
7 | 7 | ||
8 | PR = "r1" | ||
9 | |||
8 | EXTRA_OECONF = "--x-includes=${STAGING_INCDIR}/X11 \ | 10 | EXTRA_OECONF = "--x-includes=${STAGING_INCDIR}/X11 \ |
9 | --x-libraries=${STAGING_LIBDIR} \ | 11 | --x-libraries=${STAGING_LIBDIR} \ |
10 | --enable-dbus \ | 12 | --enable-dbus \ |
@@ -14,15 +16,21 @@ EXTRA_OECONF = "--x-includes=${STAGING_INCDIR}/X11 \ | |||
14 | SRC_URI = "http://download.berlios.de/${PN}/${P}bis.tar.gz;name=gpsd \ | 16 | SRC_URI = "http://download.berlios.de/${PN}/${P}bis.tar.gz;name=gpsd \ |
15 | file://gpsd-default \ | 17 | file://gpsd-default \ |
16 | file://gpsd \ | 18 | file://gpsd \ |
19 | file://gpsd.socket \ | ||
20 | file://gpsd.service \ | ||
17 | file://60-gpsd.rules" | 21 | file://60-gpsd.rules" |
18 | SRC_URI[gpsd.md5sum] = "52b00cab0fb34bbf1923ae35c7ced6c4" | 22 | SRC_URI[gpsd.md5sum] = "52b00cab0fb34bbf1923ae35c7ced6c4" |
19 | SRC_URI[gpsd.sha256sum] = "c6d72565bc06b802c749e69808eb7c6ee165962dc17383971c9001b5e1763690" | 23 | SRC_URI[gpsd.sha256sum] = "c6d72565bc06b802c749e69808eb7c6ee165962dc17383971c9001b5e1763690" |
20 | 24 | ||
21 | inherit autotools update-rc.d python-dir | 25 | inherit autotools update-rc.d python-dir systemd |
22 | 26 | ||
23 | INITSCRIPT_NAME = "gpsd" | 27 | INITSCRIPT_NAME = "gpsd" |
24 | INITSCRIPT_PARAMS = "defaults 35" | 28 | INITSCRIPT_PARAMS = "defaults 35" |
25 | 29 | ||
30 | SYSTEMD_PACKAGES = "${PN}-systemd" | ||
31 | SYSTEMD_SERVICE = "${PN}.socket" | ||
32 | |||
33 | |||
26 | LDFLAGS += "-L${STAGING_LIBDIR} -lm" | 34 | LDFLAGS += "-L${STAGING_LIBDIR} -lm" |
27 | export STAGING_INCDIR | 35 | export STAGING_INCDIR |
28 | export STAGING_LIBDIR | 36 | export STAGING_LIBDIR |
@@ -60,6 +68,11 @@ do_install_append() { | |||
60 | install -m 0755 ${S}/gpsd.hotplug ${D}${base_libdir}/udev/ | 68 | install -m 0755 ${S}/gpsd.hotplug ${D}${base_libdir}/udev/ |
61 | install -d ${D}${base_libdir}/udev/ | 69 | install -d ${D}${base_libdir}/udev/ |
62 | install -m 0755 ${S}/gpsd.hotplug.wrapper ${D}${base_libdir}/udev/ | 70 | install -m 0755 ${S}/gpsd.hotplug.wrapper ${D}${base_libdir}/udev/ |
71 | |||
72 | #support for systemd | ||
73 | install -d ${D}${base_libdir}/systemd/system | ||
74 | install -m 644 ${WORKDIR}/${PN}.socket ${D}${base_libdir}/systemd/system | ||
75 | install -m 644 ${WORKDIR}/${PN}.service ${D}${base_libdir}/systemd/system | ||
63 | } | 76 | } |
64 | 77 | ||
65 | pkg_postinst_${PN}-conf() { | 78 | pkg_postinst_${PN}-conf() { |
@@ -70,7 +83,7 @@ pkg_postrm_${PN}-conf() { | |||
70 | update-alternatives --remove gpsd-defaults ${sysconfdir}/default/gpsd.default | 83 | update-alternatives --remove gpsd-defaults ${sysconfdir}/default/gpsd.default |
71 | } | 84 | } |
72 | 85 | ||
73 | PACKAGES =+ "libgps libgpsd python-pygps-dbg python-pygps gpsd-udev gpsd-conf gpsd-gpsctl gps-utils" | 86 | PACKAGES =+ "libgps libgpsd python-pygps-dbg python-pygps gpsd-udev gpsd-conf gpsd-gpsctl gps-utils ${PN}-systemd" |
74 | 87 | ||
75 | FILES_python-pygps-dbg += " ${libdir}/python*/site-packages/gps/.debug" | 88 | FILES_python-pygps-dbg += " ${libdir}/python*/site-packages/gps/.debug" |
76 | 89 | ||
@@ -78,7 +91,7 @@ RDEPENDS_${PN} = "gpsd-gpsctl" | |||
78 | RRECOMMENDS_${PN} = "gpsd-conf gpsd-udev" | 91 | RRECOMMENDS_${PN} = "gpsd-conf gpsd-udev" |
79 | 92 | ||
80 | DESCRIPTION_gpsd-udev = "udev relevant files to use gpsd hotplugging" | 93 | DESCRIPTION_gpsd-udev = "udev relevant files to use gpsd hotplugging" |
81 | FILES_gpsd-udev = "${base_libdir}/* ${sysconfdir}/udev/*" | 94 | FILES_gpsd-udev = "${base_libdir}/udev ${sysconfdir}/udev/*" |
82 | RDEPENDS_gpsd-udev += "udev gpsd-conf" | 95 | RDEPENDS_gpsd-udev += "udev gpsd-conf" |
83 | 96 | ||
84 | DESCRIPTION_libgpsd = "C service library used for communicating with gpsd" | 97 | DESCRIPTION_libgpsd = "C service library used for communicating with gpsd" |
@@ -100,3 +113,6 @@ RDEPENDS_gps-utils = "python-pygps" | |||
100 | DESCRIPTION_python-pygps = "Python bindings to gpsd" | 113 | DESCRIPTION_python-pygps = "Python bindings to gpsd" |
101 | FILES_python-pygps = "${PYTHON_SITEPACKAGES_DIR}/*" | 114 | FILES_python-pygps = "${PYTHON_SITEPACKAGES_DIR}/*" |
102 | RDEPENDS_python-pygps = "python-core python-curses gpsd python-json" | 115 | RDEPENDS_python-pygps = "python-core python-curses gpsd python-json" |
116 | |||
117 | FILES_${PN}-systemd += "${base_libdir}/systemd" | ||
118 | RDEPENDS_${PN}-systemd += "${PN}" | ||