diff options
Diffstat (limited to 'www/tinyauth')
-rw-r--r-- | www/tinyauth/Makefile | 50 | ||||
-rw-r--r-- | www/tinyauth/distinfo | 7 | ||||
-rw-r--r-- | www/tinyauth/files/pkg-message.in | 17 | ||||
-rw-r--r-- | www/tinyauth/files/tinyauth.in | 35 | ||||
-rw-r--r-- | www/tinyauth/pkg-descr | 4 |
5 files changed, 113 insertions, 0 deletions
diff --git a/www/tinyauth/Makefile b/www/tinyauth/Makefile new file mode 100644 index 000000000000..c6afa7e14f17 --- /dev/null +++ b/www/tinyauth/Makefile @@ -0,0 +1,50 @@ +PORTNAME= tinyauth +DISTVERSIONPREFIX= v +DISTVERSION= 3.6.2 +PORTREVISION= 1 +CATEGORIES= www +MASTER_SITES= LOCAL/dtxdf/${PORTNAME}/ +DISTFILES= ${PORTNAME}-${DISTVERSIONPREFIX}${DISTVERSION}.frontend${EXTRACT_SUFX} + +MAINTAINER= dtxdf@FreeBSD.org +COMMENT= Simplest way to protect your apps with a login screen +WWW= https://tinyauth.app + +LICENSE= GPLv3 +LICENSE_FILE= ${WRKSRC}/LICENSE + +USES= go:1.23,modules +USE_GITHUB= yes +GH_ACCOUNT= steveiliop56 + +USE_RC_SUBR= ${PORTNAME} + +GO_MOD_DIST= github +GO_MODULE= github.com/steveiliop56/${PORTNAME} +GO_BUILDFLAGS= -ldflags "\ + -X 'tinyauth/internal/constants.Version=${DISTVERSIONPREFIX}${DISTVERSION}' \ + -X 'tinyauth/internal/constants.CommitHash=${GITID}' \ + -X 'tinyauth/internal/constants.BuildTimestamp=${BUILD_DATE}'" + +SUB_FILES= pkg-message +SUB_LIST= USER=${USERS:[1]} + +USERS= ${TINYAUTH_USER} +GROUPS= ${TINYAUTH_GROUP} + +PLIST_FILES= bin/${PORTNAME} + +# Run 'git checkout ${DISTVERSIONPREFIX}${DISTVERSION} && git rev-parse HEAD' +# in the Tinyauth repository to get the value of GITID. +GITID= 5f7f88421ee0d2cc8fd17316fa378b958386a000 + +BUILD_DATE= $$(date -u '+%Y-%m-%dT%H:%M:%S') + +TINYAUTH_USER= ${PORTNAME} +TINYAUTH_GROUP= ${TINYAUTH_USER} + +pre-build: + @${MKDIR} ${WRKSRC}/internal/assets/dist + @cd ${WRKDIR}/tinyauth-frontend && ${COPYTREE_SHARE} . ${WRKSRC}/internal/assets/dist + +.include <bsd.port.mk> diff --git a/www/tinyauth/distinfo b/www/tinyauth/distinfo new file mode 100644 index 000000000000..6ecb3a8bb751 --- /dev/null +++ b/www/tinyauth/distinfo @@ -0,0 +1,7 @@ +TIMESTAMP = 1754156249 +SHA256 (go/www_tinyauth/steveiliop56-tinyauth-v3.6.2_GH0/tinyauth-v3.6.2.frontend.tar.gz) = bb0261e35041d8f2cc73341df6a61969ff97bd35264bc45743b3994702eecad6 +SIZE (go/www_tinyauth/steveiliop56-tinyauth-v3.6.2_GH0/tinyauth-v3.6.2.frontend.tar.gz) = 952998 +SHA256 (go/www_tinyauth/steveiliop56-tinyauth-v3.6.2_GH0/go.mod) = d23ed0cab1f356dfb3e946fdabce2afffb1adaf8bfcf28cd195dc3c2f1d883f7 +SIZE (go/www_tinyauth/steveiliop56-tinyauth-v3.6.2_GH0/go.mod) = 5418 +SHA256 (go/www_tinyauth/steveiliop56-tinyauth-v3.6.2_GH0/steveiliop56-tinyauth-v3.6.2_GH0.tar.gz) = 4b3a592bc76c8293ac862620cfcdb70cfd418f810f27ec27ce73cd9d7130fc44 +SIZE (go/www_tinyauth/steveiliop56-tinyauth-v3.6.2_GH0/steveiliop56-tinyauth-v3.6.2_GH0.tar.gz) = 5638267 diff --git a/www/tinyauth/files/pkg-message.in b/www/tinyauth/files/pkg-message.in new file mode 100644 index 000000000000..ead130a4241c --- /dev/null +++ b/www/tinyauth/files/pkg-message.in @@ -0,0 +1,17 @@ +[ +{ type: install + message: <<EOM +Tinyauth is installed + +1) Configure it in %%PREFIX%%/etc/tinyauth.env + +2) Enable it with + + sysrc tinyauth_enable=YES + +3) Start it with + + service tinyauth start +EOM +} +] diff --git a/www/tinyauth/files/tinyauth.in b/www/tinyauth/files/tinyauth.in new file mode 100644 index 000000000000..00e28e49e60e --- /dev/null +++ b/www/tinyauth/files/tinyauth.in @@ -0,0 +1,35 @@ +#!/bin/sh + +# PROVIDE: tinyauth +# REQUIRE: LOGIN +# KEYWORD: shutdown +# +# Configuration settings for tinyauth in /etc/rc.conf +# +# tinyauth_enable (bool): Enable tinyauth. (Default=NO) +# tinyauth_env_file (str): Path containing the environment variables +# to be used by tinyauth. (Default: %%PREFIX%%/etc/tinyauth.env) +# tinyauth_logfile (str): Log file used to store the tinyauth's output. (Default: /var/log/tinyauth.log) +# tinyauth_pidfile (str): File used by tinyauth to store the process ID. (Default: /var/run/tinyauth.pid) +# tinyauth_runas (str): User to run tinyauth as. (Default: %%USER%%) + +. /etc/rc.subr + +name="tinyauth" +desc="Simplest way to protect your apps with a login screen" +rcvar="tinyauth_enable" + +load_rc_config $name + +: ${tinyauth_enable:="NO"} +: ${tinyauth_env_file:="%%PREFIX%%/etc/tinyauth.env"} +: ${tinyauth_logfile:="/var/log/tinyauth.log"} +: ${tinyauth_pidfile:="/var/run/tinyauth.pid"} +: ${tinyauth_runas:="%%USER%%"} + +pidfile="${tinyauth_pidfile}" +procname="%%LOCALBASE%%/bin/tinyauth" +command="/usr/sbin/daemon" +command_args="-o '${tinyauth_logfile}' -p '${pidfile}' -u '${tinyauth_runas}' -t '${desc}' -- '${procname}'" + +run_rc_command "$1" diff --git a/www/tinyauth/pkg-descr b/www/tinyauth/pkg-descr new file mode 100644 index 000000000000..6ac24c9465b9 --- /dev/null +++ b/www/tinyauth/pkg-descr @@ -0,0 +1,4 @@ +Tinyauth is a simple authentication middleware that adds a simple +login screen or OAuth with Google, Github and any provider to all +of your docker apps. It supports all the popular proxies like +Traefik, Nginx and Caddy. |