1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-18 00:10:04 +00:00

ot-recorder stores and accesses data published, via MQTT or http, by

OwnTracks apps.

OwnTracks allows you to keep track of your own location. You can build
your private location diary or share it with your family and friends.
OwnTracks is open-source and uses open protocols for communication so
you can be sure your data stays secure and private.
This commit is contained in:
Dan Langille 2019-07-31 01:16:27 +00:00
parent 158acd2c41
commit 22fb9d72c2
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=507689
10 changed files with 467 additions and 2 deletions

2
GIDs
View File

@ -183,7 +183,7 @@ restserver:*:239:
aprsd:*:240:
tnc:*:241:
prosody:*:242:
# free: 243
ot-recorder:*:243:
mastodon:*:244:
# free: 245
# free: 246

2
UIDs
View File

@ -188,7 +188,7 @@ restserver:*:239:239::0:0:restic rest-server Daemon:/var/db/restserver:/usr/sbin
aprsd:*:240:240::0:0:aprsd:/nonexistent:/bin/sh
tnc:*:241:241::0:0:aprsd:/nonexistent:/bin/sh
prosody:*:242:242::0:0:Prosody Jabber Server:/nonexistent:/usr/sbin/nologin
# free: 243
ot-recorder:*:243:243::0:0:OwnTracks Recorder:/nonexistent:/usr/sbin/nologin
mastodon:*:244:244::0:0:Mastodon User:/usr/local/www/mastodon:/bin/sh
# free: 245
# free: 246

View File

@ -503,6 +503,7 @@
SUBDIR += opera-linuxplugins
SUBDIR += orangehrm
SUBDIR += osrm-backend
SUBDIR += ot-recorder
SUBDIR += otrs
SUBDIR += otter-browser
SUBDIR += owncloud

51
www/ot-recorder/Makefile Normal file
View File

@ -0,0 +1,51 @@
# Created by: tundra
# $FreeBSD$
PORTNAME= ot-recorder
PORTVERSION= 0.8.4
CATEGORIES= www
MAINTAINER= dvl@FreeBSD.org
COMMENT= Store and access data published by OwnTracks apps
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/LICENSE
USES= gmake
SUB_FILES= ot-recorder
LIB_DEPENDS+= libcurl.so:ftp/curl
LIB_DEPENDS+= libconfig.so:devel/libconfig
LIB_DEPENDS+= liblmdb.so:databases/lmdb
LIB_DEPENDS+= libmosquitto.so:net/mosquitto
USE_GITHUB= yes
GH_ACCOUNT= owntracks
GH_PROJECT= recorder
USERS= ot-recorder
GROUPS= ot-recorder
pre-patch:
${CP} ${WRKSRC}/config.mk.in ${WRKSRC}/config.mk
.include <bsd.port.pre.mk>
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/ocat ${STAGEDIR}${PREFIX}/bin
${INSTALL_PROGRAM} ${WRKSRC}/ot-recorder ${STAGEDIR}${PREFIX}/sbin
${MKDIR} ${STAGEDIR}${WWWDIR}
(cd ${WRKSRC}/docroot && ${COPYTREE_SHARE} . ${STAGEDIR}${WWWDIR}/)
${MKDIR} ${STAGEDIR}${ETCDIR}
${INSTALL_DATA} ${WRKSRC}/etc/ot-recorder.default ${STAGEDIR}${ETCDIR}/ot-recorder.conf.sample
${MKDIR} ${STAGEDIR}/var/log/ot-recorder
${MKDIR} ${STAGEDIR}/var/spool/owntracks
${MKDIR} ${STAGEDIR}/var/spool/owntracks/recorder
${INSTALL_SCRIPT} ${WRKDIR}/ot-recorder ${STAGEDIR}$/${PREFIX}/etc/rc.d/
.include <bsd.port.post.mk>

3
www/ot-recorder/distinfo Normal file
View File

@ -0,0 +1,3 @@
TIMESTAMP = 1564344984
SHA256 (owntracks-recorder-0.8.4_GH0.tar.gz) = cdf4ced2563bdd26717b65aef18990d2d5c25ada231bf1293aab65f279fc8bff
SIZE (owntracks-recorder-0.8.4_GH0.tar.gz) = 3321503

