net-im/mjolnir: add 1.6.4

Signed-off-by: tastytea <tastytea@tastytea.de>
This commit is contained in:
tastytea 2023-01-14 18:46:02 +01:00
parent f0aa8cf74b
commit 55a112f8c8
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM
2 changed files with 85 additions and 0 deletions

View File

@ -6,3 +6,5 @@ DIST mjolnir-1.6.1-deps.tar.xz 41745180 BLAKE2B 25790f8d9be879ef259585ca07901370
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
DIST mjolnir-1.6.4-deps.tar.xz 42795704 BLAKE2B edb93c1d2d01fd3299c7723d159e615159c41e618c8aa34508ca044d0f9c8972ab36687c97001ddc565491971b6e3a060bda9d56b50110b3760ffcad8955dccf SHA512 dc89f6e01108671123effcd8cad8ee085fc720709e59b90f67dca48bfe9301cc6c642e6bbbc3148d4c6b7d79622554703defc69a695a85f3a27d2fab01753ee5
DIST mjolnir-1.6.4.tar.gz 244860 BLAKE2B bc7d240254169da1dd7f04ff34324b92f4a6df1d316144fd58c23196132b5a69fc0c31de1dd3bab1883a803c701c556103128681fbfe0d353929f8f89640da0d SHA512 c646450815d239d1e905aecbd86ddfab5b8ebb7c076dab9d9a4451f27b30e7708245b78460a656d58bbfe4414032d55037105e286b037b960de91df2b0891c21

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
}