From 87f3070fa12b23ae22acb3ac98e59328a43a7a76 Mon Sep 17 00:00:00 2001 From: Matija Tudan Date: Thu, 19 Aug 2021 10:15:07 +0000 Subject: gpsd: upgrade 3.20 -> 3.23 Signed-off-by: Matija Tudan Signed-off-by: Khem Raj --- ...struct-Add-test-for-sizeof-time_t-result-.patch | 108 ---------------- ...prefix-includepy-with-sysroot-and-drop-sy.patch | 79 ----------- ...busexport.c-Fix-broken-d-bus-message-time.patch | 36 ------ meta-oe/recipes-navigation/gpsd/gpsd_3.20.bb | 144 --------------------- meta-oe/recipes-navigation/gpsd/gpsd_3.23.bb | 141 ++++++++++++++++++++ 5 files changed, 141 insertions(+), 367 deletions(-) delete mode 100644 meta-oe/recipes-navigation/gpsd/gpsd/0001-Revert-SConstruct-Add-test-for-sizeof-time_t-result-.patch delete mode 100644 meta-oe/recipes-navigation/gpsd/gpsd/0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch delete mode 100644 meta-oe/recipes-navigation/gpsd/gpsd/0001-gpsd-dbusexport.c-Fix-broken-d-bus-message-time.patch delete mode 100644 meta-oe/recipes-navigation/gpsd/gpsd_3.20.bb create mode 100644 meta-oe/recipes-navigation/gpsd/gpsd_3.23.bb (limited to 'meta-oe/recipes-navigation') diff --git a/meta-oe/recipes-navigation/gpsd/gpsd/0001-Revert-SConstruct-Add-test-for-sizeof-time_t-result-.patch b/meta-oe/recipes-navigation/gpsd/gpsd/0001-Revert-SConstruct-Add-test-for-sizeof-time_t-result-.patch deleted file mode 100644 index b021d0b727..0000000000 --- a/meta-oe/recipes-navigation/gpsd/gpsd/0001-Revert-SConstruct-Add-test-for-sizeof-time_t-result-.patch +++ /dev/null @@ -1,108 +0,0 @@ -Subject: [PATCH] Revert "SConstruct: Add test for sizeof(time_t), result in - SIZEOF_TIME_T." - -This reverts commit b32ff1a86c44fa738dabaf63de1b5462e0071ad3. - -Upstream-Status: Inappropriate [cross-compile specific] - ---- - SConstruct | 54 ++++-------------------------------------- - android/gpsd_config.in | 1 - - 2 files changed, 5 insertions(+), 50 deletions(-) - -diff --git a/SConstruct b/SConstruct -index 33e0ff326..e3c62fa3c 100644 ---- a/SConstruct -+++ b/SConstruct -@@ -597,42 +597,6 @@ def CheckHeaderDefines(context, file, define): - return ret - - --def CheckSizeOf(context, type): -- """Check sizeof 'type'""" -- context.Message('Checking size of ' + type + '... ') -- -- program = """ --#include --#include -- --/* -- * The CheckSizeOf function does not have a way for the caller to -- * specify header files to be included to provide the type being -- * checked. As a workaround until that is remedied, include the -- * header required for time_t, which is the sole current use of this -- * function. -- */ --#include -- --int main() { -- printf("%d", (int)sizeof(""" + type + """)); -- return 0; --} --""" -- -- # compile it -- ret = context.TryCompile(program, '.c') -- if 0 == ret: -- announce('ERROR: TryCompile failed\n') -- # fall back to sizeof(time_t) is 8 -- return '8' -- -- # run it -- ret = context.TryRun(program, '.c') -- context.Result(ret[0]) -- return ret[1] -- -- - def CheckCompilerDefines(context, define): - context.Message('Checking if compiler supplies %s... ' % (define,)) - ret = context.TryLink(""" -@@ -703,15 +667,13 @@ env.Prepend(LIBPATH=[os.path.realpath(os.curdir)]) - - # CheckXsltproc works, but result is incorrectly saved as "no" - config = Configure(env, custom_tests={ -- 'CheckC11': CheckC11, -- 'CheckCompilerDefines': CheckCompilerDefines, -- 'CheckCompilerOption': CheckCompilerOption, -- 'CheckHeaderDefines': CheckHeaderDefines, - 'CheckPKG': CheckPKG, -- 'CheckSizeOf': CheckSizeOf, - 'CheckXsltproc': CheckXsltproc, -- 'GetPythonValue': GetPythonValue, -- }) -+ 'CheckCompilerOption': CheckCompilerOption, -+ 'CheckCompilerDefines': CheckCompilerDefines, -+ 'CheckC11': CheckC11, -+ 'CheckHeaderDefines': CheckHeaderDefines, -+ 'GetPythonValue': GetPythonValue}) - - # Use print, rather than announce, so we see it in -s mode. - print("This system is: %s" % sys.platform) -@@ -1043,12 +1005,6 @@ else: - confdefs.append("/* #undef HAVE_%s_H */\n" - % hdr.replace("/", "_").upper()) - -- sizeof_time_t = config.CheckSizeOf("time_t") -- confdefs.append("#define SIZEOF_TIME_T %s\n" % sizeof_time_t) -- announce("sizeof(time_t) is %s" % sizeof_time_t) -- if 4 >= int(sizeof_time_t): -- announce("WARNING: time_t is too small. It will fail in 2038") -- - # check function after libraries, because some function require libraries - # for example clock_gettime() require librt on Linux glibc < 2.17 - for f in ("cfmakeraw", "clock_gettime", "daemon", "fcntl", "fork", -diff --git a/android/gpsd_config.in b/android/gpsd_config.in -index 758251986..d240f6d34 100644 ---- a/android/gpsd_config.in -+++ b/android/gpsd_config.in -@@ -19,7 +19,6 @@ - #define HAVE_ARPA_INET_H 1 - #define HAVE_SYSLOG_H 1 - #define HAVE_DAEMON 1 --#define SIZEOF_TIME_T 8 - #define HAVE_CLOCK_GETTIME 1 - #define HAVE_STRPTIME 1 - #define HAVE_GMTIME_R 1 --- -2.26.2 - diff --git a/meta-oe/recipes-navigation/gpsd/gpsd/0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch b/meta-oe/recipes-navigation/gpsd/gpsd/0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch deleted file mode 100644 index 23ae5e509d..0000000000 --- a/meta-oe/recipes-navigation/gpsd/gpsd/0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 5464d9e1bfd1a1c54338ec7c4148cad1b222ef93 Mon Sep 17 00:00:00 2001 -From: Martin Jansa -Date: Tue, 24 Apr 2012 18:45:14 +0200 -Subject: [PATCH] SConstruct: prefix includepy with sysroot and drop sysroot - from python_lib_dir - -* without PYTHONPATH, distutil's sysconfig returns INCLUDEPY without sysroot prefix - and with PYTHONPATH from OE it's pointing to native python dir - - $ export PYTHONPATH=/OE/shr-core/tmp-eglibc/sysroots/om-gta02/usr/lib/python2.7/ - $ python - Python 2.7.2 (default, Apr 18 2012, 09:19:59) - [GCC 4.6.2] on linux2 - Type "help", "copyright", "credits" or "license" for more information. - >>> from distutils import sysconfig - >>> sysconfig.get_config_vars('INCLUDEPY') - ['/OE/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/include/python2.7'] - >>> - $ unset PYTHONPATH - $ python - Python 2.7.2 (default, Apr 18 2012, 09:19:59) - [GCC 4.6.2] on linux2 - Type "help", "copyright", "credits" or "license" for more information. - >>> from distutils import sysconfig - >>> sysconfig.get_config_vars('INCLUDEPY') - ['/python2.7'] - >>> import sysconfig - >>> sysconfig.get_config_vars('INCLUDEPY') - ['/OE/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/include/python2.7'] -* python_lib_dir = python_lib_dir.replace(env['sysroot'], '') - returns path to target sysroot - -Upstream-Status: Inappropriate [embedded specific] - -Signed-off-by: Martin Jansa -Signed-off-by: Peter A. Bigot - ---- - SConstruct | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - -diff --git a/SConstruct b/SConstruct -index b8f3fb1..883e06d 100644 ---- a/SConstruct -+++ b/SConstruct -@@ -980,7 +980,7 @@ else: - - # Set up configuration for target Python - --PYTHON_LIBDIR_CALL = 'sysconfig.get_python_lib()' -+PYTHON_LIBDIR_CALL = 'sysconfig.get_python_lib(plat_specific=1)' - - PYTHON_CONFIG_NAMES = ['CC', 'CXX', 'OPT', 'BASECFLAGS', - 'CCSHARED', 'LDSHARED', 'SO', 'INCLUDEPY', 'LDFLAGS'] -@@ -1506,7 +1506,7 @@ else: - LINK=ldshared, - SHLIBPREFIX="", - SHLIBSUFFIX=python_config['SO'], -- CPPPATH=[python_config['INCLUDEPY']], -+ CPPPATH=[os.path.normpath("%s/%s/%s/%s" % (env['sysroot'], env['prefix'], env['includedir'], python_config['INCLUDEPY']))] if env['sysroot'] else [python_config['INCLUDEPY']], - CPPFLAGS=python_config['OPT'], - CFLAGS=python_config['BASECFLAGS'], - CXXFLAGS=python_config['BASECFLAGS']) -@@ -1808,12 +1808,14 @@ if ((not env['debug'] and not env['profiling'] and not env['nostrip'] and - env.AddPostAction(binaryinstall, '$STRIP $TARGET') - - if env['python']: -- python_module_dir = str(python_libdir) + os.sep + 'gps' -+ python_module_dir = python_libdir.replace(env['sysroot'], '') + os.sep + 'gps' - python_extensions_install = python_env.Install(DESTDIR + python_module_dir, - python_built_extensions) - if ((not env['debug'] and not env['profiling'] and - not env['nostrip'] and not sys.platform.startswith('darwin'))): - python_env.AddPostAction(python_extensions_install, '$STRIP $TARGET') -+ env.AddPostAction(python_extensions_install, '$CHRPATH -r "%s" "$TARGET"' \ -+ % (python_libdir, )) - - python_modules_install = python_env.Install(DESTDIR + python_module_dir, - python_modules) diff --git a/meta-oe/recipes-navigation/gpsd/gpsd/0001-gpsd-dbusexport.c-Fix-broken-d-bus-message-time.patch b/meta-oe/recipes-navigation/gpsd/gpsd/0001-gpsd-dbusexport.c-Fix-broken-d-bus-message-time.patch deleted file mode 100644 index 659865efe1..0000000000 --- a/meta-oe/recipes-navigation/gpsd/gpsd/0001-gpsd-dbusexport.c-Fix-broken-d-bus-message-time.patch +++ /dev/null @@ -1,36 +0,0 @@ -From c9cec2a888d4fea8534be78a0f46d920155ceae6 Mon Sep 17 00:00:00 2001 -From: Paul Fertser -Date: Wed, 4 Nov 2020 12:40:50 -0800 -Subject: [PATCH] gpsd/dbusexport.c: Fix broken d-bus message time. - -Change-Id: I4b9990ce4517a8feb29fc9e090c62f5a0c56ddd5 ---- - dbusexport.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/dbusexport.c b/dbusexport.c -index 40b35739e..5d08a8702 100644 ---- a/dbusexport.c -+++ b/dbusexport.c -@@ -38,6 +38,7 @@ void send_dbus_fix(struct gps_device_t *channel) - /*DBusMessageIter iter; */ - dbus_uint32_t serial; /* collected, but not used */ - char *gpsd_devname; -+ double dtime; // time as a double, loss of precision! - - /* if the connection is non existent, return without doing anything */ - if (connection == NULL) -@@ -51,8 +52,9 @@ void send_dbus_fix(struct gps_device_t *channel) - /* the dbus/locationd doc fails to specify altitude as WGS84 or MSL. - * assume altMSL */ - message = dbus_message_new_signal("/org/gpsd", "org.gpsd", "fix"); -+ dtime = TSTONS(&gpsfix->time); - dbus_message_append_args(message, -- DBUS_TYPE_DOUBLE, &(gpsfix->time), -+ DBUS_TYPE_DOUBLE, &dtime, - DBUS_TYPE_INT32, &(gpsfix->mode), - DBUS_TYPE_DOUBLE, &(gpsfix->ept), - DBUS_TYPE_DOUBLE, &(gpsfix->latitude), --- -2.20.1 - diff --git a/meta-oe/recipes-navigation/gpsd/gpsd_3.20.bb b/meta-oe/recipes-navigation/gpsd/gpsd_3.20.bb deleted file mode 100644 index 7f8382ed37..0000000000 --- a/meta-oe/recipes-navigation/gpsd/gpsd_3.20.bb +++ /dev/null @@ -1,144 +0,0 @@ -SUMMARY = "A TCP/IP Daemon simplifying the communication with GPS devices" -SECTION = "console/network" -LICENSE = "BSD-2-Clause" -LIC_FILES_CHKSUM = "file://COPYING;md5=01764c35ae34d9521944bb6ab312af53" -DEPENDS = "dbus ncurses python3 pps-tools" -PROVIDES = "virtual/gpsd" - -SRC_URI = "${SAVANNAH_GNU_MIRROR}/${BPN}/${BP}.tar.gz \ - file://0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch \ - file://0001-Revert-SConstruct-Add-test-for-sizeof-time_t-result-.patch \ - file://0001-gpsd-dbusexport.c-Fix-broken-d-bus-message-time.patch \ - file://gpsd.init \ -" -SRC_URI[md5sum] = "cf7fdec7ce7221d20bee1a7246362b05" -SRC_URI[sha256sum] = "172a7805068eacb815a3c5225436fcb0be46e7e49a5001a94034eac43df85e50" - -inherit scons update-rc.d python3-dir python3native systemd update-alternatives - -INITSCRIPT_PACKAGES = "gpsd-conf" -INITSCRIPT_NAME = "gpsd" -INITSCRIPT_PARAMS = "defaults 35" - -SYSTEMD_OESCONS = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false',d)}" - -export STAGING_INCDIR -export STAGING_LIBDIR - -CLEANBROKEN = "1" - -PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} usb" -PACKAGECONFIG[bluez] = "bluez='true',bluez='false',bluez5" -PACKAGECONFIG[qt] = "qt='yes' qt_versioned=5,qt='no',qtbase" -PACKAGECONFIG[usb] = "usb='true',usb='false',libusb1" -EXTRA_OESCONS = " \ - sysroot=${STAGING_DIR_TARGET} \ - libQgpsmm='false' \ - debug='false' \ - nostrip='true' \ - systemd='${SYSTEMD_OESCONS}' \ - libdir='${libdir}' \ - manbuild='false' \ - LINK='${CC}' \ - ${PACKAGECONFIG_CONFARGS} \ -" -# this cannot be used, because then chrpath is not found and only static lib is built -# target=${HOST_SYS} - -do_compile:prepend() { - export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}" - export PKG_CONFIG="PKG_CONFIG_SYSROOT_DIR=\"${PKG_CONFIG_SYSROOT_DIR}\" pkg-config" - export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}" - export LD="${CC}" - export LINKFLAGS="${LDFLAGS}" -} - -do_install() { - export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}" - export PKG_CONFIG="PKG_CONFIG_SYSROOT_DIR=\"${PKG_CONFIG_SYSROOT_DIR}\" pkg-config" - export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}" - export LD="${CC}" - export LINKFLAGS="${LDFLAGS}" - - export DESTDIR="${D}" - # prefix is used for RPATH and DESTDIR/prefix for instalation - ${STAGING_BINDIR_NATIVE}/scons prefix=${prefix} python_libdir=${libdir} install ${EXTRA_OESCONS} || \ - bbfatal "scons install execution failed." -} - -do_install:append() { - install -d ${D}/${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/gpsd.init ${D}/${sysconfdir}/init.d/gpsd - install -d ${D}/${sysconfdir}/default - install -m 0644 ${S}/packaging/deb/etc_default_gpsd ${D}/${sysconfdir}/default/gpsd.default - - #support for udev - install -d ${D}/${sysconfdir}/udev/rules.d - install -m 0644 ${S}/gpsd.rules ${D}/${sysconfdir}/udev/rules.d/ - install -d ${D}${base_libdir}/udev/ - install -m 0755 ${S}/gpsd.hotplug ${D}${base_libdir}/udev/ - - #support for python - install -d ${D}/${PYTHON_SITEPACKAGES_DIR}/gps - install -m 755 ${S}/gps/*.py ${D}/${PYTHON_SITEPACKAGES_DIR}/gps - - #support for systemd - install -d ${D}${systemd_unitdir}/system/ - install -m 0644 ${S}/systemd/${BPN}.service ${D}${systemd_unitdir}/system/${BPN}.service - sed -i -e 's,/usr/local,/usr,g' ${D}${systemd_unitdir}/system/${BPN}.service - install -m 0644 ${S}/systemd/${BPN}ctl@.service ${D}${systemd_unitdir}/system/${BPN}ctl@.service - sed -i -e 's,/usr/local,/usr,g' ${D}${systemd_unitdir}/system/${BPN}ctl@.service - install -m 0644 ${S}/systemd/${BPN}.socket ${D}${systemd_unitdir}/system/${BPN}.socket -} - -PACKAGES =+ "libgps libgpsd python3-pygps gpsd-udev gpsd-conf gpsd-gpsctl gps-utils" - -RPROVIDES:${PN}-dbg += "python-pygps-dbg" - -FILES:${PN}-dev += "${libdir}/pkgconfdir/libgpsd.pc ${libdir}/pkgconfdir/libgps.pc \ - ${libdir}/libQgpsmm.prl" - -RDEPENDS:${PN} = "gpsd-gpsctl" -RRECOMMENDS:${PN} = "gpsd-conf gpsd-udev gpsd-machine-conf" - -SUMMARY:gpsd-udev = "udev relevant files to use gpsd hotplugging" -FILES:gpsd-udev = "${base_libdir}/udev ${sysconfdir}/udev/*" -RDEPENDS:gpsd-udev += "udev gpsd-conf" - -SUMMARY:libgpsd = "C service library used for communicating with gpsd" -FILES:libgpsd = "${libdir}/libgpsd.so.*" - -SUMMARY:libgps = "C service library used for communicating with gpsd" -FILES:libgps = "${libdir}/libgps.so.*" - -SUMMARY:gpsd-conf = "gpsd configuration files and init scripts" -FILES:gpsd-conf = "${sysconfdir}" -CONFFILES:gpsd-conf = "${sysconfdir}/default/gpsd.default" - -SUMMARY:gpsd-gpsctl = "Tool for tweaking GPS modes" -FILES:gpsd-gpsctl = "${bindir}/gpsctl" - -SUMMARY:gps-utils = "Utils used for simulating, monitoring,... a GPS" -# Python files are required for gps/fake, required for gpsfake. -FILES:gps-utils = "${bindir}/* ${libdir}/gps/*.py ${libdir}/gps/*.so" -RDEPENDS:gps-utils = "python3-pygps" - -SUMMARY:python3-pygps = "Python bindings to gpsd" -FILES:python3-pygps = "${PYTHON_SITEPACKAGES_DIR}/* ${libdir}/gps/*.py ${libdir}/*.egg-info" -RDEPENDS:python3-pygps = " \ - python3-core \ - python3-io \ - python3-threading \ - python3-terminal \ - gpsd \ - python3-json" - -RPROVIDES:${PN} += "${PN}-systemd" -RREPLACES:${PN} += "${PN}-systemd" -RCONFLICTS:${PN} += "${PN}-systemd" -SYSTEMD_SERVICE:${PN} = "${BPN}.socket ${BPN}ctl@.service" - - -ALTERNATIVE:${PN} = "gpsd-defaults" -ALTERNATIVE_LINK_NAME[gpsd-defaults] = "${sysconfdir}/default/gpsd" -ALTERNATIVE_TARGET[gpsd-defaults] = "${sysconfdir}/default/gpsd.default" diff --git a/meta-oe/recipes-navigation/gpsd/gpsd_3.23.bb b/meta-oe/recipes-navigation/gpsd/gpsd_3.23.bb new file mode 100644 index 0000000000..1d031ee952 --- /dev/null +++ b/meta-oe/recipes-navigation/gpsd/gpsd_3.23.bb @@ -0,0 +1,141 @@ +SUMMARY = "A TCP/IP Daemon simplifying the communication with GPS devices" +SECTION = "console/network" +LICENSE = "BSD-2-Clause" +LIC_FILES_CHKSUM = "file://COPYING;md5=7a5d174db44ec45f9638b2c747806821" +DEPENDS = "dbus ncurses python3 pps-tools" +PROVIDES = "virtual/gpsd" + +SRC_URI = "${SAVANNAH_GNU_MIRROR}/${BPN}/${BP}.tar.gz \ + file://gpsd.init \ +" +SRC_URI[md5sum] = "b4f96cb01cbc06542b1cb66b3296078d" +SRC_URI[sha256sum] = "522c2362a7eb2d7ac37eaa1504f12aded1c373479a87ba06cc6795974b567bbc" + +inherit scons update-rc.d python3-dir python3native systemd update-alternatives + +INITSCRIPT_PACKAGES = "gpsd-conf" +INITSCRIPT_NAME = "gpsd" +INITSCRIPT_PARAMS = "defaults 35" + +SYSTEMD_OESCONS = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false',d)}" + +export STAGING_INCDIR +export STAGING_LIBDIR + +CLEANBROKEN = "1" + +PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} usb" +PACKAGECONFIG[bluez] = "bluez='true',bluez='false',bluez5" +PACKAGECONFIG[qt] = "qt='yes' qt_versioned=5,qt='no',qtbase" +PACKAGECONFIG[usb] = "usb='true',usb='false',libusb1" +EXTRA_OESCONS = " \ + sysroot=${STAGING_DIR_TARGET} \ + libQgpsmm='false' \ + debug='false' \ + nostrip='true' \ + systemd='${SYSTEMD_OESCONS}' \ + libdir='${libdir}' \ + manbuild='false' \ + LINK='${CC}' \ + ${PACKAGECONFIG_CONFARGS} \ +" +# this cannot be used, because then chrpath is not found and only static lib is built +# target=${HOST_SYS} + +do_compile:prepend() { + export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}" + export PKG_CONFIG="PKG_CONFIG_SYSROOT_DIR=\"${PKG_CONFIG_SYSROOT_DIR}\" pkg-config" + export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}" + export LD="${CC}" + export LINKFLAGS="${LDFLAGS}" +} + +do_install() { + export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}" + export PKG_CONFIG="PKG_CONFIG_SYSROOT_DIR=\"${PKG_CONFIG_SYSROOT_DIR}\" pkg-config" + export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}" + export LD="${CC}" + export LINKFLAGS="${LDFLAGS}" + + export DESTDIR="${D}" + # prefix is used for RPATH and DESTDIR/prefix for instalation + ${STAGING_BINDIR_NATIVE}/scons prefix=${prefix} python_libdir=${libdir} install ${EXTRA_OESCONS} || \ + bbfatal "scons install execution failed." +} + +do_install:append() { + install -d ${D}/${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/gpsd.init ${D}/${sysconfdir}/init.d/gpsd + install -d ${D}/${sysconfdir}/default + install -m 0644 ${S}/packaging/deb/etc_default_gpsd ${D}/${sysconfdir}/default/gpsd.default + + #support for udev + install -d ${D}/${sysconfdir}/udev/rules.d + install -m 0644 ${S}/gpsd.rules.in ${D}/${sysconfdir}/udev/rules.d/ + install -d ${D}${base_libdir}/udev/ + install -m 0755 ${S}/gpsd.hotplug ${D}${base_libdir}/udev/ + + #support for python + install -d ${D}/${PYTHON_SITEPACKAGES_DIR}/gps + install -m 755 ${S}/gps/*.py ${D}/${PYTHON_SITEPACKAGES_DIR}/gps + + #support for systemd + install -d ${D}${systemd_unitdir}/system/ + install -m 0644 ${S}/systemd/${BPN}.service.in ${D}${systemd_unitdir}/system/${BPN}.service + sed -i -e 's,@SBINDIR@,/usr/sbin,g' ${D}${systemd_unitdir}/system/${BPN}.service + install -m 0644 ${S}/systemd/${BPN}ctl@.service.in ${D}${systemd_unitdir}/system/${BPN}ctl@.service + sed -i -e 's,@SBINDIR@,/usr/sbin,g' ${D}${systemd_unitdir}/system/${BPN}ctl@.service + install -m 0644 ${S}/systemd/${BPN}.socket.in ${D}${systemd_unitdir}/system/${BPN}.socket +} + +PACKAGES =+ "libgps libgpsd python3-pygps gpsd-udev gpsd-conf gpsd-gpsctl gps-utils" + +RPROVIDES:${PN}-dbg += "python-pygps-dbg" + +FILES:${PN}-dev += "${libdir}/pkgconfdir/libgpsd.pc ${libdir}/pkgconfdir/libgps.pc \ + ${libdir}/libQgpsmm.prl" + +RDEPENDS:${PN} = "gpsd-gpsctl" +RRECOMMENDS:${PN} = "gpsd-conf gpsd-udev gpsd-machine-conf" + +SUMMARY:gpsd-udev = "udev relevant files to use gpsd hotplugging" +FILES:gpsd-udev = "${base_libdir}/udev ${sysconfdir}/udev/*" +RDEPENDS:gpsd-udev += "udev gpsd-conf" + +SUMMARY:libgpsd = "C service library used for communicating with gpsd" +FILES:libgpsd = "${libdir}/libgpsd.so.*" + +SUMMARY:libgps = "C service library used for communicating with gpsd" +FILES:libgps = "${libdir}/libgps.so.*" + +SUMMARY:gpsd-conf = "gpsd configuration files and init scripts" +FILES:gpsd-conf = "${sysconfdir}" +CONFFILES:gpsd-conf = "${sysconfdir}/default/gpsd.default" + +SUMMARY:gpsd-gpsctl = "Tool for tweaking GPS modes" +FILES:gpsd-gpsctl = "${bindir}/gpsctl" + +SUMMARY:gps-utils = "Utils used for simulating, monitoring,... a GPS" +# Python files are required for gps/fake, required for gpsfake. +FILES:gps-utils = "${bindir}/* ${libdir}/gps/*.py ${libdir}/gps/*.so" +RDEPENDS:gps-utils = "python3-pygps" + +SUMMARY:python3-pygps = "Python bindings to gpsd" +FILES:python3-pygps = "${PYTHON_SITEPACKAGES_DIR}/* ${libdir}/gps/*.py ${libdir}/*.egg-info" +RDEPENDS:python3-pygps = " \ + python3-core \ + python3-io \ + python3-threading \ + python3-terminal \ + gpsd \ + python3-json" + +RPROVIDES:${PN} += "${PN}-systemd" +RREPLACES:${PN} += "${PN}-systemd" +RCONFLICTS:${PN} += "${PN}-systemd" +SYSTEMD_SERVICE:${PN} = "${BPN}.socket ${BPN}ctl@.service" + + +ALTERNATIVE:${PN} = "gpsd-defaults" +ALTERNATIVE_LINK_NAME[gpsd-defaults] = "${sysconfdir}/default/gpsd" +ALTERNATIVE_TARGET[gpsd-defaults] = "${sysconfdir}/default/gpsd.default" -- cgit 1.2.3-korg