net-im/mjolnir: add 1.6.2

Signed-off-by: tastytea <tastytea@tastytea.de>
This commit is contained in:
tastytea 2023-01-06 13:17:11 +01:00
parent 13d7f64ae3
commit ce974016ac
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM
2 changed files with 85 additions and 0 deletions

View File

@ -4,3 +4,5 @@ DIST mjolnir-1.5.0-deps.tar.xz 34428920 BLAKE2B b1876ea496c9ad4815a86ba6e5f9474c
DIST mjolnir-1.5.0.tar.gz 194488 BLAKE2B e1b2a9335815b8a2f4452e3be1b27a903e9b96b565cbd567d5b4d52cb1e2ab914fd3be963abc6857e775343af79a4708320f6496f4242bcac9ed1898588fcdf4 SHA512 2f0d00e7c4e1cee8cdcc2565821638c3a979538402ccafd10beb0fd8edcd2cbf0e46f5bf11a6df2c02dfff49b89cbf731d9bcd5411b805d9079cdcac5484c06d
DIST mjolnir-1.6.1-deps.tar.xz 41745180 BLAKE2B 25790f8d9be879ef259585ca079013707ad1e23a646d0e45c7da1aa877298dd2bac81c4fd528fe27751377a40612f6b591102c6ec95d060b4ab3eefd7d547daf SHA512 4a9fb55e3aca9d5b7d73a7fa7e49cdec83576eee6f86ab75dfd08b59fc70caa775886331407d8e0b52f72ca03ce449b2f5b65d52524a7740ffea1a2a4a33ee61
DIST mjolnir-1.6.1.tar.gz 229672 BLAKE2B 6a313b0a17e7f7771bcf55e1a03cc67bd0f9dc29b706af1d07c96849514c9043ea72aedf619380a374a818ae44fca4816ba01d73270df90a33c4b498673250cd SHA512 a4720d8afad2c9b306503c8a160b8bc1bbb368aab16568cb388f9f2ed7607d679f1a0267db4d95b8cf6c8d13195a60daf48699b20a3998dd136705e477238b51
DIST mjolnir-1.6.2-deps.tar.xz 42791008 BLAKE2B 9a9ec405796c5d0137bc390de8cba7fe3327e6db7192b932b36db620f6b786bdc658142f08b3a4400abeebd66c01caeedae365ed8657bf2889365992d9b19a24 SHA512 925440376190330ff24c540224367bb18f821195c871ee4b43d26029cddc53aae46d8b665098ee41ce1e37c9cfe19ef38c9fd36c15ae0b4e99deb210d52553d8
DIST mjolnir-1.6.2.tar.gz 236358 BLAKE2B 47ae8d261781a90ef0ede7c8fb16dc198135cd834d724483a38c3f5fb579631ab493f72808eabe40f41f51f47f9d0dadef1e91c15b69305f9bd7bc229fc4f966 SHA512 a36661cb8e4dfcb5b186e5859a57feef4e33bed1255c86fcd55ed782e5ca105ffa3bc55cf953a381750c6057b8d0bfeacd127954a8099f11c76596b8d5d07540

View File

@ -0,0 +1,83 @@
# Copyright 2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
MATRIX_RUST_SDK_V="0.1.0-beta.1"
DESCRIPTION="A moderation tool for Matrix"
HOMEPAGE="https://github.com/matrix-org/mjolnir"
SRC_URI="
https://github.com/matrix-org/mjolnir/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
https://tastytea.de/files/gentoo/${P}-deps.tar.xz
elibc_glibc? (
amd64? (
https://github.com/matrix-org/matrix-rust-sdk/releases/download/matrix-sdk-crypto-nodejs-v${MATRIX_RUST_SDK_V}/matrix-sdk-crypto.linux-x64-gnu.node -> matrix-sdk-crypto-${MATRIX_RUST_SDK_V}.linux-x64-gnu.node
)
)
elibc_musl? (
amd64? (
https://github.com/matrix-org/matrix-rust-sdk/releases/download/matrix-sdk-crypto-nodejs-v${MATRIX_RUST_SDK_V}/matrix-sdk-crypto.linux-x64-musl.node -> matrix-sdk-crypto-${MATRIX_RUST_SDK_V}.linux-x64-musl.node
)
)
"
# NOTE: to generate the deps archive:
# tar -xf /var/cache/distfiles/${P}.tar.gz && cd ${P}
# yarn --cache-folder ./yarn-cache install
# tar -caf ${P}-deps.tar.xz yarn-cache
LICENSE="0BSD Apache-2.0 BSD BSD-2 ISC MIT PYTHON Unlicense"
SLOT="0"
KEYWORDS="~amd64"
IUSE="doc"
RDEPEND=">=net-libs/nodejs-16"
BDEPEND="
sys-apps/yarn
dev-lang/typescript
"
MY_YARNOPTS="--offline --non-interactive --no-progress --verbose"
src_prepare() {
yarn ${MY_YARNOPTS} --cache-folder ../yarn-cache install || die
local my_libc="gnu"
use elibc_musl && my_libc="musl"
local my_arch="x64"
# this is not cached but downloaded by a script usually
mkdir -p node_modules/@matrix-org/matrix-sdk-crypto-nodejs || die
cp "${DISTDIR}"/matrix-sdk-crypto-${MATRIX_RUST_SDK_V}.linux-${my_arch}-${my_libc}.node \
node_modules/@matrix-org/matrix-sdk-crypto-nodejs/matrix-sdk-crypto.linux-${my_arch}-${my_libc}.node \
|| die
default
}
src_compile() {
yarn ${MY_YARNOPTS} build || die
}
src_install() {
insinto /opt/${PN}
doins -r node_modules
insinto /opt/${PN}/${PN}
doins -r lib/*
keepdir /opt/${PN}/config
einstalldocs
dodoc config/default.yaml
use doc && dodoc docs/*
newinitd "${FILESDIR}"/${PN}.initd ${PN}
}
pkg_postinst() {
if [[ ! -f "${EROOT}"/opt/${PN}/config/production.yaml ]]; then
elog "Copy the configuration example from /usr/share/doc/${PF}/default.yaml*"
elog "into /opt/${PN}/config/production.yaml and edit it."
fi
}