www-apps/up-common-proxies: add 1.5.0

Signed-off-by: tastytea <tastytea@tastytea.de>
This commit is contained in:
tastytea 2023-06-11 13:22:11 +02:00
parent 8331f4e13a
commit ce27d9f786
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM
2 changed files with 70 additions and 0 deletions

View File

@ -2,3 +2,5 @@ DIST up-common-proxies-1.3.0-vendor.tar.xz 126664 BLAKE2B 6aceb3761829364ef3fec5
DIST up-common-proxies-1.3.0.tar.gz 23175 BLAKE2B f63cc6a6c99596ae060a64e4701d68cecb53d2e42723d07e82d4e5544ab19d463e0c1b95e42aa254631e292ad1f34b66ea0796e3e092f0095abb8557293c67d9 SHA512 58ab55428f9052113dbd0edd51df0cf047f4f0c0130655a59304f72b5a695a8b2af8f8da31b43f1c2f143c95079aa0897be5993fc096e99fb7fe99138e679bea
DIST up-common-proxies-1.4.0-vendor.tar.xz 126396 BLAKE2B f2e9b9afcf3617e63e099a6efacd86085e979f4bf9a02bd0c0f5d416bf2c3db345c6c41fe20127981279404529995c571c6f915587d0eb7eec0258a399a403a3 SHA512 8705ee4dbcf471b6b4466e4a0fb58f7b5ddf6080828a5a602635983b5992c9cad268faff60d8a4d6fe90340b5618bf07f340821c0cfbf4234bef02e2d11f7b74
DIST up-common-proxies-1.4.0.tar.gz 24318 BLAKE2B 408ebd06a8de38234bec10c967ff241c91dd7a9df90402cd30ad70638845d0663e1b94acc5cc14ff46823e869fdcf5621af9db2227e4ad1a0d03263619331d80 SHA512 bce3cb7f43bf3cc5443ea65192e2bbe098719429139c3ef14cf242587cfaad71ca8c2cdc3fd1c1e50c5f94c7204d0afb1387468b2463023de2fec3f99a93859d
DIST up-common-proxies-1.5.0-vendor.tar.xz 126480 BLAKE2B 451cb709c94eee988032abbbf6c430e3645287921cc2ad193e972f646b7719f9410d04e4fe609b9cdf660a2d0c126763abe06f59d879fdf1d2dba9954a82ef53 SHA512 0aa13225fa590b106b406ae1af9c94372d058921e7781fabf8973a33bf754e4b62b0a9a112c514a6f20653f67a54462bede51b2bc0e6196be975158fe18efa01
DIST up-common-proxies-1.5.0.tar.gz 25665 BLAKE2B 40ca68f3b6d4360c2e4461e55b63323979911283e523f992a283e9a2c36e499725060c23decbc566b86a05449ddc4fe28932f6912b53b955fcd9f9881a0bab9a SHA512 8fd4835390353a441c3b4e1d070250e6ed811e71b64e8e0a2d62403d06f8c8e4154d6b1cf2ab63ecd30dd15a8f1a3ae69345298538a0aa8c59868ab136896ad2

View File

@ -0,0 +1,68 @@
# Copyright 2021-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit go-module systemd
DESCRIPTION="Rewrite proxy for UnifiedPush"
HOMEPAGE="https://github.com/UnifiedPush/common-proxies"
SRC_URI="
https://github.com/UnifiedPush/common-proxies/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
https://tastytea.de/files/gentoo/${P}-vendor.tar.xz
"
S="${WORKDIR}/${PN/up-/}-${PV}"
LICENSE="BSD-2 MIT"
SLOT="0"
KEYWORDS="~amd64"
IUSE="logrotate systemd"
RDEPEND="acct-user/gotify"
DEPEND="${RDEPEND}"
src_prepare() {
sed -i -e "s|^WorkingDirectory=.*|WorkingDirectory=/etc/${PN}|" \
-e 's|^ExecStart=.*|ExecStart=/usr/bin/up-rewrite|' \
up-rewrite-proxy.service || die
cp "${FILESDIR}/${PN}.logrotate" . || die
if use systemd; then
sed -Ei "s/^(\s*)rc-service.*/\1systemctl restart ${PN}.service/" \
${PN}.logrotate || die
fi
sed -Ei 's/GIT_CMT=[^&]+&&//' Makefile || die
default
}
src_compile() {
export GIT_CMT="${PV}"
emake local
}
# TODO: tests
src_install() {
dobin up-rewrite
dodoc docs/{config.md,reverse_proxy.md}
newinitd "${FILESDIR}/${PN}.initd" ${PN}
systemd_newunit up-rewrite-proxy.service ${PN}.service
if use logrotate; then
insinto etc/logrotate.d
newins ${PN}.logrotate "${PN}"
fi
diropts --owner=gotify --group=gotify --mode=750
keepdir var/log/${PN}
insopts --owner=gotify --group=gotify --mode=750
insinto etc/${PN}
newins example-config.toml config.toml
einstalldocs
}