diff options
Diffstat (limited to 'meta-oe/recipes-navigation/gpsd/gpsd_3.27.5.bb')
| -rw-r--r-- | meta-oe/recipes-navigation/gpsd/gpsd_3.27.5.bb | 165 |
1 files changed, 165 insertions, 0 deletions
diff --git a/meta-oe/recipes-navigation/gpsd/gpsd_3.27.5.bb b/meta-oe/recipes-navigation/gpsd/gpsd_3.27.5.bb new file mode 100644 index 0000000000..f7ca367fa4 --- /dev/null +++ b/meta-oe/recipes-navigation/gpsd/gpsd_3.27.5.bb | |||
| @@ -0,0 +1,165 @@ | |||
| 1 | SUMMARY = "A TCP/IP Daemon simplifying the communication with GPS devices" | ||
| 2 | SECTION = "console/network" | ||
| 3 | LICENSE = "BSD-2-Clause" | ||
| 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=7a5d174db44ec45f9638b2c747806821" | ||
| 5 | DEPENDS = "dbus ncurses python3 pps-tools" | ||
| 6 | PROVIDES = "virtual/gpsd" | ||
| 7 | BUGTRACKER = "https://gitlab.com/gpsd/gpsd/-/issues" | ||
| 8 | HOMEPAGE = "https://gpsd.io/" | ||
| 9 | |||
| 10 | SRC_URI = "${SAVANNAH_GNU_MIRROR}/${BPN}/${BP}.tar.gz \ | ||
| 11 | file://gpsd.init \ | ||
| 12 | " | ||
| 13 | SRC_URI[sha256sum] = "409873f5048462ef1ac413a51ab35caa8b50b31be62b3347bee1cc2994e7c649" | ||
| 14 | |||
| 15 | inherit scons update-rc.d python3-dir python3native systemd update-alternatives pkgconfig | ||
| 16 | |||
| 17 | INITSCRIPT_PACKAGES = "gpsd-conf" | ||
| 18 | INITSCRIPT_NAME = "gpsd" | ||
| 19 | INITSCRIPT_PARAMS = "defaults 35" | ||
| 20 | |||
| 21 | SYSTEMD_OESCONS = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false',d)}" | ||
| 22 | |||
| 23 | export STAGING_INCDIR | ||
| 24 | export STAGING_LIBDIR | ||
| 25 | |||
| 26 | CLEANBROKEN = "1" | ||
| 27 | |||
| 28 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} usb" | ||
| 29 | PACKAGECONFIG[bluez] = "bluez='true',bluez='false',bluez5" | ||
| 30 | PACKAGECONFIG[qt] = "qt='yes' qt_versioned=5,qt='no',qtbase" | ||
| 31 | PACKAGECONFIG[pyserial] = "" | ||
| 32 | PACKAGECONFIG[usb] = "usb='true',usb='false',libusb1" | ||
| 33 | EXTRA_OESCONS = " \ | ||
| 34 | sysroot=${STAGING_DIR_TARGET} \ | ||
| 35 | libQgpsmm='false' \ | ||
| 36 | debug='false' \ | ||
| 37 | nostrip='true' \ | ||
| 38 | systemd='${SYSTEMD_OESCONS}' \ | ||
| 39 | libdir='${libdir}' \ | ||
| 40 | sbindir='${sbindir}' \ | ||
| 41 | udevdir='${nonarch_base_libdir}/udev' \ | ||
| 42 | unitdir='${systemd_system_unitdir}' \ | ||
| 43 | manbuild='false' \ | ||
| 44 | LINK='${CC}' \ | ||
| 45 | ${PACKAGECONFIG_CONFARGS} \ | ||
| 46 | " | ||
| 47 | # This cannot be used, because then chrpath is not found and only static lib is built | ||
| 48 | # target=${HOST_SYS} | ||
| 49 | |||
| 50 | do_compile:prepend() { | ||
| 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 CC="${CC}" | ||
| 55 | export LD="${CC}" | ||
| 56 | export LINKFLAGS="${LDFLAGS}" | ||
| 57 | } | ||
| 58 | |||
| 59 | do_install() { | ||
| 60 | export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}" | ||
| 61 | export PKG_CONFIG="PKG_CONFIG_SYSROOT_DIR=\"${PKG_CONFIG_SYSROOT_DIR}\" pkg-config" | ||
| 62 | export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}" | ||
| 63 | export LD="${CC}" | ||
| 64 | export LINKFLAGS="${LDFLAGS}" | ||
| 65 | |||
| 66 | export DESTDIR="${D}" | ||
| 67 | # prefix is used for RPATH and DESTDIR/prefix for installation | ||
| 68 | ${STAGING_BINDIR_NATIVE}/scons prefix=${prefix} python_libdir=${libdir} udev-install ${EXTRA_OESCONS} || \ | ||
| 69 | bbfatal "scons install execution failed." | ||
| 70 | } | ||
| 71 | |||
| 72 | do_install:append() { | ||
| 73 | install -d ${D}${sysconfdir}/init.d | ||
| 74 | install -m 0755 ${UNPACKDIR}/gpsd.init ${D}${sysconfdir}/init.d/gpsd | ||
| 75 | install -d ${D}${sysconfdir}/default | ||
| 76 | install -m 0644 ${S}/packaging/deb/etc_default_gpsd ${D}${sysconfdir}/default/gpsd.default | ||
| 77 | |||
| 78 | # Support for python | ||
| 79 | if [ -d ${D}${libdir}/gps ]; then | ||
| 80 | install -d ${D}${PYTHON_SITEPACKAGES_DIR}/gps | ||
| 81 | install -m 755 ${D}${libdir}/gps/*.py ${D}${PYTHON_SITEPACKAGES_DIR}/gps | ||
| 82 | fi | ||
| 83 | } | ||
| 84 | |||
| 85 | PACKAGES =+ "libgps python3-pygps gpsd-udev gpsd-conf gpsd-gpsctl gpsd-snmp gps-utils gps-utils-python" | ||
| 86 | |||
| 87 | RPROVIDES:${PN}-dbg += "python-pygps-dbg" | ||
| 88 | |||
| 89 | FILES:${PN}-dev += "${libdir}/libQgpsmm.prl" | ||
| 90 | |||
| 91 | FILES:${PN}-doc += "${datadir}/${BPN}/doc" | ||
| 92 | |||
| 93 | RDEPENDS:${PN} = "gpsd-gpsctl" | ||
| 94 | RRECOMMENDS:${PN} = "gpsd-conf gpsd-udev gpsd-machine-conf" | ||
| 95 | |||
| 96 | SUMMARY:gpsd-udev = "udev relevant files to use gpsd hotplugging" | ||
| 97 | FILES:gpsd-udev = "${nonarch_base_libdir}/udev" | ||
| 98 | RDEPENDS:gpsd-udev += "udev gpsd-conf" | ||
| 99 | |||
| 100 | SUMMARY:libgps = "C service library used for communicating with gpsd" | ||
| 101 | FILES:libgps = "${libdir}/libgps.so.*" | ||
| 102 | |||
| 103 | SUMMARY:gpsd-conf = "gpsd configuration files and init scripts" | ||
| 104 | FILES:gpsd-conf = "${sysconfdir}" | ||
| 105 | CONFFILES:gpsd-conf = "${sysconfdir}/default/gpsd.default" | ||
| 106 | |||
| 107 | SUMMARY:gpsd-gpsctl = "Tool for tweaking GPS modes" | ||
| 108 | FILES:gpsd-gpsctl = "${bindir}/gpsctl" | ||
| 109 | |||
| 110 | SUMMARY:gpsd-snmp = "MIB for using SNMP with gpsd" | ||
| 111 | FILES:gpsd-snmp = "${datadir}/snmp" | ||
| 112 | |||
| 113 | SUMMARY:gps-utils = "Utils used for simulating, monitoring,... a GPS" | ||
| 114 | FILES:gps-utils = "\ | ||
| 115 | ${bindir}/cgps \ | ||
| 116 | ${bindir}/gps2udp \ | ||
| 117 | ${bindir}/gpsctl \ | ||
| 118 | ${bindir}/gpsdebuginfo \ | ||
| 119 | ${bindir}/gpsdecode \ | ||
| 120 | ${bindir}/gpsmon \ | ||
| 121 | ${bindir}/gpspipe \ | ||
| 122 | ${bindir}/gpsrinex \ | ||
| 123 | ${bindir}/gpssnmp \ | ||
| 124 | ${bindir}/gpxlogger \ | ||
| 125 | ${bindir}/lcdgps \ | ||
| 126 | ${bindir}/ntpshmmon \ | ||
| 127 | ${bindir}/ppscheck \ | ||
| 128 | " | ||
| 129 | RRECOMMENDS:gps-utils = "gps-utils-python" | ||
| 130 | |||
| 131 | SUMMARY:gps-utils-python = "Python utils used for simulating, monitoring,... a GPS" | ||
| 132 | FILES:gps-utils-python = "\ | ||
| 133 | ${bindir}/gegps \ | ||
| 134 | ${bindir}/gpscat \ | ||
| 135 | ${bindir}/gpscsv \ | ||
| 136 | ${bindir}/gpsfake \ | ||
| 137 | ${bindir}/gpsplot \ | ||
| 138 | ${bindir}/gpsprof \ | ||
| 139 | ${bindir}/gpssubframe \ | ||
| 140 | ${bindir}/ubxtool \ | ||
| 141 | ${bindir}/xgps \ | ||
| 142 | ${bindir}/xgpsspeed \ | ||
| 143 | ${bindir}/zerk \ | ||
| 144 | " | ||
| 145 | RDEPENDS:gps-utils-python = "python3-pygps" | ||
| 146 | |||
| 147 | SUMMARY:python3-pygps = "Python bindings to gpsd" | ||
| 148 | FILES:python3-pygps = "${PYTHON_SITEPACKAGES_DIR}/* ${libdir}/gps/*.py ${libdir}/*.egg-info" | ||
| 149 | RDEPENDS:python3-pygps = " \ | ||
| 150 | python3-core \ | ||
| 151 | python3-io \ | ||
| 152 | ${@bb.utils.contains('PACKAGECONFIG', 'pyserial', 'python3-pyserial', '', d)} \ | ||
| 153 | python3-threading \ | ||
| 154 | python3-terminal \ | ||
| 155 | gpsd \ | ||
| 156 | python3-json" | ||
| 157 | |||
| 158 | RPROVIDES:${PN} += "${PN}-systemd" | ||
| 159 | RREPLACES:${PN} += "${PN}-systemd" | ||
| 160 | RCONFLICTS:${PN} += "${PN}-systemd" | ||
| 161 | SYSTEMD_SERVICE:${PN} = "${BPN}.socket ${BPN}ctl@.service" | ||
| 162 | |||
| 163 | ALTERNATIVE:${PN} = "gpsd-defaults" | ||
| 164 | ALTERNATIVE_LINK_NAME[gpsd-defaults] = "${sysconfdir}/default/gpsd" | ||
| 165 | ALTERNATIVE_TARGET[gpsd-defaults] = "${sysconfdir}/default/gpsd.default" | ||