View File

@ -0,0 +1,30 @@
#!/bin/sh
# $FreeBSD$
#
# PROVIDE: otrecorder
# REQUIRE: LOGIN mosquitto hass
# KEYWORD: shutdown
#
#
# Add the following lines to /etc/rc.conf to configure ot-recorder:
# otrecorder_enable (bool): Set it to "YES" to enable ot-recorder.
# Default is "NO".
# otrecorder_args (str): Arguments passed to ot-recorder on startup.
# Default is "".
. /etc/rc.subr
name=otrecorder
rcvar=${name}_enable
pidfile="/var/run/otrecorder/${name}.pid"
otrecorder_command="stdbuf -o0 %%PREFIX%%/sbin/ot-recorder"
command="/usr/sbin/daemon"
load_rc_config $name
: ${otrecorder_enable:=NO}
: ${otrecorder_args:=""}
: ${otrecorder_user:="ot-recorder"}
command_args="-P ${pidfile} -r -f -o /var/log/ot-recorder/ot-recorder.log ${otrecorder_command} ${otrecorder_args}"
run_rc_command "$1"

View File

@ -0,0 +1,30 @@
#!/bin/sh
# $FreeBSD$
#
# PROVIDE: otrecorder
# REQUIRE: LOGIN mosquitto hass
# KEYWORD: shutdown
#
#
# Add the following lines to /etc/rc.conf to configure ot-recorder:
# otrecorder_enable (bool): Set it to "YES" to enable ot-recorder.
# Default is "NO".
# otrecorder_args (str): Arguments passed to ot-recorder on startup.
# Default is "".
. /etc/rc.subr
name=otrecorder
rcvar=${name}_enable
pidfile="/var/run/otrecorder/${name}.pid"
otrecorder_command="stdbuf -o0 /usr/local/sbin/ot-recorder"
command="/usr/sbin/daemon"
load_rc_config $name
: ${otrecorder_enable:=NO}
: ${otrecorder_args:=""}
: ${otrecorder_user:="ot-recorder"}
command_args="-P ${pidfile} -r -f -o /var/log/ot-recorder/ot-recorder.log ${otrecorder_command} ${otrecorder_args}"
run_rc_command "$1"

View File

@ -0,0 +1,35 @@
--- config.mk.orig 2019-07-29 18:58:54 UTC
+++ config.mk
@@ -20,10 +20,10 @@
#
# Uncomment the following lines and replaced "no" with "yes":
#
-# CC = clang
-# CFLAGS += -I/usr/local/include
-# MORELIBS += -L /usr/local/lib
-FREEBSD ?= no
+CC = clang
+CFLAGS += -I/usr/local/include
+MORELIBS += -L /usr/local/lib
+FREEBSD ?= YES
#
# Now build recorder with the "gmake" command:
#
@@ -60,7 +60,7 @@ WITH_GREENWICH ?= no
STORAGEDEFAULT = /var/spool/owntracks/recorder/store
# Where should the recorder find its document root (HTTP)?
-DOCROOT = /var/spool/owntracks/recorder/htdocs
+DOCROOT = /usr/local/www/ot-recorder
# Define the precision for reverse-geo lookups. The higher
# the number, the more granular reverse-geo will be:
@@ -83,7 +83,7 @@ GHASHPREC = 7
JSON_INDENT ?= no
# Location of optional default configuration file
-CONFIGFILE = /etc/default/ot-recorder
+CONFIGFILE = /usr/local/etc/ot-recorder/ot-recorder.conf
# Optionally specify the path to the Mosquitto libs, include here
MOSQUITTO_INC = -I/usr/include

11
www/ot-recorder/pkg-descr Normal file
View File

@ -0,0 +1,11 @@
The OwnTracks Recorder is a lightweight program for storing and accessing
location data published via MQTT (or HTTP) by the OwnTracks apps. It is a
compiled program which is easy to install and operate even on low-end hardware,
and it doesn't require an external database.
There are two main components: the Recorder obtains data via MQTT subscribes or
HTTP POST, stores the data in plain files and serve it via its built-in REST
API, and the ocat command-line utility reads stored data in a variety of
formats.
WWW: https://github.com/owntracks/recorder

