www-apps/up-common-proxies: add 1.3.0
continuous-integration/drone/push Build is passing Details

Signed-off-by: tastytea <tastytea@tastytea.de>
This commit is contained in:
tastytea 2022-07-08 12:56:38 +02:00
parent 9afb76ca3f
commit fd10473b38
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM
2 changed files with 70 additions and 0 deletions

View File

@ -44,3 +44,5 @@ DIST gopkg.in%2Fcheck.v1%2F@v%2Fv0.0.0-20161208181325-20d25e280405.zip 39844 BLA
DIST gopkg.in%2Fyaml.v3%2F@v%2Fv3.0.0-20200313102051-9f266ea9e77c.mod 95 BLAKE2B fbb87f0644ec9da5d4386358d23cdb15b0d23e8212e712f16f338455a3a0ad19fbfd63e92c955c359237ddfa8bb76d6d08280eead24d321668431891eca1e8ab SHA512 307ca9123efc577ca04828996ee9d8edbb51794ccb4b8d9f169ba689e7276aa5f6ae106a04b22b7fab853ffacfebcbf74468b64eaefd57445864c1fbc77fad9d
DIST gopkg.in%2Fyaml.v3%2F@v%2Fv3.0.0-20200313102051-9f266ea9e77c.zip 101467 BLAKE2B 8bb0aec8e693a4c0da59f1931e1fdcf6f94a236faba149d5af91e87284f39c693d20be65248eecde739cb555e371804fa6c723a56c69e6d02a347ba908e968b1 SHA512 bee7757d760f5ba1b9f7523af358652a5cb65f2b0064da097f78450871b2636efcbab0298a9871bbb3ce8012bf95a155949251d4f61464dde510097b936b47a8
DIST up-common-proxies-1.1.1.tar.gz 18558 BLAKE2B 39cdaaff940c4314b1f0c501bda0c2b29d2811a1898091218c0b4e27e53d12f113c49b6a4da7076e6bfc5e2c0d9d04467745294daa46b59de2454687dd82bea7 SHA512 b99ff43e8b8bb2bf4df09f198e43cc57da54814608143c9d3c595aa528e287bef29a711ba4049549210fdc34154618edb8936b989beeac6de4edfbe42090dc3e
DIST up-common-proxies-1.3.0-vendor.tar.xz 126664 BLAKE2B 6aceb3761829364ef3fec5442f5b71909eb981088cf459ab9052d3eb36de7dcf8f181a4ed2d0267edab0641d32de5b9da4b8af88fabe6cbeec1fbd44bab3e26a SHA512 1866d959b1378e4de9de1ebe57f3e0540fce93dad9e03a86acac6d95d676742305d9fe1867fd4650803d4b43d6f4dbdae3ba29bb1ac2f2ed431be1d14bd9173a
DIST up-common-proxies-1.3.0.tar.gz 23175 BLAKE2B f63cc6a6c99596ae060a64e4701d68cecb53d2e42723d07e82d4e5544ab19d463e0c1b95e42aa254631e292ad1f34b66ea0796e3e092f0095abb8557293c67d9 SHA512 58ab55428f9052113dbd0edd51df0cf047f4f0c0130655a59304f72b5a695a8b2af8f8da31b43f1c2f143c95079aa0897be5993fc096e99fb7fe99138e679bea

View File

@ -0,0 +1,68 @@
# Copyright 2021-2022 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
}