diff --git a/srcpkgs/Gokapi/files/gokapi/log/run b/srcpkgs/Gokapi/files/gokapi/log/run new file mode 100644 index 00000000000..cb759c1f80d --- /dev/null +++ b/srcpkgs/Gokapi/files/gokapi/log/run @@ -0,0 +1,3 @@ +#!/bin/sh + +exec logger -t gokapi -p daemon.info diff --git a/srcpkgs/Gokapi/files/gokapi/run b/srcpkgs/Gokapi/files/gokapi/run new file mode 100644 index 00000000000..8f4295583d2 --- /dev/null +++ b/srcpkgs/Gokapi/files/gokapi/run @@ -0,0 +1,11 @@ +#!/bin/sh + +[ -r ./conf ] && . ./conf + +: ${USER:=_gokapi} +: ${GROUP:=_gokapi} +: ${HOME:=/var/lib/gokapi} + +export USER GROUP HOME + +cd "${HOME}" && exec chpst -u ${USER}:${GROUP} gokapi 2>&1 diff --git a/srcpkgs/Gokapi/template b/srcpkgs/Gokapi/template new file mode 100644 index 00000000000..4eb7702d73c --- /dev/null +++ b/srcpkgs/Gokapi/template @@ -0,0 +1,25 @@ +# Template file for 'Gokapi' +pkgname=Gokapi +version=1.6.1 +revision=1 +build_style=go +go_import_path=github.com/forceu/gokapi +go_package="${go_import_path}/cmd/gokapi" +short_desc="Lightweight, self-hosted Firefox Send alternative" +maintainer="Andrew J. Hesford " +license="AGPL-3.0-only" +homepage="https://github.com/Forceu/Gokapi" +distfiles="${homepage}/archive/v${version}.tar.gz" +checksum=225f069817eef50cdd316f6c9ed037e939f4c5678c488dfb54dd52141d367e0f +system_accounts="_gokapi" +_gokapi_homedir="/var/lib/gokapi" +make_dirs="/var/lib/gokapi 700 _gokapi _gokapi" + +pre_build() { + GOARCH= go generate ./... +} + +post_install() { + vlicense LICENSE.md + vsv gokapi +}