Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 1 | SUMMARY = "A TCP/IP Daemon simplifying the communication with GPS devices" |
| 2 | SECTION = "console/network" |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 3 | LICENSE = "BSD-2-Clause" |
Andrew Geissler | d159c7f | 2021-09-02 21:05:58 -0500 | [diff] [blame^] | 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=7a5d174db44ec45f9638b2c747806821" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 5 | DEPENDS = "dbus ncurses python3 pps-tools" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 6 | PROVIDES = "virtual/gpsd" |
| 7 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 8 | SRC_URI = "${SAVANNAH_GNU_MIRROR}/${BPN}/${BP}.tar.gz \ |
Andrew Geissler | d159c7f | 2021-09-02 21:05:58 -0500 | [diff] [blame^] | 9 | file://0001-SConscript-Correct-the-installation-of-gpsd.hotplug.patch \ |
Andrew Geissler | 89770b0 | 2020-06-13 10:40:47 -0500 | [diff] [blame] | 10 | file://gpsd.init \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 11 | " |
Andrew Geissler | d159c7f | 2021-09-02 21:05:58 -0500 | [diff] [blame^] | 12 | SRC_URI[md5sum] = "b4f96cb01cbc06542b1cb66b3296078d" |
| 13 | SRC_URI[sha256sum] = "522c2362a7eb2d7ac37eaa1504f12aded1c373479a87ba06cc6795974b567bbc" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 14 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 15 | inherit scons update-rc.d python3-dir python3native systemd update-alternatives |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 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 | |
Andrew Geissler | 2ee498a | 2020-05-29 15:52:06 -0500 | [diff] [blame] | 26 | CLEANBROKEN = "1" |
| 27 | |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 28 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} usb" |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 29 | PACKAGECONFIG[bluez] = "bluez='true',bluez='false',bluez5" |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 30 | PACKAGECONFIG[qt] = "qt='yes' qt_versioned=5,qt='no',qtbase" |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 31 | PACKAGECONFIG[usb] = "usb='true',usb='false',libusb1" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 32 | EXTRA_OESCONS = " \ |
| 33 | sysroot=${STAGING_DIR_TARGET} \ |
| 34 | libQgpsmm='false' \ |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 35 | debug='false' \ |
| 36 | nostrip='true' \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 37 | systemd='${SYSTEMD_OESCONS}' \ |
| 38 | libdir='${libdir}' \ |
Andrew Geissler | d159c7f | 2021-09-02 21:05:58 -0500 | [diff] [blame^] | 39 | udevdir='${nonarch_base_libdir}/udev' \ |
| 40 | unitdir='${systemd_system_unitdir}' \ |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 41 | manbuild='false' \ |
Andrew Geissler | 2ee498a | 2020-05-29 15:52:06 -0500 | [diff] [blame] | 42 | LINK='${CC}' \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 43 | ${PACKAGECONFIG_CONFARGS} \ |
| 44 | " |
Andrew Geissler | d159c7f | 2021-09-02 21:05:58 -0500 | [diff] [blame^] | 45 | # This cannot be used, because then chrpath is not found and only static lib is built |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 46 | # target=${HOST_SYS} |
| 47 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 48 | do_compile:prepend() { |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 49 | export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}" |
| 50 | export PKG_CONFIG="PKG_CONFIG_SYSROOT_DIR=\"${PKG_CONFIG_SYSROOT_DIR}\" pkg-config" |
| 51 | export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}" |
Andrew Geissler | 2ee498a | 2020-05-29 15:52:06 -0500 | [diff] [blame] | 52 | export LD="${CC}" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 53 | export LINKFLAGS="${LDFLAGS}" |
| 54 | } |
| 55 | |
| 56 | do_install() { |
| 57 | export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}" |
| 58 | export PKG_CONFIG="PKG_CONFIG_SYSROOT_DIR=\"${PKG_CONFIG_SYSROOT_DIR}\" pkg-config" |
| 59 | export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}" |
Andrew Geissler | 2ee498a | 2020-05-29 15:52:06 -0500 | [diff] [blame] | 60 | export LD="${CC}" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 61 | export LINKFLAGS="${LDFLAGS}" |
| 62 | |
| 63 | export DESTDIR="${D}" |
Andrew Geissler | d159c7f | 2021-09-02 21:05:58 -0500 | [diff] [blame^] | 64 | # prefix is used for RPATH and DESTDIR/prefix for installation |
| 65 | ${STAGING_BINDIR_NATIVE}/scons prefix=${prefix} python_libdir=${libdir} udev-install ${EXTRA_OESCONS} || \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 66 | bbfatal "scons install execution failed." |
| 67 | } |
| 68 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 69 | do_install:append() { |
Andrew Geissler | d159c7f | 2021-09-02 21:05:58 -0500 | [diff] [blame^] | 70 | install -d ${D}${sysconfdir}/init.d |
| 71 | install -m 0755 ${WORKDIR}/gpsd.init ${D}${sysconfdir}/init.d/gpsd |
| 72 | install -d ${D}${sysconfdir}/default |
| 73 | install -m 0644 ${S}/packaging/deb/etc_default_gpsd ${D}${sysconfdir}/default/gpsd.default |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 74 | |
Andrew Geissler | d159c7f | 2021-09-02 21:05:58 -0500 | [diff] [blame^] | 75 | # Support for python |
| 76 | install -d ${D}${PYTHON_SITEPACKAGES_DIR}/gps |
| 77 | install -m 755 ${S}/gps/*.py ${D}${PYTHON_SITEPACKAGES_DIR}/gps |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 78 | } |
| 79 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 80 | PACKAGES =+ "libgps libgpsd python3-pygps gpsd-udev gpsd-conf gpsd-gpsctl gps-utils" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 81 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 82 | RPROVIDES:${PN}-dbg += "python-pygps-dbg" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 83 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 84 | FILES:${PN}-dev += "${libdir}/pkgconfdir/libgpsd.pc ${libdir}/pkgconfdir/libgps.pc \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 85 | ${libdir}/libQgpsmm.prl" |
| 86 | |
Andrew Geissler | d159c7f | 2021-09-02 21:05:58 -0500 | [diff] [blame^] | 87 | FILES:${PN}-doc += "${datadir}/${BPN}/doc" |
| 88 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 89 | RDEPENDS:${PN} = "gpsd-gpsctl" |
| 90 | RRECOMMENDS:${PN} = "gpsd-conf gpsd-udev gpsd-machine-conf" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 91 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 92 | SUMMARY:gpsd-udev = "udev relevant files to use gpsd hotplugging" |
Andrew Geissler | d159c7f | 2021-09-02 21:05:58 -0500 | [diff] [blame^] | 93 | FILES:gpsd-udev = "${nonarch_base_libdir}/udev" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 94 | RDEPENDS:gpsd-udev += "udev gpsd-conf" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 95 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 96 | SUMMARY:libgpsd = "C service library used for communicating with gpsd" |
| 97 | FILES:libgpsd = "${libdir}/libgpsd.so.*" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 98 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 99 | SUMMARY:libgps = "C service library used for communicating with gpsd" |
| 100 | FILES:libgps = "${libdir}/libgps.so.*" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 101 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 102 | SUMMARY:gpsd-conf = "gpsd configuration files and init scripts" |
| 103 | FILES:gpsd-conf = "${sysconfdir}" |
| 104 | CONFFILES:gpsd-conf = "${sysconfdir}/default/gpsd.default" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 105 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 106 | SUMMARY:gpsd-gpsctl = "Tool for tweaking GPS modes" |
| 107 | FILES:gpsd-gpsctl = "${bindir}/gpsctl" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 108 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 109 | SUMMARY:gps-utils = "Utils used for simulating, monitoring,... a GPS" |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 110 | # Python files are required for gps/fake, required for gpsfake. |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 111 | FILES:gps-utils = "${bindir}/* ${libdir}/gps/*.py ${libdir}/gps/*.so" |
| 112 | RDEPENDS:gps-utils = "python3-pygps" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 113 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 114 | SUMMARY:python3-pygps = "Python bindings to gpsd" |
| 115 | FILES:python3-pygps = "${PYTHON_SITEPACKAGES_DIR}/* ${libdir}/gps/*.py ${libdir}/*.egg-info" |
| 116 | RDEPENDS:python3-pygps = " \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 117 | python3-core \ |
| 118 | python3-io \ |
| 119 | python3-threading \ |
| 120 | python3-terminal \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 121 | gpsd \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 122 | python3-json" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 123 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 124 | RPROVIDES:${PN} += "${PN}-systemd" |
| 125 | RREPLACES:${PN} += "${PN}-systemd" |
| 126 | RCONFLICTS:${PN} += "${PN}-systemd" |
| 127 | SYSTEMD_SERVICE:${PN} = "${BPN}.socket ${BPN}ctl@.service" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 128 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 129 | ALTERNATIVE:${PN} = "gpsd-defaults" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 130 | ALTERNATIVE_LINK_NAME[gpsd-defaults] = "${sysconfdir}/default/gpsd" |
| 131 | ALTERNATIVE_TARGET[gpsd-defaults] = "${sysconfdir}/default/gpsd.default" |