Commit 82a16920 authored by Michał Polański's avatar Michał Polański
Browse files

testing/tlstunnel: new aport

TLS reverse proxy
https://sr.ht/~emersion/tlstunnel/
parent 70ce50bd
Pipeline #82865 passed with stages
in 2 minutes and 18 seconds
# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=tlstunnel
pkgver=0.1.0
pkgrel=0
pkgdesc="TLS reverse proxy"
url="https://sr.ht/~emersion/tlstunnel/"
license="MIT"
arch="all"
options="chmod-clean"
depends="ca-certificates"
makedepends="go scdoc libcap"
subpackages="$pkgname-doc $pkgname-openrc"
pkgusers="$pkgname"
pkggroups="$pkgname"
install="$pkgname.pre-install"
source="$pkgname-v$pkgver.tar.gz::https://git.sr.ht/~emersion/tlstunnel/archive/v$pkgver.tar.gz
$pkgname.initd
$pkgname.confd
config
"
builddir="$srcdir/tlstunnel-v$pkgver"
export GOPATH="$srcdir"
export GOFLAGS="$GOFLAGS -trimpath"
build() {
make
}
check() {
go test ./...
}
package() {
make DESTDIR="$pkgdir" PREFIX=/usr BINDIR=/usr/sbin install
setcap cap_net_bind_service=+ep "$pkgdir"/usr/sbin/tlstunnel
install -Dm644 "$srcdir"/config "$pkgdir"/etc/tlstunnel/config
install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
install -Dm644 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
}
sha512sums="
7bc44375250ee3792eb5e2cad6297d2597fd916e3a44d499c1e25c80e7c76bc07a70e5d73f42d835685791da2526cfd67b223e5aee499bd5c5876f436f999dbf tlstunnel-v0.1.0.tar.gz
6b502c3f160bbc1e1511774f309c03f70ec9bb89d9685564feca3b64c7071bee6b6c60219b96ab5b5972795903ea1fdd2775e67fe8c4d77412cfd9274984e384 tlstunnel.initd
b333a3607c44d7615e636e8122b59f6f8aba793ed75216aafd95392d5c05caf03bfe3309e37b83907f80e362af765e6d3a37039a091dbe848be7644b6c3f0554 tlstunnel.confd
a4ec6c1ff057b9ad5d9e9294725dbc03f937669da30956c33c11da86f8122740eb9d4989e7dd0ad3032e7351e8bf1f8fa4d2320771aa24d227ff766d20c05258 config
"
# See tlstunnel(1) for supported directives
# Configuration for /etc/init.d/tlstunnel
# additional arguments to pass to the daemon
#command_args=""
# log destination
error_log=/var/log/tlstunnel.log
#!/sbin/openrc-run
supervisor=supervise-daemon
name="tlstunnel"
description="TLS reverse proxy"
command=/usr/sbin/tlstunnel
command_user=tlstunnel:tlstunnel
extra_started_commands="reload"
description_reload="Reload configuration"
depend() {
need net localmount
after firewall
}
start_pre() {
[ -n "$error_log" ] && checkpath -f -o tlstunnel:tlstunnel "$error_log"
}
reload() {
ebegin "Reloading configuration"
$supervisor $RC_SVCNAME --signal HUP
eend $?
}
#!/bin/sh
user=tlstunnel
group=tlstunnel
addgroup -S $group 2>/dev/null
adduser -S -D -h /var/lib/$user -s /sbin/nologin -G $group -g $user $user 2>/dev/null
exit 0
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment