--- /dev/null
+gps303 (0.01) experimental; urgency=low
+
+ [ Eugene Crosser ]
+ * Initial release
+
+ -- Eugene Crosser <crosser@average.org> Wed, 27 Apr 2022 23:12:11 +0200
--- /dev/null
+Source: gps303
+Maintainer: Eugene Crosser <crosser@average.org>
+Section: misc
+Priority: optional
+Standards-Version: 4.5.1
+X-Python-Version: >= 3.6
+Homepage: http://www.average.org/gps303
+Build-Depends: debhelper-compat (= 12),
+ dh-python,
+ python3-all,
+ python3-setuptools,
+ python3-zmq,
+
+Package: python3-gps303
+Architecture: all
+Section: python
+Depends: ${misc:Depends},
+ ${python3:Depends}
+Description: Suite of modules to collect reports from xz303 GPS trackers
--- /dev/null
+Licese: MIT
--- /dev/null
+[Unit]
+Description=GPS303 Collector Service
+PartOf=gps303.target
+
+[Service]
+Type=simple
+EnvironmentFile=-/etc/default/gps303
+ExecStart=python3 -m gps303.collector $OPTIONS
+KillSignal=INT
+Restart=on-failure
+StandardOutput=journal
+StandardError=inherit
+User=gps303
+Group=gps303
+
+[Install]
+WantedBy=gps303.target
--- /dev/null
+[collector]
+port = 4303
+publishurl = ipc:///var/lib/gps303/collected
+listenurl = ipc:///var/lib/gps303/responses
+
+[storage]
+dbfn = /var/lib/gps303/gps303.sqlite
+
+[opencellid]
+dbfn = /var/lib/opencellid/opencellid.sqlite
+
+[termconfig]
+statusIntervalMinutes = 25
+uploadIntervalSeconds = 0x0300
+binarySwitch = 0b00110001
+alarms =
+ 0
+ 0
+ 0
+dndTimeSwitch = 0
+dndTimes =
+ 0
+ 0
+ 0
+gpsTimeSwitch = 0
+gpsTimeStart = 0
+gpsTimeStop = 0
+phoneNumbers =
+ ""
+ ""
+ ""
--- /dev/null
+# Environment for gps303 suite
+# Common command-line option for all daemons
+#OPTIONS="-c /etc/gps303.conf -d"
+# Which lookaside service to use: opencellid or googleloc
+LOOKASIDE=opencellid
--- /dev/null
+[Unit]
+Description=GPS303 Lookaside Service
+PartOf=gps303.target
+
+[Service]
+Type=simple
+EnvironmentFile=-/etc/default/gps303
+ExecStart=python3 -m gps303.lookaside $OPTIONS
+KillSignal=INT
+Restart=on-failure
+StandardOutput=journal
+StandardError=inherit
+User=gps303
+Group=gps303
+
+[Install]
+WantedBy=gps303.target
--- /dev/null
+[Unit]
+Description=GPS303 Storage Service
+PartOf=gps303.target
+
+[Service]
+Type=simple
+EnvironmentFile=-/etc/default/gps303
+ExecStart=python3 -m gps303.storage $OPTIONS
+KillSignal=INT
+Restart=on-failure
+StandardOutput=journal
+StandardError=inherit
+User=gps303
+Group=gps303
+
+[Install]
+WantedBy=gps303.target
--- /dev/null
+[Unit]
+Description=GPS303 support suite
+Wants=gps303.collector.service \
+ gps303.storage.service \
+ gps303.termconfig.service \
+ gps303.lookaside.service
+
+[Install]
+WantedBy=multi-user.target
--- /dev/null
+[Unit]
+Description=GPS303 Termconfig Service
+PartOf=gps303.target
+
+[Service]
+Type=simple
+EnvironmentFile=-/etc/default/gps303
+ExecStart=python3 -m gps303.termconfig $OPTIONS
+KillSignal=INT
+Restart=on-failure
+StandardOutput=journal
+StandardError=inherit
+User=gps303
+Group=gps303
+
+[Install]
+WantedBy=gps303.target
--- /dev/null
+debian/gps303.conf etc/
--- /dev/null
+#!/bin/sh
+
+adduser --system --group --home /var/lib/gps303 gps303
+
+#DEBHELPER#
+
+exit 0
--- /dev/null
+zeromq python3-zmq
--- /dev/null
+#!/usr/bin/make -f
+
+export PYBUILD_NAME=gps303
+#export PYBUILD_BEFORE_TEST=cp -r mypystubs {build_dir}
+#export PYBUILD_AFTER_TEST=rm -rf {build_dir}/mypystubs
+
+%:
+ dh $@ --with python3 --buildsystem pybuild
+
+
+override_dh_installsystemd:
+ dh_installsystemd --name=gps303
+ dh_installsystemd --name=gps303.collector
+ dh_installsystemd --name=gps303.storage
+ dh_installsystemd --name=gps303.lookaside
+ dh_installsystemd --name=gps303.termconfig
--- /dev/null
+3.0 (native)
--- /dev/null
+from setuptools import setup
+from re import findall
+
+with open("debian/changelog", "r") as clog:
+ _, version, _ = findall(
+ r"(?P<src>.*) \((?P<version>.*)\) (?P<suite>.*); .*",
+ clog.readline().strip(),
+ )[0]
+
+setup(
+ name="gps303",
+ version=version,
+ description="Suite of daemons to collect reports from xz303 GPS trackers",
+ url="http://www.average.org/gps303/",
+ author="Eugene Crosser",
+ author_email="crosser@average.org",
+ install_requires=["zeromq"],
+ license="MIT",
+ packages=[
+ "gps303",
+ ],
+ scripts=["scripts/gps303"],
+ long_description=open("README.md").read(),
+)