View | Details | Raw Unified | Return to bug 261851 | Differences between
and this patch

Collapse All | Expand All

(-)b/www/kineto/Makefile (+51 lines)
Added Link Here
1
PORTNAME=	kineto
2
DISTVERSION=	g20211104
3
CATEGORIES=	www
4
COMMIT=		857f8c97ebc5
5
6
MAINTAINER=	corey@electrickite.org
7
COMMENT=	HTTP to Gemini proxy
8
9
LICENSE=	GPLv3
10
LICENSE_FILE=	${WRKSRC}/COPYING
11
12
USES=		go:modules,no_targets
13
USE_RC_SUBR=	${PORTNAME}
14
USE_GITHUB=	nodefault
15
GH_TUPLE=	golang:net:5f4716e94777:golang_net/vendor/golang.org/x/net \
16
		golang:text:v0.3.3:golang_text/vendor/golang.org/x/text
17
18
# Additional distfiles to fetch from https://git.sr.ht
19
_SRHT_TUPLE=	sircmpwn:${PORTNAME}:${COMMIT}:"" \
20
		adnano:go-gemini:v0.1.17:vendor/git.sr.ht/~adnano/go-gemini \
21
		sircmpwn:getopt:23622cc906b3:vendor/git.sr.ht/~sircmpwn/getopt
22
23
MAKE_ENV=	${GO_ENV} \
24
GOFLAGS=	"${GO_BUILDFLAGS}"
25
26
WRKSRC=		${WRKDIR}/${PORTNAME}-${COMMIT}
27
28
PLIST_FILES=	bin/${PORTNAME}
29
30
.include <bsd.port.pre.mk>
31
32
.for account project tag subdir in ${_SRHT_TUPLE:S/:/ /g}
33
MASTER_SITES+=	https://git.sr.ht/~${account}/${project}/archive/${tag}${EXTRACT_SUFX}?dummy=/:${account}_${project:S/-/_/g}
34
DISTFILES+=	${account}-${project}-${tag}_SRHT0${EXTRACT_SUFX}:${account}_${project:S/-/_/g}
35
.endfor
36
37
post-extract:
38
.for account project tag subdir in ${_SRHT_TUPLE:S/:/ /g:[5..-1]}
39
	@${MKDIR} ${WRKSRC}/${subdir:H}
40
	@${MV} ${WRKDIR}/${project}-${tag} ${WRKSRC}/${subdir}
41
.endfor
42
	(cd ${WRKSRC} && ${GO_CMD} mod vendor)
43
44
do-build:
45
	(cd ${WRKSRC} && ${GO_CMD} build ${GOFLAGS})
46
47
do-install:
48
	${MKDIR} ${STAGEDIR}${PREFIX}/bin/
49
	${MV} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/
50
51
.include <bsd.port.post.mk>
(-)b/www/kineto/distinfo (+11 lines)
Added Link Here
1
TIMESTAMP = 1644457669
2
SHA256 (sircmpwn-kineto-857f8c97ebc5_SRHT0.tar.gz) = aa5b0e85bb5b2bca86f4c7c493e3c80368847e22369ffa174170f5833bf493e4
3
SIZE (sircmpwn-kineto-857f8c97ebc5_SRHT0.tar.gz) = 18419
4
SHA256 (adnano-go-gemini-v0.1.17_SRHT0.tar.gz) = 82d42664147f58d4048b3e421eeeca053d21612972c9a34fa58b397ced2bbab2
5
SIZE (adnano-go-gemini-v0.1.17_SRHT0.tar.gz) = 30371
6
SHA256 (sircmpwn-getopt-23622cc906b3_SRHT0.tar.gz) = 0d80fe37a650699c195b70e79684a1c6ec25eaabbe9993b54243754be6edb7a7
7
SIZE (sircmpwn-getopt-23622cc906b3_SRHT0.tar.gz) = 8496
8
SHA256 (golang-net-5f4716e94777_GH0.tar.gz) = 987ec0774e8480615daf0664cd9c9ec9eb25cf6e553e32ae38697515629714b6
9
SIZE (golang-net-5f4716e94777_GH0.tar.gz) = 1251426
10
SHA256 (golang-text-v0.3.3_GH0.tar.gz) = 1604233637e3593749fbbb13b5069b08e6feba6d2b55a02fd3148793d5871185
11
SIZE (golang-text-v0.3.3_GH0.tar.gz) = 7747332
(-)b/www/kineto/files/kineto.in (+55 lines)
Added Link Here
1
#!/bin/sh
2
3
# PROVIDE: kineto
4
# REQUIRE: NETWORKING SERVERS
5
# BEFORE: DAEMON
6
# KEYWORD: shutdown
7
8
#
9
# Add some of the following variables to /etc/rc.conf to configure kineto:
10
# kineto_enable (bool):		Set to "NO" by default.
11
#				Set it to "YES" to enable kineto.
12
# kineto_root (str):		Default is gemini://localhost
13
#				The gemini root proxy URL
14
# kineto_bind (str):		The bind address
15
#				unset by default - will bind to :8080
16
# kineto_css_path (str):	File system path of CSS stylesheet
17
#				Unset by default
18
# kineto_css_url (str):		URL of CSS stylesheet
19
#				Unset by default
20
# kineta_user (str):		Default "nobody"
21
#				The kineto process user
22
#
23
24
. /etc/rc.subr
25
26
name="kineto"
27
desc="HTTP to Gemini proxy"
28
rcvar=kineto_enable
29
30
load_rc_config $name
31
32
: ${kineto_enable="NO"}
33
: ${kineto_root="gemini://localhost"}
34
: ${kineto_bind=""}
35
: ${kineto_css_peth=""}
36
: ${kineto_css_url=""}
37
: ${kineto_user="nobody"}
38
39
command="%%PREFIX%%/bin/${name}"
40
command_args="${kineto_root}"
41
pidfile="/var/run/${name}.pid"
42
43
start_precmd="${name}_setflags"
44
start_cmd="${name}_start"
45
46
kineto_setflags() {
47
    rc_flags="${kineto_bind:+-b $kineto_bind }${kineto_css_path:+-s $kineto_css_path }${kineto_css_url:+-e $kineto_css_url }${rc_flags}"
48
}
49
50
kineto_start() {
51
    check_startmsgs && echo "Starting ${name}."
52
    /usr/sbin/daemon -S -s info -l daemon -T $name -u "${kineto_user}" -p "${pidfile}" $command $rc_flags $command_args
53
}
54
55
run_rc_command "$1"
(-)b/www/kineto/pkg-descr (-1 / +3 lines)
Added Link Here
0
- 
1
An HTTP to Gemini proxy.
2
3
WWW: https://git.sr.ht/~sircmpwn/kineto/

Return to bug 261851