Date: Tue, 15 Feb 2022 18:17:59 GMT From: Neel Chauhan <nc@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: 03949a77485f - main - www/kineto: Add port Message-ID: <202202151817.21FIHxQE048143@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by nc: URL: https://cgit.FreeBSD.org/ports/commit/?id=03949a77485f49fea02fd036622f91d1c1004671 commit 03949a77485f49fea02fd036622f91d1c1004671 Author: Corey Hinshaw <corey@electrickite.org> AuthorDate: 2022-02-10 17:03:46 +0000 Commit: Neel Chauhan <nc@FreeBSD.org> CommitDate: 2022-02-15 18:17:47 +0000 www/kineto: Add port PR: 261851 --- www/kineto/Makefile | 40 +++++++++++++++++++++++++++++++++ www/kineto/distinfo | 11 ++++++++++ www/kineto/files/kineto.in | 55 ++++++++++++++++++++++++++++++++++++++++++++++ www/kineto/pkg-descr | 3 +++ 4 files changed, 109 insertions(+) diff --git a/www/kineto/Makefile b/www/kineto/Makefile new file mode 100644 index 000000000000..c358753c2281 --- /dev/null +++ b/www/kineto/Makefile @@ -0,0 +1,40 @@ +PORTNAME= kineto +DISTVERSION= g20211104 +CATEGORIES= www +SH_COMMIT= 857f8c97ebc5 + +MAINTAINER= corey@electrickite.org +COMMENT= HTTP to Gemini proxy + +LICENSE= GPLv3 +LICENSE_FILE= ${WRKSRC}/COPYING + +USES= go:modules +USE_RC_SUBR= ${PORTNAME} +USE_GITHUB= nodefault +GH_TUPLE= golang:net:5f4716e94777:golang_net/vendor/golang.org/x/net \ + golang:text:v0.3.3:golang_text/vendor/golang.org/x/text + +# Additional distfiles to fetch from https://git.sr.ht +_SRHT_TUPLE= adnano:go-gemini:v0.1.17:vendor/git.sr.ht/~adnano/go-gemini \ + sircmpwn:${PORTNAME}:${SH_COMMIT}:"" \ + sircmpwn:getopt:23622cc906b3:vendor/git.sr.ht/~sircmpwn/getopt + +WRKSRC= ${WRKDIR}/${PORTNAME}-${SH_COMMIT} + +PLIST_FILES= bin/${PORTNAME} + +.include <bsd.port.pre.mk> + +.for account project tag subdir in ${_SRHT_TUPLE:S/:/ /g} +MASTER_SITES+= https://git.sr.ht/~${account}/${project}/archive/${tag}${EXTRACT_SUFX}?dummy=/:${account}_${project:S/-/_/g} +DISTFILES+= ${account}-${project}-${tag}_SRHT0${EXTRACT_SUFX}:${account}_${project:S/-/_/g} +.endfor + +post-extract: +.for account project tag subdir in ${_SRHT_TUPLE:S/:/ /g:[5..-1]} + @${MKDIR} ${WRKSRC}/${subdir:H} + @${MV} ${WRKDIR}/${project}-${tag} ${WRKSRC}/${subdir} +.endfor + +.include <bsd.port.post.mk> diff --git a/www/kineto/distinfo b/www/kineto/distinfo new file mode 100644 index 000000000000..5119cac8e454 --- /dev/null +++ b/www/kineto/distinfo @@ -0,0 +1,11 @@ +TIMESTAMP = 1644457669 +SHA256 (sircmpwn-kineto-857f8c97ebc5_SRHT0.tar.gz) = aa5b0e85bb5b2bca86f4c7c493e3c80368847e22369ffa174170f5833bf493e4 +SIZE (sircmpwn-kineto-857f8c97ebc5_SRHT0.tar.gz) = 18419 +SHA256 (adnano-go-gemini-v0.1.17_SRHT0.tar.gz) = 82d42664147f58d4048b3e421eeeca053d21612972c9a34fa58b397ced2bbab2 +SIZE (adnano-go-gemini-v0.1.17_SRHT0.tar.gz) = 30371 +SHA256 (sircmpwn-getopt-23622cc906b3_SRHT0.tar.gz) = 0d80fe37a650699c195b70e79684a1c6ec25eaabbe9993b54243754be6edb7a7 +SIZE (sircmpwn-getopt-23622cc906b3_SRHT0.tar.gz) = 8496 +SHA256 (golang-net-5f4716e94777_GH0.tar.gz) = 987ec0774e8480615daf0664cd9c9ec9eb25cf6e553e32ae38697515629714b6 +SIZE (golang-net-5f4716e94777_GH0.tar.gz) = 1251426 +SHA256 (golang-text-v0.3.3_GH0.tar.gz) = 1604233637e3593749fbbb13b5069b08e6feba6d2b55a02fd3148793d5871185 +SIZE (golang-text-v0.3.3_GH0.tar.gz) = 7747332 diff --git a/www/kineto/files/kineto.in b/www/kineto/files/kineto.in new file mode 100644 index 000000000000..f58672f6d788 --- /dev/null +++ b/www/kineto/files/kineto.in @@ -0,0 +1,55 @@ +#!/bin/sh + +# $FreeBSD$ +# +# PROVIDE: kineto +# REQUIRE: LOGIN +# KEYWORD: shutdown +# +# Add these lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# kineto_enable (bool): Set to "NO" by default. +# Set it to "YES" to enable kineto. +# kineto_root (str): Default is gemini://localhost +# The gemini root proxy URL +# kineto_bind (str): The bind address +# unset by default - will bind to :8080 +# kineto_css_path (str): File system path of CSS stylesheet +# Unset by default +# kineto_css_url (str): URL of CSS stylesheet +# Unset by default +# kineta_user (str): Default "nobody" +# The kineto process user + +. /etc/rc.subr + +name=kineto +desc="HTTP to Gemini proxy" +rcvar=kineto_enable + +load_rc_config $name + +: ${kineto_enable:=NO} +: ${kineto_root=gemini://localhost} +: ${kineto_user=nobody} + +command="%%PREFIX%%/bin/${name}" +command_args="${kineto_root}" +pidfile="/var/run/${name}.pid" + +start_precmd="${name}_setflags" +start_cmd="${name}_start" + +kineto_setflags() +{ + rc_flags="${kineto_bind:+-b $kineto_bind }${kineto_css_path:+-s $kineto_css_path }${kineto_css_url:+-e $kineto_css_url }${rc_flags}" +} + +kineto_start() +{ + check_startmsgs && echo "Starting ${name}." + /usr/sbin/daemon -S -s info -l daemon -T $name -u "${kineto_user}" -p "${pidfile}" $command $rc_flags $command_args +} + +run_rc_command "$1" diff --git a/www/kineto/pkg-descr b/www/kineto/pkg-descr new file mode 100644 index 000000000000..89b8b0881c0b --- /dev/null +++ b/www/kineto/pkg-descr @@ -0,0 +1,3 @@ +An HTTP to Gemini proxy. + +WWW: https://git.sr.ht/~sircmpwn/kineto/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202202151817.21FIHxQE048143>