diff options
Diffstat (limited to 'meta-oe/recipes-navigation/gpsd/gpsd_3.14.bb')
-rw-r--r-- | meta-oe/recipes-navigation/gpsd/gpsd_3.14.bb | 142 |
1 files changed, 142 insertions, 0 deletions
diff --git a/meta-oe/recipes-navigation/gpsd/gpsd_3.14.bb b/meta-oe/recipes-navigation/gpsd/gpsd_3.14.bb new file mode 100644 index 000000000..272bba8c2 --- /dev/null +++ b/meta-oe/recipes-navigation/gpsd/gpsd_3.14.bb | |||
@@ -0,0 +1,142 @@ | |||
1 | SUMMARY = "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 chrpath-replacement-native pps-tools" | ||
6 | PROVIDES = "virtual/gpsd" | ||
7 | |||
8 | EXTRANATIVEPATH += "chrpath-native" | ||
9 | |||
10 | SRC_URI = "${SAVANNAH_GNU_MIRROR}/${BPN}/${BP}.tar.gz \ | ||
11 | file://0001-SConstruct-respect-sysroot-also-in-SPLINTOPTS.patch \ | ||
12 | file://0002-SConstruct-remove-rpath.patch \ | ||
13 | file://0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch \ | ||
14 | file://0004-SConstruct-disable-html-and-man-docs-building-becaus.patch \ | ||
15 | file://0001-Check-for-__STDC_NO_ATOMICS__-before-using-stdatomic.patch \ | ||
16 | file://0002-Add-a-test-for-C11-and-check-we-have-C11-before-usin.patch \ | ||
17 | file://0003-Whoops-check-for-C11-not-for-not-C11-in-stdatomic.h-.patch \ | ||
18 | file://gpsd-default \ | ||
19 | file://gpsd \ | ||
20 | file://60-gpsd.rules \ | ||
21 | file://gpsd.service \ | ||
22 | " | ||
23 | SRC_URI[md5sum] = "bc7467009b99e07ba461377b5da6c039" | ||
24 | SRC_URI[sha256sum] = "504fc812f3c1525a1a48e04bf4d77f9a8066c201448d98089df89d58ef53a8cb" | ||
25 | |||
26 | inherit scons update-rc.d python-dir pythonnative systemd bluetooth | ||
27 | |||
28 | INITSCRIPT_NAME = "gpsd" | ||
29 | INITSCRIPT_PARAMS = "defaults 35" | ||
30 | |||
31 | SYSTEMD_OESCONS = "${@base_contains('DISTRO_FEATURES', 'systemd', 'true', 'false',d)}" | ||
32 | |||
33 | export STAGING_INCDIR | ||
34 | export STAGING_LIBDIR | ||
35 | |||
36 | PACKAGECONFIG ??= "qt ${@base_contains('DISTRO_FEATURES', 'bluetooth', '${BLUEZ}', '', d)}" | ||
37 | PACKAGECONFIG[bluez4] = "bluez='true',bluez='false',bluez4" | ||
38 | PACKAGECONFIG[qt] = "qt='yes',qt='no',qt4-x11-free" | ||
39 | EXTRA_OESCONS = " \ | ||
40 | sysroot=${STAGING_DIR_TARGET} \ | ||
41 | libQgpsmm='false' \ | ||
42 | debug='true' \ | ||
43 | strip='false' \ | ||
44 | chrpath='yes' \ | ||
45 | systemd='${SYSTEMD_OESCONS}' \ | ||
46 | ${EXTRA_OECONF} \ | ||
47 | " | ||
48 | # this cannot be used, because then chrpath is not found and only static lib is built | ||
49 | # target=${HOST_SYS} | ||
50 | |||
51 | do_compile_prepend() { | ||
52 | export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}" | ||
53 | export PKG_CONFIG="PKG_CONFIG_SYSROOT_DIR=\"${PKG_CONFIG_SYSROOT_DIR}\" pkg-config" | ||
54 | export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}" | ||
55 | |||
56 | export BUILD_SYS="${BUILD_SYS}" | ||
57 | export HOST_SYS="${HOST_SYS}" | ||
58 | } | ||
59 | |||
60 | do_install() { | ||
61 | export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}" | ||
62 | export PKG_CONFIG="PKG_CONFIG_SYSROOT_DIR=\"${PKG_CONFIG_SYSROOT_DIR}\" pkg-config" | ||
63 | export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}" | ||
64 | |||
65 | export BUILD_SYS="${BUILD_SYS}" | ||
66 | export HOST_SYS="${HOST_SYS}" | ||
67 | |||
68 | export DESTDIR="${D}" | ||
69 | # prefix is used for RPATH and DESTDIR/prefix for instalation | ||
70 | ${STAGING_BINDIR_NATIVE}/scons prefix=${prefix} install ${EXTRA_OESCONS}|| \ | ||
71 | bbfatal "scons install execution failed." | ||
72 | } | ||
73 | |||
74 | do_install_append() { | ||
75 | install -d ${D}/${sysconfdir}/init.d | ||
76 | install -m 0755 ${WORKDIR}/gpsd ${D}/${sysconfdir}/init.d/ | ||
77 | install -d ${D}/${sysconfdir}/default | ||
78 | install -m 0644 ${WORKDIR}/gpsd-default ${D}/${sysconfdir}/default/gpsd.default | ||
79 | |||
80 | #support for udev | ||
81 | install -d ${D}/${sysconfdir}/udev/rules.d | ||
82 | install -m 0644 ${WORKDIR}/60-gpsd.rules ${D}/${sysconfdir}/udev/rules.d | ||
83 | install -d ${D}${base_libdir}/udev/ | ||
84 | install -m 0755 ${S}/gpsd.hotplug ${D}${base_libdir}/udev/ | ||
85 | |||
86 | #support for python | ||
87 | install -d ${D}/${PYTHON_SITEPACKAGES_DIR}/gps | ||
88 | install -m 755 ${S}/gps/*.py ${D}/${PYTHON_SITEPACKAGES_DIR}/gps | ||
89 | |||
90 | #support for systemd | ||
91 | install -d ${D}${systemd_unitdir}/system/ | ||
92 | install -m 0644 ${WORKDIR}/${BPN}.service ${D}${systemd_unitdir}/system/${BPN}.service | ||
93 | install -m 0644 ${S}/systemd/${BPN}.socket ${D}${systemd_unitdir}/system/${BPN}.socket | ||
94 | } | ||
95 | |||
96 | pkg_postinst_${PN}-conf() { | ||
97 | update-alternatives --install ${sysconfdir}/default/gpsd gpsd-defaults ${sysconfdir}/default/gpsd.default 10 | ||
98 | } | ||
99 | |||
100 | pkg_postrm_${PN}-conf() { | ||
101 | update-alternatives --remove gpsd-defaults ${sysconfdir}/default/gpsd.default | ||
102 | } | ||
103 | |||
104 | PACKAGES =+ "libgps libgpsd python-pygps-dbg python-pygps gpsd-udev gpsd-conf gpsd-gpsctl gps-utils" | ||
105 | |||
106 | FILES_${PN}-dev += "${libdir}/pkgconfdir/libgpsd.pc ${libdir}/pkgconfdir/libgps.pc \ | ||
107 | ${libdir}/libQgpsmm.prl" | ||
108 | |||
109 | FILES_python-pygps-dbg += " ${libdir}/python*/site-packages/gps/.debug" | ||
110 | |||
111 | RDEPENDS_${PN} = "gpsd-gpsctl" | ||
112 | RRECOMMENDS_${PN} = "gpsd-conf gpsd-udev gpsd-machine-conf" | ||
113 | |||
114 | SUMMARY_gpsd-udev = "udev relevant files to use gpsd hotplugging" | ||
115 | FILES_gpsd-udev = "${base_libdir}/udev ${sysconfdir}/udev/*" | ||
116 | RDEPENDS_gpsd-udev += "udev gpsd-conf" | ||
117 | |||
118 | SUMMARY_libgpsd = "C service library used for communicating with gpsd" | ||
119 | FILES_libgpsd = "${libdir}/libgpsd.so.*" | ||
120 | |||
121 | SUMMARY_libgps = "C service library used for communicating with gpsd" | ||
122 | FILES_libgps = "${libdir}/libgps.so.*" | ||
123 | |||
124 | SUMMARY_gpsd-conf = "gpsd configuration files and init scripts" | ||
125 | FILES_gpsd-conf = "${sysconfdir}" | ||
126 | CONFFILES_gpsd-conf = "${sysconfdir}/default/gpsd.default" | ||
127 | |||
128 | SUMMARY_gpsd-gpsctl = "Tool for tweaking GPS modes" | ||
129 | FILES_gpsd-gpsctl = "${bindir}/gpsctl" | ||
130 | |||
131 | SUMMARY_gps-utils = "Utils used for simulating, monitoring,... a GPS" | ||
132 | FILES_gps-utils = "${bindir}/*" | ||
133 | RDEPENDS_gps-utils = "python-pygps" | ||
134 | |||
135 | SUMMARY_python-pygps = "Python bindings to gpsd" | ||
136 | FILES_python-pygps = "${PYTHON_SITEPACKAGES_DIR}/*" | ||
137 | RDEPENDS_python-pygps = "python-core python-curses gpsd python-json" | ||
138 | |||
139 | RPROVIDES_${PN} += "${PN}-systemd" | ||
140 | RREPLACES_${PN} += "${PN}-systemd" | ||
141 | RCONFLICTS_${PN} += "${PN}-systemd" | ||
142 | SYSTEMD_SERVICE_${PN} = "${PN}.socket" | ||