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 \ |
Patrick Williams | 93c203f | 2021-10-06 16:15:23 -0500 | [diff] [blame] | 9 | file://gpsd.init \ |
| 10 | " |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame] | 11 | SRC_URI[sha256sum] = "00ee13f615655284874a661be13553abe66128e6deb5cd648af9bc0cb345fe5c" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 12 | |
Patrick Williams | 93c203f | 2021-10-06 16:15:23 -0500 | [diff] [blame] | 13 | inherit scons update-rc.d python3-dir python3native systemd update-alternatives pkgconfig |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 14 | |
| 15 | INITSCRIPT_PACKAGES = "gpsd-conf" |
| 16 | INITSCRIPT_NAME = "gpsd" |
| 17 | INITSCRIPT_PARAMS = "defaults 35" |
| 18 | |
| 19 | SYSTEMD_OESCONS = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false',d)}" |
| 20 | |
| 21 | export STAGING_INCDIR |
| 22 | export STAGING_LIBDIR |
| 23 | |
Andrew Geissler | 2ee498a | 2020-05-29 15:52:06 -0500 | [diff] [blame] | 24 | CLEANBROKEN = "1" |
| 25 | |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 26 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} usb" |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 27 | PACKAGECONFIG[bluez] = "bluez='true',bluez='false',bluez5" |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 28 | PACKAGECONFIG[qt] = "qt='yes' qt_versioned=5,qt='no',qtbase" |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 29 | PACKAGECONFIG[usb] = "usb='true',usb='false',libusb1" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 30 | EXTRA_OESCONS = " \ |
| 31 | sysroot=${STAGING_DIR_TARGET} \ |
| 32 | libQgpsmm='false' \ |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 33 | debug='false' \ |
| 34 | nostrip='true' \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 35 | systemd='${SYSTEMD_OESCONS}' \ |
| 36 | libdir='${libdir}' \ |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 37 | sbindir='${sbindir}' \ |
Andrew Geissler | d159c7f | 2021-09-02 21:05:58 -0500 | [diff] [blame] | 38 | udevdir='${nonarch_base_libdir}/udev' \ |
| 39 | unitdir='${systemd_system_unitdir}' \ |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 40 | manbuild='false' \ |
Andrew Geissler | 2ee498a | 2020-05-29 15:52:06 -0500 | [diff] [blame] | 41 | LINK='${CC}' \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 42 | ${PACKAGECONFIG_CONFARGS} \ |
| 43 | " |
Andrew Geissler | d159c7f | 2021-09-02 21:05:58 -0500 | [diff] [blame] | 44 | # 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] | 45 | # target=${HOST_SYS} |
| 46 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 47 | do_compile:prepend() { |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 48 | export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}" |
| 49 | export PKG_CONFIG="PKG_CONFIG_SYSROOT_DIR=\"${PKG_CONFIG_SYSROOT_DIR}\" pkg-config" |
| 50 | export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 51 | export CC="${CC}" |
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 |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 76 | if [ -d ${D}${libdir}/gps ]; then |
| 77 | install -d ${D}${PYTHON_SITEPACKAGES_DIR}/gps |
| 78 | install -m 755 ${D}${libdir}/gps/*.py ${D}${PYTHON_SITEPACKAGES_DIR}/gps |
| 79 | fi |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 80 | } |
| 81 | |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 82 | PACKAGES =+ "libgps python3-pygps gpsd-udev gpsd-conf gpsd-gpsctl gps-utils gps-utils-python" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 83 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 84 | RPROVIDES:${PN}-dbg += "python-pygps-dbg" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 85 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 86 | FILES:${PN}-dev += "${libdir}/libQgpsmm.prl" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 87 | |
Andrew Geissler | d159c7f | 2021-09-02 21:05:58 -0500 | [diff] [blame] | 88 | FILES:${PN}-doc += "${datadir}/${BPN}/doc" |
| 89 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 90 | RDEPENDS:${PN} = "gpsd-gpsctl" |
| 91 | RRECOMMENDS:${PN} = "gpsd-conf gpsd-udev gpsd-machine-conf" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 92 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 93 | SUMMARY:gpsd-udev = "udev relevant files to use gpsd hotplugging" |
Andrew Geissler | d159c7f | 2021-09-02 21:05:58 -0500 | [diff] [blame] | 94 | FILES:gpsd-udev = "${nonarch_base_libdir}/udev" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 95 | RDEPENDS:gpsd-udev += "udev gpsd-conf" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 96 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 97 | SUMMARY:libgps = "C service library used for communicating with gpsd" |
| 98 | FILES:libgps = "${libdir}/libgps.so.*" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 99 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 100 | SUMMARY:gpsd-conf = "gpsd configuration files and init scripts" |
| 101 | FILES:gpsd-conf = "${sysconfdir}" |
| 102 | CONFFILES:gpsd-conf = "${sysconfdir}/default/gpsd.default" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 103 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 104 | SUMMARY:gpsd-gpsctl = "Tool for tweaking GPS modes" |
| 105 | FILES:gpsd-gpsctl = "${bindir}/gpsctl" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 106 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 107 | SUMMARY:gps-utils = "Utils used for simulating, monitoring,... a GPS" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 108 | FILES:gps-utils = "\ |
| 109 | ${bindir}/cgps \ |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 110 | ${bindir}/gps2udp \ |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 111 | ${bindir}/gpsctl \ |
| 112 | ${bindir}/gpsdebuginfo \ |
| 113 | ${bindir}/gpsdecode \ |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 114 | ${bindir}/gpsmon \ |
| 115 | ${bindir}/gpspipe \ |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 116 | ${bindir}/gpsrinex \ |
| 117 | ${bindir}/gpssnmp \ |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 118 | ${bindir}/gpxlogger \ |
| 119 | ${bindir}/lcdgps \ |
| 120 | ${bindir}/ntpshmmon \ |
| 121 | ${bindir}/ppscheck \ |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 122 | " |
| 123 | RRECOMMENDS:gps-utils = "gps-utils-python" |
| 124 | |
| 125 | SUMMARY:gps-utils-python = "Python utils used for simulating, monitoring,... a GPS" |
| 126 | FILES:gps-utils-python = "\ |
| 127 | ${bindir}/gegps \ |
| 128 | ${bindir}/gpscat \ |
| 129 | ${bindir}/gpscsv \ |
| 130 | ${bindir}/gpsfake \ |
| 131 | ${bindir}/gpsplot \ |
| 132 | ${bindir}/gpsprof \ |
| 133 | ${bindir}/gpssubframe \ |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 134 | ${bindir}/ubxtool \ |
| 135 | ${bindir}/xgps \ |
| 136 | ${bindir}/xgpsspeed \ |
| 137 | ${bindir}/zerk \ |
| 138 | " |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 139 | RDEPENDS:gps-utils-python = "python3-pygps" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 140 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 141 | SUMMARY:python3-pygps = "Python bindings to gpsd" |
| 142 | FILES:python3-pygps = "${PYTHON_SITEPACKAGES_DIR}/* ${libdir}/gps/*.py ${libdir}/*.egg-info" |
| 143 | RDEPENDS:python3-pygps = " \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 144 | python3-core \ |
| 145 | python3-io \ |
| 146 | python3-threading \ |
| 147 | python3-terminal \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 148 | gpsd \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 149 | python3-json" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 150 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 151 | RPROVIDES:${PN} += "${PN}-systemd" |
| 152 | RREPLACES:${PN} += "${PN}-systemd" |
| 153 | RCONFLICTS:${PN} += "${PN}-systemd" |
| 154 | SYSTEMD_SERVICE:${PN} = "${BPN}.socket ${BPN}ctl@.service" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 155 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 156 | ALTERNATIVE:${PN} = "gpsd-defaults" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 157 | ALTERNATIVE_LINK_NAME[gpsd-defaults] = "${sysconfdir}/default/gpsd" |
| 158 | ALTERNATIVE_TARGET[gpsd-defaults] = "${sysconfdir}/default/gpsd.default" |