diff --git a/science/gis/gpsd/actions.py b/science/gis/gpsd/actions.py new file mode 100644 index 0000000000..5150cabc22 --- /dev/null +++ b/science/gis/gpsd/actions.py @@ -0,0 +1,30 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# +# Licensed under the GNU General Public License, version 3. +# See the file https://www.gnu.org/licenses/gpl-3.0.txt + +from pisi.actionsapi import shelltools +from pisi.actionsapi import autotools +from pisi.actionsapi import pisitools +from pisi.actionsapi import get + +shelltools.export("PYTHONDONTWRITEBYTECODE", "1") +i = "/usr/bin/env python3 $(which scons)" + +def setup(): + pass + +def build(): + shelltools.system("%s target_python=python3 prefix=/usr sbindir=/usr/sbin udevdir=/lib/udev" % i) + +def install(): + shelltools.system("DESTDIR=%s %s udev-install prefix=/usr" % (get.installDIR(), i)) + + # fix shebang + shelltools.system("find %s/usr/bin -type f -exec sed -i 's|env\ python$|env python3|g' {} \;" % get.installDIR()) + + # Install UDEV files +# pisitools.insinto("/lib/udev/rules.d", "gpsd.rules", "99-gpsd.rules") +# pisitools.dobin("gpsd.hotplug", "/lib/udev") + diff --git a/science/gis/gpsd/comar/service.py b/science/gis/gpsd/comar/service.py new file mode 100644 index 0000000000..088f016aec --- /dev/null +++ b/science/gis/gpsd/comar/service.py @@ -0,0 +1,23 @@ +from comar.service import * + +import os + +serviceType = "local" +serviceDesc = _({"en": "GPS Daemon", + "tr": "GPS Hizmeti"}) +serviceDefault = "off" + +@synchronized +def start(): + startService(command="/usr/sbin/gpsd", + args="-P /run/gpsd.pid -F /run/sock %s %s" % + (config.get("OPTIONS", "-n"), config.get("DEVICE", "/dev/ttyUSB0"))) + +@synchronized +def stop(): + stopService(pidfile="/run/gpsd.pid", donotify=True) + if os.path.exists("/run/gpsd.pid"): + os.unlink("/run/gpsd.pid") + +def status(): + return isServiceRunning("/run/gpsd.pid") diff --git a/science/gis/gpsd/files/data/gpsd-logo.png b/science/gis/gpsd/files/data/gpsd-logo.png new file mode 100644 index 0000000000..83ca308013 Binary files /dev/null and b/science/gis/gpsd/files/data/gpsd-logo.png differ diff --git a/science/gis/gpsd/files/data/xgps.desktop b/science/gis/gpsd/files/data/xgps.desktop new file mode 100644 index 0000000000..d614d7a6e5 --- /dev/null +++ b/science/gis/gpsd/files/data/xgps.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=xgps +GenericName=GPS information +GenericName[tr]=GPS bilgi görüntüleyici +Comment=Display GPS information from a gpsd daemon +Comment[tr]=gpsd hizmetinden alınan bilgileri görüntüler +Exec=xgps +Icon=gpsd-logo +Terminal=false +Type=Application +Categories=Application;Graphics; diff --git a/science/gis/gpsd/files/data/xgpsspeed.desktop b/science/gis/gpsd/files/data/xgpsspeed.desktop new file mode 100644 index 0000000000..146d24bac7 --- /dev/null +++ b/science/gis/gpsd/files/data/xgpsspeed.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=xgpsspeed +GenericName=GPS speedometer +GenericName[tr]=GPS hızölçer +Comment=Display GPS speed from a gpsd daemon +Comment[tr]=gpsd hizmetinden alınan hız bilgilerini görüntüler +Exec=xgpsspeed +Icon=gpsd-logo +Terminal=false +Type=Application +Categories=Application;Graphics; diff --git a/science/gis/gpsd/files/gpsd.sysconfig b/science/gis/gpsd/files/gpsd.sysconfig new file mode 100644 index 0000000000..1f7b1f638a --- /dev/null +++ b/science/gis/gpsd/files/gpsd.sysconfig @@ -0,0 +1,2 @@ +OPTIONS="-n" +DEVICE="/dev/ttyUSB0" diff --git a/science/gis/gpsd/files/pylibdir_no_prefix_replace.patch b/science/gis/gpsd/files/pylibdir_no_prefix_replace.patch new file mode 100644 index 0000000000..5783e91549 --- /dev/null +++ b/science/gis/gpsd/files/pylibdir_no_prefix_replace.patch @@ -0,0 +1,13 @@ +--- a/SConstruct 2020-08-04 18:40:06.000000000 +0000 ++++ b/SConstruct 2020-12-12 18:29:38.378386573 +0000 +@@ -1460,8 +1460,8 @@ + # follow FHS, put in /usr/local/libXX, not /usr/libXX + # may be lib, lib32 or lib64 + python_libdir = polystr(python_libdir) +- python_libdir = python_libdir.replace("/usr/lib", +- "/usr/local/lib") ++# python_libdir = python_libdir.replace("/usr/lib", ++# "/usr/local/lib") + python_module_dir = str(python_libdir) + os.sep + # Many systems can have a problem with the Python path + announce("Ensure your PYTHONPATH includes %s" % python_module_dir) diff --git a/science/gis/gpsd/files/use_pythondontwritebytecode_environment_variable.patch b/science/gis/gpsd/files/use_pythondontwritebytecode_environment_variable.patch new file mode 100644 index 0000000000..6fc35d8f96 --- /dev/null +++ b/science/gis/gpsd/files/use_pythondontwritebytecode_environment_variable.patch @@ -0,0 +1,10 @@ +--- a/SConstruct 2020-08-04 18:40:06.000000000 +0000 ++++ b/SConstruct 2020-12-27 05:47:40.748197656 +0000 +@@ -516,6 +516,7 @@ + 'CWRAPPERS_CONFIG_DIR', # pkgsrc + # Variables used in testing + 'WRITE_PAD', # So we can test WRITE_PAD values on the fly. ++ 'PYTHONDONTWRITEBYTECODE', + ) + + envs = {} diff --git a/science/gis/gpsd/pspec.xml b/science/gis/gpsd/pspec.xml new file mode 100644 index 0000000000..a574c8f51c --- /dev/null +++ b/science/gis/gpsd/pspec.xml @@ -0,0 +1,134 @@ + + + + + gpsd + https://gpsd.gitlab.io/gpsd/ + + PisiLinux Community + admins@pisilinux.org + + BSD + app + library + science.gis + GPS daemon and library to support serial/USB GPS devices. + + gpsd is a service daemon that monitor one or more GPSes attached to a host computer through serial or USB ports, making all data of the sensors available to be queried on TCP port 2947 of the host computer. + + + http://download-mirror.savannah.gnu.org/releases/gpsd/gpsd-3.21.tar.xz + + + scons + xmlto + dbus-devel + libusb-devel + libxslt-devel + python3-devel + ncurses-devel + bluez-libs-devel + python3-pyserial + + + pylibdir_no_prefix_replace.patch + use_pythondontwritebytecode_environment_variable.patch + + + + + gpsd + + dbus + libgcc + libusb + ncurses + bluez-libs + python3-pyserial + + + /etc/conf.d + /usr/bin + /usr/sbin + /lib/udev/gpsd.hotplug + /usr/lib + /lib/udev/rules.d + /usr/share/man + /usr/share/gpsd/doc + + + gpsd.sysconfig + + + System.Service + + + + + gpsd-clients + + gpsd + dbus + libusb + ncurses + bluez-libs + python3-pyserial + + Various text based and graphical clients for gpsd. + + /usr/bin/cgps + /usr/bin/gpscat + /usr/bin/gpsdecode + /usr/bin/gpspipe + /usr/bin/gpxlogger + /usr/bin/lcdgps + /usr/bin/xgps + /usr/bin/xgpsspeed + /usr/share/man/man1/gps.1* + /usr/share/man/man1/cgps* + /usr/share/man/man1/gpscat* + /usr/share/man/man1/gpsdecode* + /usr/share/man/man1/gpspipe* + /usr/share/man/man1/gpxlogger* + /usr/share/man/man1/cgpxlogger* + /usr/share/man/man1/lcdgps* + /usr/share/man/man1/xgps* + /usr/share/applications + /usr/share/gpsd/icons + /usr/share/pixmaps + + + data/gpsd-logo.png + data/xgps.desktop + data/xgpsspeed.desktop + + + + + gpsd-devel + Development files for gpsd. + + gpsd + + + /usr/bin/gpsfake + /usr/lib/python*/site-packages/gps/fake.py + /usr/include + /usr/lib/pkgconfig + /usr/share/man/man3 + /usr/share/man/man5 + /usr/share/man/man1/gpsfake.1 + + + + + + 2020-12-27 + 3.21 + First build. + fury + wascheme@tuta.io + + + +