304
www/ot-recorder/pkg-plist Normal file
View File

@ -0,0 +1,304 @@
@sample(,,640) %%ETCDIR%%/ot-recorder.conf.sample
bin/ocat
etc/rc.d/ot-recorder
sbin/ot-recorder
%%WWWDIR%%/favicon.ico
%%WWWDIR%%/index.html
%%WWWDIR%%/last/config.js
%%WWWDIR%%/last/config.js.sample
%%WWWDIR%%/last/index.html
%%WWWDIR%%/last/last.html
%%WWWDIR%%/last/manifest.json
%%WWWDIR%%/last/map_google.js
%%WWWDIR%%/last/map_leaflet.js
%%WWWDIR%%/last/websock.js
%%WWWDIR%%/map/index.html
%%WWWDIR%%/map/map_google.js
%%WWWDIR%%/map/map_leaflet.js
%%WWWDIR%%/owntracks.xsl
%%WWWDIR%%/static/js/jquery-1.12.0.min.js
%%WWWDIR%%/static/js/jquery-migrate-1.2.1.min.js
%%WWWDIR%%/static/js/moment.min.js
%%WWWDIR%%/static/js/mustache.js
%%WWWDIR%%/static/leaflet/images/layers-2x.png
%%WWWDIR%%/static/leaflet/images/layers.png
%%WWWDIR%%/static/leaflet/images/marker-icon-2x.png
%%WWWDIR%%/static/leaflet/images/marker-icon.png
%%WWWDIR%%/static/leaflet/images/marker-shadow.png
%%WWWDIR%%/static/leaflet/leaflet.css
%%WWWDIR%%/static/leaflet/leaflet.js
%%WWWDIR%%/static/leaflet/leaflet.js.map
%%WWWDIR%%/static/leaflet/version-1.3.4
%%WWWDIR%%/static/recorder.png
%%WWWDIR%%/table/config.js
%%WWWDIR%%/table/defaultface.js
%%WWWDIR%%/table/flags/AD.png
%%WWWDIR%%/table/flags/AE.png
%%WWWDIR%%/table/flags/AF.png
%%WWWDIR%%/table/flags/AG.png
%%WWWDIR%%/table/flags/AI.png
%%WWWDIR%%/table/flags/AL.png
%%WWWDIR%%/table/flags/AM.png
%%WWWDIR%%/table/flags/AN.png
%%WWWDIR%%/table/flags/AO.png
%%WWWDIR%%/table/flags/AQ.png
%%WWWDIR%%/table/flags/AR.png
%%WWWDIR%%/table/flags/AS.png
%%WWWDIR%%/table/flags/AT.png
%%WWWDIR%%/table/flags/AU.png
%%WWWDIR%%/table/flags/AW.png
%%WWWDIR%%/table/flags/AX.png
%%WWWDIR%%/table/flags/AZ.png
%%WWWDIR%%/table/flags/BA.png
%%WWWDIR%%/table/flags/BB.png
%%WWWDIR%%/table/flags/BD.png
%%WWWDIR%%/table/flags/BE.png
%%WWWDIR%%/table/flags/BF.png
%%WWWDIR%%/table/flags/BG.png
%%WWWDIR%%/table/flags/BH.png
%%WWWDIR%%/table/flags/BI.png
%%WWWDIR%%/table/flags/BJ.png
%%WWWDIR%%/table/flags/BL.png
%%WWWDIR%%/table/flags/BM.png
%%WWWDIR%%/table/flags/BN.png
%%WWWDIR%%/table/flags/BO.png
%%WWWDIR%%/table/flags/BR.png
%%WWWDIR%%/table/flags/BS.png
%%WWWDIR%%/table/flags/BT.png
%%WWWDIR%%/table/flags/BW.png
%%WWWDIR%%/table/flags/BY.png
%%WWWDIR%%/table/flags/BZ.png
%%WWWDIR%%/table/flags/CA.png
%%WWWDIR%%/table/flags/CC.png
%%WWWDIR%%/table/flags/CD.png
%%WWWDIR%%/table/flags/CF.png
%%WWWDIR%%/table/flags/CG.png
%%WWWDIR%%/table/flags/CH.png
%%WWWDIR%%/table/flags/CI.png
%%WWWDIR%%/table/flags/CK.png
%%WWWDIR%%/table/flags/CL.png
%%WWWDIR%%/table/flags/CM.png
%%WWWDIR%%/table/flags/CN.png
%%WWWDIR%%/table/flags/CO.png
%%WWWDIR%%/table/flags/CR.png
%%WWWDIR%%/table/flags/CU.png
%%WWWDIR%%/table/flags/CV.png
%%WWWDIR%%/table/flags/CW.png
%%WWWDIR%%/table/flags/CX.png
%%WWWDIR%%/table/flags/CY.png
%%WWWDIR%%/table/flags/CZ.png
%%WWWDIR%%/table/flags/DE.png
%%WWWDIR%%/table/flags/DJ.png
%%WWWDIR%%/table/flags/DK.png
%%WWWDIR%%/table/flags/DM.png
%%WWWDIR%%/table/flags/DO.png
%%WWWDIR%%/table/flags/DZ.png
%%WWWDIR%%/table/flags/EC.png
%%WWWDIR%%/table/flags/EE.png
%%WWWDIR%%/table/flags/EG.png
%%WWWDIR%%/table/flags/EH.png
%%WWWDIR%%/table/flags/ER.png
%%WWWDIR%%/table/flags/ES.png
%%WWWDIR%%/table/flags/ET.png
%%WWWDIR%%/table/flags/EU.png
%%WWWDIR%%/table/flags/FI.png
%%WWWDIR%%/table/flags/FJ.png
%%WWWDIR%%/table/flags/FK.png
%%WWWDIR%%/table/flags/FM.png
%%WWWDIR%%/table/flags/FO.png
%%WWWDIR%%/table/flags/FR.png
%%WWWDIR%%/table/flags/GA.png
%%WWWDIR%%/table/flags/GB.png
%%WWWDIR%%/table/flags/GD.png
%%WWWDIR%%/table/flags/GE.png
%%WWWDIR%%/table/flags/GG.png
%%WWWDIR%%/table/flags/GH.png
%%WWWDIR%%/table/flags/GI.png
%%WWWDIR%%/table/flags/GL.png
%%WWWDIR%%/table/flags/GM.png
%%WWWDIR%%/table/flags/GN.png
%%WWWDIR%%/table/flags/GQ.png
%%WWWDIR%%/table/flags/GR.png
%%WWWDIR%%/table/flags/GS.png
%%WWWDIR%%/table/flags/GT.png
%%WWWDIR%%/table/flags/GU.png
%%WWWDIR%%/table/flags/GW.png
%%WWWDIR%%/table/flags/GY.png
%%WWWDIR%%/table/flags/HK.png
%%WWWDIR%%/table/flags/HN.png
%%WWWDIR%%/table/flags/HR.png
%%WWWDIR%%/table/flags/HT.png
%%WWWDIR%%/table/flags/HU.png
%%WWWDIR%%/table/flags/Hello.txt
%%WWWDIR%%/table/flags/IC.png
%%WWWDIR%%/table/flags/ID.png
%%WWWDIR%%/table/flags/IE.png
%%WWWDIR%%/table/flags/IL.png
%%WWWDIR%%/table/flags/IM.png
%%WWWDIR%%/table/flags/IN.png
%%WWWDIR%%/table/flags/IQ.png
%%WWWDIR%%/table/flags/IR.png
%%WWWDIR%%/table/flags/IS.png
%%WWWDIR%%/table/flags/IT.png
%%WWWDIR%%/table/flags/JE.png
%%WWWDIR%%/table/flags/JM.png
%%WWWDIR%%/table/flags/JO.png
%%WWWDIR%%/table/flags/JP.png
%%WWWDIR%%/table/flags/KE.png
%%WWWDIR%%/table/flags/KG.png
%%WWWDIR%%/table/flags/KH.png
%%WWWDIR%%/table/flags/KI.png
%%WWWDIR%%/table/flags/KM.png
%%WWWDIR%%/table/flags/KN.png
%%WWWDIR%%/table/flags/KP.png
%%WWWDIR%%/table/flags/KR.png
%%WWWDIR%%/table/flags/KW.png
%%WWWDIR%%/table/flags/KY.png
%%WWWDIR%%/table/flags/KZ.png
%%WWWDIR%%/table/flags/LA.png
%%WWWDIR%%/table/flags/LB.png
%%WWWDIR%%/table/flags/LC.png
%%WWWDIR%%/table/flags/LI.png
%%WWWDIR%%/table/flags/LICENSE.txt
%%WWWDIR%%/table/flags/LK.png
%%WWWDIR%%/table/flags/LR.png
%%WWWDIR%%/table/flags/LS.png
%%WWWDIR%%/table/flags/LT.png
%%WWWDIR%%/table/flags/LU.png
%%WWWDIR%%/table/flags/LV.png
%%WWWDIR%%/table/flags/LY.png
%%WWWDIR%%/table/flags/MA.png
%%WWWDIR%%/table/flags/MC.png
%%WWWDIR%%/table/flags/MD.png
%%WWWDIR%%/table/flags/ME.png
%%WWWDIR%%/table/flags/MF.png
%%WWWDIR%%/table/flags/MG.png
%%WWWDIR%%/table/flags/MH.png
%%WWWDIR%%/table/flags/MK.png
%%WWWDIR%%/table/flags/ML.png
%%WWWDIR%%/table/flags/MM.png
%%WWWDIR%%/table/flags/MN.png
%%WWWDIR%%/table/flags/MO.png
%%WWWDIR%%/table/flags/MP.png
%%WWWDIR%%/table/flags/MQ.png
%%WWWDIR%%/table/flags/MR.png
%%WWWDIR%%/table/flags/MS.png
%%WWWDIR%%/table/flags/MT.png
%%WWWDIR%%/table/flags/MU.png
%%WWWDIR%%/table/flags/MV.png
%%WWWDIR%%/table/flags/MW.png
%%WWWDIR%%/table/flags/MX.png
%%WWWDIR%%/table/flags/MY.png
%%WWWDIR%%/table/flags/MZ.png
%%WWWDIR%%/table/flags/NA.png
%%WWWDIR%%/table/flags/NC.png
%%WWWDIR%%/table/flags/NE.png
%%WWWDIR%%/table/flags/NF.png
%%WWWDIR%%/table/flags/NG.png
%%WWWDIR%%/table/flags/NI.png
%%WWWDIR%%/table/flags/NL.png
%%WWWDIR%%/table/flags/NO.png
%%WWWDIR%%/table/flags/NP.png
%%WWWDIR%%/table/flags/NR.png
%%WWWDIR%%/table/flags/NU.png
%%WWWDIR%%/table/flags/NZ.png
%%WWWDIR%%/table/flags/OM.png
%%WWWDIR%%/table/flags/PA.png
%%WWWDIR%%/table/flags/PE.png
%%WWWDIR%%/table/flags/PF.png
%%WWWDIR%%/table/flags/PG.png
%%WWWDIR%%/table/flags/PH.png
%%WWWDIR%%/table/flags/PK.png
%%WWWDIR%%/table/flags/PL.png
%%WWWDIR%%/table/flags/PN.png
%%WWWDIR%%/table/flags/PR.png
%%WWWDIR%%/table/flags/PS.png
%%WWWDIR%%/table/flags/PT.png
%%WWWDIR%%/table/flags/PW.png
%%WWWDIR%%/table/flags/PY.png
%%WWWDIR%%/table/flags/QA.png
%%WWWDIR%%/table/flags/RO.png
%%WWWDIR%%/table/flags/RS.png
%%WWWDIR%%/table/flags/RU.png
%%WWWDIR%%/table/flags/RW.png
%%WWWDIR%%/table/flags/SA.png
%%WWWDIR%%/table/flags/SB.png
%%WWWDIR%%/table/flags/SC.png
%%WWWDIR%%/table/flags/SD.png
%%WWWDIR%%/table/flags/SE.png
%%WWWDIR%%/table/flags/SG.png
%%WWWDIR%%/table/flags/SH.png
%%WWWDIR%%/table/flags/SI.png
%%WWWDIR%%/table/flags/SK.png
%%WWWDIR%%/table/flags/SL.png
%%WWWDIR%%/table/flags/SM.png
%%WWWDIR%%/table/flags/SN.png
%%WWWDIR%%/table/flags/SO.png
%%WWWDIR%%/table/flags/SR.png
%%WWWDIR%%/table/flags/SS.png
%%WWWDIR%%/table/flags/ST.png
%%WWWDIR%%/table/flags/SV.png
%%WWWDIR%%/table/flags/SY.png
%%WWWDIR%%/table/flags/SZ.png
%%WWWDIR%%/table/flags/TC.png
%%WWWDIR%%/table/flags/TD.png
%%WWWDIR%%/table/flags/TF.png
%%WWWDIR%%/table/flags/TG.png
%%WWWDIR%%/table/flags/TH.png
%%WWWDIR%%/table/flags/TJ.png
%%WWWDIR%%/table/flags/TK.png
%%WWWDIR%%/table/flags/TL.png
%%WWWDIR%%/table/flags/TM.png
%%WWWDIR%%/table/flags/TN.png
%%WWWDIR%%/table/flags/TO.png
%%WWWDIR%%/table/flags/TR.png
%%WWWDIR%%/table/flags/TT.png
%%WWWDIR%%/table/flags/TV.png
%%WWWDIR%%/table/flags/TW.png
%%WWWDIR%%/table/flags/TZ.png
%%WWWDIR%%/table/flags/UA.png
%%WWWDIR%%/table/flags/UG.png
%%WWWDIR%%/table/flags/US.png
%%WWWDIR%%/table/flags/UY.png
%%WWWDIR%%/table/flags/UZ.png
%%WWWDIR%%/table/flags/VA.png
%%WWWDIR%%/table/flags/VC.png
%%WWWDIR%%/table/flags/VE.png
%%WWWDIR%%/table/flags/VG.png
%%WWWDIR%%/table/flags/VI.png
%%WWWDIR%%/table/flags/VN.png
%%WWWDIR%%/table/flags/VU.png
%%WWWDIR%%/table/flags/WF.png
%%WWWDIR%%/table/flags/WS.png
%%WWWDIR%%/table/flags/YE.png
%%WWWDIR%%/table/flags/YT.png
%%WWWDIR%%/table/flags/ZA.png
%%WWWDIR%%/table/flags/ZM.png
%%WWWDIR%%/table/flags/ZW.png
%%WWWDIR%%/table/flags/__.png
%%WWWDIR%%/table/images/sort_asc.png
%%WWWDIR%%/table/images/sort_both.png
%%WWWDIR%%/table/images/sort_desc.png
%%WWWDIR%%/table/index.html
%%WWWDIR%%/table/js/jquery.dataTables.min.css
%%WWWDIR%%/table/js/jquery.dataTables.min.js
%%WWWDIR%%/table/otable.css
%%WWWDIR%%/test-ws.html
%%WWWDIR%%/test.txt
%%WWWDIR%%/views/jane.json.sample
%%WWWDIR%%/views/leafletmap.html
%%WWWDIR%%/views/vmap.html
@dir %%WWWDIR%%/last
@dir %%WWWDIR%%/map
@dir %%WWWDIR%%/static/js
@dir %%WWWDIR%%/static/leaflet/images
@dir %%WWWDIR%%/static/leaflet
@dir %%WWWDIR%%/static
@dir %%WWWDIR%%/table/flags
@dir %%WWWDIR%%/table/images
@dir %%WWWDIR%%/table/js
@dir %%WWWDIR%%/table
@dir %%WWWDIR%%/views
@dir(ot-recorder,ot-recorder,) /var/log/ot-recorder
@dir(ot-recorder,ot-recorder,) /var/spool/owntracks/recorder
@dir /var/spool/owntracks