summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-navigation/gpsd/gpsd_3.14.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-navigation/gpsd/gpsd_3.14.bb')
-rw-r--r--meta-oe/recipes-navigation/gpsd/gpsd_3.14.bb142
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 @@
1SUMMARY = "A TCP/IP Daemon simplifying the communication with GPS devices"
2SECTION = "console/network"
3LICENSE = "BSD"
4LIC_FILES_CHKSUM = "file://COPYING;md5=d217a23f408e91c94359447735bc1800"
5DEPENDS = "dbus dbus-glib ncurses python libusb1 chrpath-replacement-native pps-tools"
6PROVIDES = "virtual/gpsd"
7
8EXTRANATIVEPATH += "chrpath-native"
9
10SRC_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"
23SRC_URI[md5sum] = "bc7467009b99e07ba461377b5da6c039"
24SRC_URI[sha256sum] = "504fc812f3c1525a1a48e04bf4d77f9a8066c201448d98089df89d58ef53a8cb"
25
26inherit scons update-rc.d python-dir pythonnative systemd bluetooth
27
28INITSCRIPT_NAME = "gpsd"
29INITSCRIPT_PARAMS = "defaults 35"
30
31SYSTEMD_OESCONS = "${@base_contains('DISTRO_FEATURES', 'systemd', 'true', 'false',d)}"
32
33export STAGING_INCDIR
34export STAGING_LIBDIR
35
36PACKAGECONFIG ??= "qt ${@base_contains('DISTRO_FEATURES', 'bluetooth', '${BLUEZ}', '', d)}"
37PACKAGECONFIG[bluez4] = "bluez='true',bluez='false',bluez4"
38PACKAGECONFIG[qt] = "qt='yes',qt='no',qt4-x11-free"
39EXTRA_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
51do_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
60do_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
74do_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
96pkg_postinst_${PN}-conf() {
97 update-alternatives --install ${sysconfdir}/default/gpsd gpsd-defaults ${sysconfdir}/default/gpsd.default 10
98}
99
100pkg_postrm_${PN}-conf() {
101 update-alternatives --remove gpsd-defaults ${sysconfdir}/default/gpsd.default
102}
103
104PACKAGES =+ "libgps libgpsd python-pygps-dbg python-pygps gpsd-udev gpsd-conf gpsd-gpsctl gps-utils"
105
106FILES_${PN}-dev += "${libdir}/pkgconfdir/libgpsd.pc ${libdir}/pkgconfdir/libgps.pc \
107 ${libdir}/libQgpsmm.prl"
108
109FILES_python-pygps-dbg += " ${libdir}/python*/site-packages/gps/.debug"
110
111RDEPENDS_${PN} = "gpsd-gpsctl"
112RRECOMMENDS_${PN} = "gpsd-conf gpsd-udev gpsd-machine-conf"
113
114SUMMARY_gpsd-udev = "udev relevant files to use gpsd hotplugging"
115FILES_gpsd-udev = "${base_libdir}/udev ${sysconfdir}/udev/*"
116RDEPENDS_gpsd-udev += "udev gpsd-conf"
117
118SUMMARY_libgpsd = "C service library used for communicating with gpsd"
119FILES_libgpsd = "${libdir}/libgpsd.so.*"
120
121SUMMARY_libgps = "C service library used for communicating with gpsd"
122FILES_libgps = "${libdir}/libgps.so.*"
123
124SUMMARY_gpsd-conf = "gpsd configuration files and init scripts"
125FILES_gpsd-conf = "${sysconfdir}"
126CONFFILES_gpsd-conf = "${sysconfdir}/default/gpsd.default"
127
128SUMMARY_gpsd-gpsctl = "Tool for tweaking GPS modes"
129FILES_gpsd-gpsctl = "${bindir}/gpsctl"
130
131SUMMARY_gps-utils = "Utils used for simulating, monitoring,... a GPS"
132FILES_gps-utils = "${bindir}/*"
133RDEPENDS_gps-utils = "python-pygps"
134
135SUMMARY_python-pygps = "Python bindings to gpsd"
136FILES_python-pygps = "${PYTHON_SITEPACKAGES_DIR}/*"
137RDEPENDS_python-pygps = "python-core python-curses gpsd python-json"
138
139RPROVIDES_${PN} += "${PN}-systemd"
140RREPLACES_${PN} += "${PN}-systemd"
141RCONFLICTS_${PN} += "${PN}-systemd"
142SYSTEMD_SERVICE_${PN} = "${PN}.socket"