summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-navigation/gpsd/gpsd_3.20.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-navigation/gpsd/gpsd_3.20.bb')
-rw-r--r--meta-oe/recipes-navigation/gpsd/gpsd_3.20.bb137
1 files changed, 137 insertions, 0 deletions
diff --git a/meta-oe/recipes-navigation/gpsd/gpsd_3.20.bb b/meta-oe/recipes-navigation/gpsd/gpsd_3.20.bb
new file mode 100644
index 000000000..0914f7ec2
--- /dev/null
+++ b/meta-oe/recipes-navigation/gpsd/gpsd_3.20.bb
@@ -0,0 +1,137 @@
1SUMMARY = "A TCP/IP Daemon simplifying the communication with GPS devices"
2SECTION = "console/network"
3LICENSE = "BSD-2-Clause"
4LIC_FILES_CHKSUM = "file://COPYING;md5=01764c35ae34d9521944bb6ab312af53"
5DEPENDS = "dbus ncurses python3 pps-tools"
6PROVIDES = "virtual/gpsd"
7
8SRC_URI = "${SAVANNAH_GNU_MIRROR}/${BPN}/${BP}.tar.gz \
9 file://0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch \
10 file://0001-Revert-SConstruct-Add-test-for-sizeof-time_t-result-.patch \
11"
12SRC_URI[md5sum] = "cf7fdec7ce7221d20bee1a7246362b05"
13SRC_URI[sha256sum] = "172a7805068eacb815a3c5225436fcb0be46e7e49a5001a94034eac43df85e50"
14
15inherit scons update-rc.d python3-dir python3native systemd update-alternatives
16
17INITSCRIPT_PACKAGES = "gpsd-conf"
18INITSCRIPT_NAME = "gpsd"
19INITSCRIPT_PARAMS = "defaults 35"
20
21SYSTEMD_OESCONS = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false',d)}"
22
23export STAGING_INCDIR
24export STAGING_LIBDIR
25
26PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} usb"
27PACKAGECONFIG[bluez] = "bluez='true',bluez='false',bluez5"
28PACKAGECONFIG[qt] = "qt='yes' qt_versioned=5,qt='no',qtbase"
29PACKAGECONFIG[usb] = "usb='true',usb='false',libusb1"
30EXTRA_OESCONS = " \
31 sysroot=${STAGING_DIR_TARGET} \
32 libQgpsmm='false' \
33 debug='false' \
34 nostrip='true' \
35 systemd='${SYSTEMD_OESCONS}' \
36 libdir='${libdir}' \
37 manbuild='false' \
38 ${PACKAGECONFIG_CONFARGS} \
39"
40# this cannot be used, because then chrpath is not found and only static lib is built
41# target=${HOST_SYS}
42
43do_compile_prepend() {
44 export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}"
45 export PKG_CONFIG="PKG_CONFIG_SYSROOT_DIR=\"${PKG_CONFIG_SYSROOT_DIR}\" pkg-config"
46 export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}"
47 export LINKFLAGS="${LDFLAGS}"
48}
49
50do_install() {
51 export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}"
52 export PKG_CONFIG="PKG_CONFIG_SYSROOT_DIR=\"${PKG_CONFIG_SYSROOT_DIR}\" pkg-config"
53 export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}"
54 export LINKFLAGS="${LDFLAGS}"
55
56 export DESTDIR="${D}"
57 # prefix is used for RPATH and DESTDIR/prefix for instalation
58 ${STAGING_BINDIR_NATIVE}/scons prefix=${prefix} python_libdir=${libdir} install ${EXTRA_OESCONS} || \
59 bbfatal "scons install execution failed."
60}
61
62do_install_append() {
63 install -d ${D}/${sysconfdir}/init.d
64 install -m 0755 ${S}/packaging/deb/etc_init.d_gpsd ${D}/${sysconfdir}/init.d/gpsd
65 install -d ${D}/${sysconfdir}/default
66 install -m 0644 ${S}/packaging/deb/etc_default_gpsd ${D}/${sysconfdir}/default/gpsd.default
67
68 #support for udev
69 install -d ${D}/${sysconfdir}/udev/rules.d
70 install -m 0644 ${S}/gpsd.rules ${D}/${sysconfdir}/udev/rules.d/
71 install -d ${D}${base_libdir}/udev/
72 install -m 0755 ${S}/gpsd.hotplug ${D}${base_libdir}/udev/
73
74 #support for python
75 install -d ${D}/${PYTHON_SITEPACKAGES_DIR}/gps
76 install -m 755 ${S}/gps/*.py ${D}/${PYTHON_SITEPACKAGES_DIR}/gps
77
78 #support for systemd
79 install -d ${D}${systemd_unitdir}/system/
80 install -m 0644 ${S}/systemd/${BPN}.service ${D}${systemd_unitdir}/system/${BPN}.service
81 sed -i -e 's,/usr/local,/usr,g' ${D}${systemd_unitdir}/system/${BPN}.service
82 install -m 0644 ${S}/systemd/${BPN}ctl@.service ${D}${systemd_unitdir}/system/${BPN}ctl@.service
83 sed -i -e 's,/usr/local,/usr,g' ${D}${systemd_unitdir}/system/${BPN}ctl@.service
84 install -m 0644 ${S}/systemd/${BPN}.socket ${D}${systemd_unitdir}/system/${BPN}.socket
85}
86
87PACKAGES =+ "libgps libgpsd python3-pygps gpsd-udev gpsd-conf gpsd-gpsctl gps-utils"
88
89RPROVIDES_${PN}-dbg += "python-pygps-dbg"
90
91FILES_${PN}-dev += "${libdir}/pkgconfdir/libgpsd.pc ${libdir}/pkgconfdir/libgps.pc \
92 ${libdir}/libQgpsmm.prl"
93
94RDEPENDS_${PN} = "gpsd-gpsctl"
95RRECOMMENDS_${PN} = "gpsd-conf gpsd-udev gpsd-machine-conf"
96
97SUMMARY_gpsd-udev = "udev relevant files to use gpsd hotplugging"
98FILES_gpsd-udev = "${base_libdir}/udev ${sysconfdir}/udev/*"
99RDEPENDS_gpsd-udev += "udev gpsd-conf"
100
101SUMMARY_libgpsd = "C service library used for communicating with gpsd"
102FILES_libgpsd = "${libdir}/libgpsd.so.*"
103
104SUMMARY_libgps = "C service library used for communicating with gpsd"
105FILES_libgps = "${libdir}/libgps.so.*"
106
107SUMMARY_gpsd-conf = "gpsd configuration files and init scripts"
108FILES_gpsd-conf = "${sysconfdir}"
109CONFFILES_gpsd-conf = "${sysconfdir}/default/gpsd.default"
110
111SUMMARY_gpsd-gpsctl = "Tool for tweaking GPS modes"
112FILES_gpsd-gpsctl = "${bindir}/gpsctl"
113
114SUMMARY_gps-utils = "Utils used for simulating, monitoring,... a GPS"
115# Python files are required for gps/fake, required for gpsfake.
116FILES_gps-utils = "${bindir}/* ${libdir}/gps/*.py ${libdir}/gps/*.so"
117RDEPENDS_gps-utils = "python3-pygps"
118
119SUMMARY_python3-pygps = "Python bindings to gpsd"
120FILES_python3-pygps = "${PYTHON_SITEPACKAGES_DIR}/* ${libdir}/gps/*.py ${libdir}/*.egg-info"
121RDEPENDS_python3-pygps = " \
122 python3-core \
123 python3-io \
124 python3-threading \
125 python3-terminal \
126 gpsd \
127 python3-json"
128
129RPROVIDES_${PN} += "${PN}-systemd"
130RREPLACES_${PN} += "${PN}-systemd"
131RCONFLICTS_${PN} += "${PN}-systemd"
132SYSTEMD_SERVICE_${PN} = "${BPN}.socket ${BPN}ctl@.service"
133
134
135ALTERNATIVE_${PN} = "gpsd-defaults"
136ALTERNATIVE_LINK_NAME[gpsd-defaults] = "${sysconfdir}/default/gpsd"
137ALTERNATIVE_TARGET[gpsd-defaults] = "${sysconfdir}/default/gpsd.default"