summaryrefslogtreecommitdiff
path: root/finance/homebox
diff options
context:
space:
mode:
Diffstat (limited to 'finance/homebox')
-rw-r--r--finance/homebox/Makefile55
-rw-r--r--finance/homebox/distinfo7
-rw-r--r--finance/homebox/files/homebox.in33
-rw-r--r--finance/homebox/pkg-descr18
4 files changed, 113 insertions, 0 deletions
diff --git a/finance/homebox/Makefile b/finance/homebox/Makefile
new file mode 100644
index 000000000000..ba3dbb04790c
--- /dev/null
+++ b/finance/homebox/Makefile
@@ -0,0 +1,55 @@
+PORTNAME= homebox
+DISTVERSIONPREFIX= v
+DISTVERSION= 0.21.0
+CATEGORIES= finance
+MASTER_SITES= LOCAL/dtxdf/${PORTNAME}/
+DISTFILES= ${PORTNAME}-${DISTVERSIONPREFIX}${DISTVERSION}.frontend${EXTRACT_SUFX}
+
+MAINTAINER= dtxdf@FreeBSD.org
+COMMENT= Inventory and organization system built for the Home User
+WWW= https://homebox.software
+
+LICENSE= AGPLv3
+
+BROKEN_i386= cannot use int64(off) (value of type int64) as int32 value in assignment
+
+USES= go:modules
+USE_GITHUB= yes
+GH_ACCOUNT= sysadminsmedia
+
+USE_RC_SUBR= ${PORTNAME}
+
+GO_MOD_DIST= github
+GO_MODULE= github.com/sysadminsmedia/${PORTNAME}
+GO_TARGET= ./app/api:${PORTNAME}
+GO_BUILDFLAGS= -ldflags "\
+ -X 'main.commit=${GITID}' \
+ -X 'main.buildTime=${BUILD_TIME}' \
+ -X 'main.version=${DISTVERSIONPREFIX}${DISTVERSION}'"
+
+SUB_LIST= USER=${USERS:[1]}
+
+WRKSRC_SUBDIR= backend
+
+USERS= ${HOMEBOX_USER}
+GROUPS= ${HOMEBOX_GROUP}
+
+PLIST_FILES= bin/${PORTNAME} \
+ "@dir(${HOMEBOX_USER},${HOMEBOX_GROUP},0700) /var/db/${PORTNAME}"
+
+# Run 'git checkout ${DISTVERSIONPREFIX}${DISTVERSION} && git rev-parse HEAD'
+# in the Homebox repository to get the value of GITID.
+GITID= 27e9eb2277b90783f6d3a03d4895ce7dec6f0fe9
+
+HOMEBOX_USER= ${PORTNAME}
+HOMEBOX_GROUP= ${HOMEBOX_USER}
+
+pre-build:
+ @${RM} -r ${WRKSRC}/app/api/static/public
+ @${MKDIR} ${WRKSRC}/app/api/static/public
+ @cd ${WRKDIR}/homebox-frontend && ${COPYTREE_SHARE} . ${WRKSRC}/app/api/static/public
+
+post-install:
+ @${MKDIR} ${STAGEDIR}/var/db/${PORTNAME}
+
+.include <bsd.port.mk>
diff --git a/finance/homebox/distinfo b/finance/homebox/distinfo
new file mode 100644
index 000000000000..0133881d334e
--- /dev/null
+++ b/finance/homebox/distinfo
@@ -0,0 +1,7 @@
+TIMESTAMP = 1755977139
+SHA256 (go/finance_homebox/sysadminsmedia-homebox-v0.21.0_GH0/homebox-v0.21.0.frontend.tar.gz) = 50a0c8ca87e1e43b43dc9e633ff5fc3f8c412639a37f8ed2ff8d6bb5264ec536
+SIZE (go/finance_homebox/sysadminsmedia-homebox-v0.21.0_GH0/homebox-v0.21.0.frontend.tar.gz) = 963887
+SHA256 (go/finance_homebox/sysadminsmedia-homebox-v0.21.0_GH0/go.mod) = c47e2dfcd4f7cf3409121dfe84de13e7354c959fd91e50ca4529ffebe6d4cc16
+SIZE (go/finance_homebox/sysadminsmedia-homebox-v0.21.0_GH0/go.mod) = 10428
+SHA256 (go/finance_homebox/sysadminsmedia-homebox-v0.21.0_GH0/sysadminsmedia-homebox-v0.21.0_GH0.tar.gz) = 4ab0f58c93d557c1d253d09ac95dba7c37a6ce456dea4c09b56334c88a2d3edd
+SIZE (go/finance_homebox/sysadminsmedia-homebox-v0.21.0_GH0/sysadminsmedia-homebox-v0.21.0_GH0.tar.gz) = 1218430
diff --git a/finance/homebox/files/homebox.in b/finance/homebox/files/homebox.in
new file mode 100644
index 000000000000..6a7d71438e3e
--- /dev/null
+++ b/finance/homebox/files/homebox.in
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# PROVIDE: homebox
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+#
+# Configuration settings for homebox in /etc/rc.conf
+#
+# homebox_enable (bool): Enable homebox.
+# homebox_log (str): Log output.
+# homebox_runas (str): User to run homebox as.
+# homebox_args (str): Arguments used by homebox.
+#
+
+. /etc/rc.subr
+
+name="homebox"
+desc="Inventory and organization system built for the Home User"
+rcvar="${name}_enable"
+
+load_rc_config $name
+
+: ${homebox_enable:="NO"}
+: ${homebox_log:="/var/log/homebox.log"}
+: ${homebox_runas:="%%USER%%"}
+: ${homebox_args="--mode production --storage-conn-string file:///var/db/homebox/ --database-sqlite-path '/var/db/homebox/homebox.db?_pragma=busy_timeout=999&_pragma=journal_mode=WAL&_fk=1&_time_format=sqlite'"}
+
+pidfile="/var/run/${name}.pid"
+procname="/usr/local/bin/${name}"
+command="/usr/sbin/daemon"
+command_args="-c -u '${homebox_runas}' -p '${pidfile}' -t '${desc}' -o '${homebox_log}' '${procname}' ${homebox_args}"
+
+run_rc_command "$1"
diff --git a/finance/homebox/pkg-descr b/finance/homebox/pkg-descr
new file mode 100644
index 000000000000..cee5a150ee2e
--- /dev/null
+++ b/finance/homebox/pkg-descr
@@ -0,0 +1,18 @@
+HomeBox is the inventory and organization system built for the Home
+User! With a focus on simplicity and ease of use, Homebox is the
+perfect solution for your home inventory, organization, and management
+needs. While developing this project, I've tried to keep the following
+principles in mind:
+
+- Simple - Homebox is designed to be simple and easy to use. No
+complicated setup or configuration required. Use either a single
+docker container, or deploy yourself by compiling the binary for
+your platform of choice.
+
+- Blazingly Fast - Homebox is written in Go, which makes it extremely
+fast and requires minimal resources to deploy. In general, idle
+memory usage is less than 50MB for the whole container.
+
+- Portable - Homebox is designed to be portable and run on anywhere.
+We use SQLite and an embedded Web UI to make it easy to deploy,
+use, and backup.