diff --git a/www-apps/up-common-proxies/Manifest b/www-apps/up-common-proxies/Manifest index f4f09e7bf..c7745bbca 100644 --- a/www-apps/up-common-proxies/Manifest +++ b/www-apps/up-common-proxies/Manifest @@ -46,3 +46,5 @@ DIST gopkg.in%2Fyaml.v3%2F@v%2Fv3.0.0-20200313102051-9f266ea9e77c.zip 101467 BLA 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 +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 diff --git a/www-apps/up-common-proxies/up-common-proxies-1.4.0.ebuild b/www-apps/up-common-proxies/up-common-proxies-1.4.0.ebuild new file mode 100644 index 000000000..674d94a45 --- /dev/null +++ b/www-apps/up-common-proxies/up-common-proxies-1.4.0.ebuild @@ -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 +}