diff options
Diffstat (limited to 'www/tinyauth')
| -rw-r--r-- | www/tinyauth/Makefile | 56 | ||||
| -rw-r--r-- | www/tinyauth/distinfo | 7 | ||||
| -rw-r--r-- | www/tinyauth/files/pkg-message.in | 30 | ||||
| -rw-r--r-- | www/tinyauth/files/tinyauth.in | 35 | ||||
| -rw-r--r-- | www/tinyauth/pkg-descr | 4 |
5 files changed, 132 insertions, 0 deletions
diff --git a/www/tinyauth/Makefile b/www/tinyauth/Makefile new file mode 100644 index 000000000000..6b0d0d393aff --- /dev/null +++ b/www/tinyauth/Makefile @@ -0,0 +1,56 @@ +PORTNAME= tinyauth +DISTVERSIONPREFIX= v +DISTVERSION= 4.0.1 +PORTREVISION= 2 +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 + +BROKEN_i386= cannot use int64(off) (value of type int64) as int32 value in assignment + +USES= go: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} \ + "@dir(${TINYAUTH_USER},${TINYAUTH_GROUP},0750) /var/db/${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 + +post-install: + @${MKDIR} ${STAGEDIR}/var/db/${PORTNAME} + +.include <bsd.port.mk> diff --git a/www/tinyauth/distinfo b/www/tinyauth/distinfo new file mode 100644 index 000000000000..471101b17185 --- /dev/null +++ b/www/tinyauth/distinfo @@ -0,0 +1,7 @@ +TIMESTAMP = 1762061106 +SHA256 (go/www_tinyauth/steveiliop56-tinyauth-v4.0.1_GH0/tinyauth-v4.0.1.frontend.tar.gz) = 46544b559e44281d49834da912f5865c45dc233fca0f8a5945637e5a9461a6be +SIZE (go/www_tinyauth/steveiliop56-tinyauth-v4.0.1_GH0/tinyauth-v4.0.1.frontend.tar.gz) = 957533 +SHA256 (go/www_tinyauth/steveiliop56-tinyauth-v4.0.1_GH0/go.mod) = 08befbc397aa156c2a67aa1ab3ea504c1db61586270079f555b8c17d08ecc780 +SIZE (go/www_tinyauth/steveiliop56-tinyauth-v4.0.1_GH0/go.mod) = 6266 +SHA256 (go/www_tinyauth/steveiliop56-tinyauth-v4.0.1_GH0/steveiliop56-tinyauth-v4.0.1_GH0.tar.gz) = f078d50b2c539ad1ff6eec3abe64ad6ce2e65c377e72aedb13901d57ec668bf0 +SIZE (go/www_tinyauth/steveiliop56-tinyauth-v4.0.1_GH0/steveiliop56-tinyauth-v4.0.1_GH0.tar.gz) = 5650185 diff --git a/www/tinyauth/files/pkg-message.in b/www/tinyauth/files/pkg-message.in new file mode 100644 index 000000000000..7125da4a7373 --- /dev/null +++ b/www/tinyauth/files/pkg-message.in @@ -0,0 +1,30 @@ +[ +{ 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 +} +{ type: upgrade + maximum_version: "4.0.0" + message: <<EOM +Since version 4.0.0, Tinyauth is a stateful application, which means you must set +DATABASE_PATH to /var/db/tinyauth/tinyauth.db if you want sessions to persist even +after restarting. + +Please refer to the current documentation for any changes you +need to make to your configuration file: + + https://tinyauth.app/docs/breaking-updates/3-to-4/ +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. |
