diff options
Diffstat (limited to 'meta-oe/recipes-navigation/gpsd/gpsd_3.4.bb')
-rw-r--r-- | meta-oe/recipes-navigation/gpsd/gpsd_3.4.bb | 115 |
1 files changed, 115 insertions, 0 deletions
diff --git a/meta-oe/recipes-navigation/gpsd/gpsd_3.4.bb b/meta-oe/recipes-navigation/gpsd/gpsd_3.4.bb new file mode 100644 index 000000000..972871a32 --- /dev/null +++ b/meta-oe/recipes-navigation/gpsd/gpsd_3.4.bb | |||
@@ -0,0 +1,115 @@ | |||
1 | DESCRIPTION = "A TCP/IP Daemon simplifying the communication with GPS devices" | ||
2 | SECTION = "console/network" | ||
3 | LICENSE = "BSD" | ||
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=d217a23f408e91c94359447735bc1800" | ||
5 | DEPENDS = "dbus dbus-glib ncurses python libusb1" | ||
6 | PROVIDES = "virtual/gpsd" | ||
7 | |||
8 | PR = "r0" | ||
9 | |||
10 | SRC_URI = "http://download.savannah.gnu.org/releases/gpsd/gpsd-${PV}.tar.gz;name=gpsd \ | ||
11 | file://gpsd-default \ | ||
12 | file://gpsd \ | ||
13 | file://gpsd.socket \ | ||
14 | file://gpsd.service \ | ||
15 | file://60-gpsd.rules" | ||
16 | SRC_URI[gpsd.md5sum] = "c01353459faa68834309109d4e868460" | ||
17 | SRC_URI[gpsd.sha256sum] = "79f7de9ead63c7f5d2c9a92e85b5f82e53323c4d451ef8e27ea265ac3ef9a70f" | ||
18 | |||
19 | inherit scons update-rc.d python-dir systemd | ||
20 | |||
21 | INITSCRIPT_NAME = "gpsd" | ||
22 | INITSCRIPT_PARAMS = "defaults 35" | ||
23 | |||
24 | SYSTEMD_PACKAGES = "${PN}-systemd" | ||
25 | SYSTEMD_SERVICE = "${PN}.socket" | ||
26 | |||
27 | |||
28 | LDFLAGS += "-L${STAGING_LIBDIR} -lm" | ||
29 | export STAGING_INCDIR | ||
30 | export STAGING_LIBDIR | ||
31 | |||
32 | CC += "${LDFLAGS}" | ||
33 | |||
34 | EXTRA_OESCONS = " \ | ||
35 | libQgpsmm='false' \ | ||
36 | debug='true' \ | ||
37 | strip='false' \ | ||
38 | systemd='true' \ | ||
39 | pkgconfig='${PKG_CONFIG_DIR}' \ | ||
40 | " | ||
41 | |||
42 | do_compile_prepend() { | ||
43 | export LIBPATH="${STAGING_LIBDIR}" | ||
44 | export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}" | ||
45 | export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}" | ||
46 | export BUILD_SYS="${BUILD_SYS}" | ||
47 | export HOST_SYS="${HOST_SYS}" | ||
48 | } | ||
49 | |||
50 | do_install_prepend() { | ||
51 | export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}" | ||
52 | export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}" | ||
53 | |||
54 | export BUILD_SYS="${BUILD_SYS}" | ||
55 | export HOST_SYS="${HOST_SYS}" | ||
56 | } | ||
57 | |||
58 | do_install_append() { | ||
59 | install -d ${D}/${sysconfdir}/init.d | ||
60 | install -m 0755 ${WORKDIR}/gpsd ${D}/${sysconfdir}/init.d/ | ||
61 | install -d ${D}/${sysconfdir}/default | ||
62 | install -m 0644 ${WORKDIR}/gpsd-default ${D}/${sysconfdir}/default/gpsd.default | ||
63 | |||
64 | #support for udev | ||
65 | install -d ${D}/${sysconfdir}/udev/rules.d | ||
66 | install -m 0644 ${WORKDIR}/60-gpsd.rules ${D}/${sysconfdir}/udev/rules.d | ||
67 | install -d ${D}${base_libdir}/udev/ | ||
68 | install -m 0755 ${S}/gpsd.hotplug ${D}${base_libdir}/udev/ | ||
69 | install -d ${D}${base_libdir}/udev/ | ||
70 | |||
71 | #support for python | ||
72 | install -d ${D}/${PYTHON_SITEPACKAGES_DIR}/gps | ||
73 | for f in ${S}/gps/* ;do | ||
74 | install $f ${D}/${PYTHON_SITEPACKAGES_DIR}/gps | ||
75 | done | ||
76 | } | ||
77 | |||
78 | pkg_postinst_${PN}-conf() { | ||
79 | update-alternatives --install ${sysconfdir}/default/gpsd gpsd-defaults ${sysconfdir}/default/gpsd.default 10 | ||
80 | } | ||
81 | |||
82 | pkg_postrm_${PN}-conf() { | ||
83 | update-alternatives --remove gpsd-defaults ${sysconfdir}/default/gpsd.default | ||
84 | } | ||
85 | |||
86 | PACKAGES =+ "libgps libgpsd python-pygps-dbg python-pygps gpsd-udev gpsd-conf gpsd-gpsctl gps-utils" | ||
87 | |||
88 | FILES_python-pygps-dbg += " ${libdir}/python*/site-packages/gps/.debug" | ||
89 | |||
90 | RDEPENDS_${PN} = "gpsd-gpsctl" | ||
91 | RRECOMMENDS_${PN} = "gpsd-conf gpsd-udev" | ||
92 | |||
93 | DESCRIPTION_gpsd-udev = "udev relevant files to use gpsd hotplugging" | ||
94 | FILES_gpsd-udev = "${base_libdir}/udev ${sysconfdir}/udev/*" | ||
95 | RDEPENDS_gpsd-udev += "udev gpsd-conf" | ||
96 | |||
97 | DESCRIPTION_libgpsd = "C service library used for communicating with gpsd" | ||
98 | FILES_libgpsd = "${libdir}/libgpsd.so.*" | ||
99 | |||
100 | DESCRIPTION_libgps = "C service library used for communicating with gpsd" | ||
101 | FILES_libgps = "${libdir}/libgps.so.*" | ||
102 | |||
103 | DESCRIPTION_gpsd-conf = "gpsd configuration files and init scripts" | ||
104 | FILES_gpsd-conf = "${sysconfdir}" | ||
105 | |||
106 | DESCRIPTION_gpsd-gpsctl = "Tool for tweaking GPS modes" | ||
107 | FILES_gpsd-gpsctl = "${bindir}/gpsctl" | ||
108 | |||
109 | DESCRIPTION_gps-utils = "Utils used for simulating, monitoring,... a GPS" | ||
110 | FILES_gps-utils = "${bindir}/*" | ||
111 | RDEPENDS_gps-utils = "python-pygps" | ||
112 | |||
113 | DESCRIPTION_python-pygps = "Python bindings to gpsd" | ||
114 | FILES_python-pygps = "${PYTHON_SITEPACKAGES_DIR}/*" | ||
115 | RDEPENDS_python-pygps = "python-core python-curses gpsd python-json" | ||