net-im/mautrix-slack: new package, add 0_pre20240501
Signed-off-by: Alarig Le Lay <alarig@swordarmor.fr>
This commit is contained in:
parent
b7ee623529
commit
b669644455
15
metadata/md5-cache/net-im/mautrix-slack-0_pre20240501
Normal file
15
metadata/md5-cache/net-im/mautrix-slack-0_pre20240501
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
BDEPEND=>=dev-lang/go-1.20:= app-arch/unzip virtual/pkgconfig
|
||||||
|
DEFINED_PHASES=compile config install postinst unpack
|
||||||
|
DEPEND=acct-user/mautrix-slack dev-libs/olm
|
||||||
|
DESCRIPTION=A Matrix-Slack puppeting bridge based on slack-go
|
||||||
|
EAPI=8
|
||||||
|
HOMEPAGE=https://github.com/mautrix/slack
|
||||||
|
INHERIT=go-module systemd
|
||||||
|
KEYWORDS=~amd64
|
||||||
|
LICENSE=AGPL-3
|
||||||
|
RDEPEND=acct-user/mautrix-slack dev-libs/olm
|
||||||
|
RESTRICT=strip
|
||||||
|
SLOT=0
|
||||||
|
SRC_URI=https://github.com/mautrix/slack/archive/75d2ffd88b6f1d097697fab363099ed7d37fff6f.tar.gz -> mautrix-slack-0_pre20240501.gh.tar.gz https://herbizarre.swordarmor.fr/garbage/mautrix-slack-0_pre20240501-deps.tar.xz
|
||||||
|
_eclasses_=multiprocessing 30ead54fa2e2b5f9cd4e612ffc34d0fe toolchain-funcs e56c7649b804f051623c8bc1a1c44084 multilib c19072c3cd7ac5cb21de013f7e9832e0 flag-o-matic d309b9713dfc18e754cba88d3ba69653 go-env dbefaac6fd7019213514bccd65949d9a go-module 83fd3ed1657cfc316c93d6a37018290d systemd c8b03e8df84486aa991d4396686e8942
|
||||||
|
_md5_=e94d81ce67f919a1ab8a6a0aa6deb6c5
|
2
net-im/mautrix-slack/Manifest
Normal file
2
net-im/mautrix-slack/Manifest
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
DIST mautrix-slack-0_pre20240501-deps.tar.xz 15786404 BLAKE2B 43a0d37298f6044a234fde995cb6ce3c1b6047ad5e88707aa2883e4aabd898b085376f919a29cd4f253a94126acb3496891b889c68312ff17166e59ad68eeb08 SHA512 fdcc778fcaa01fae4cb2852b2f7c016e7ee847b22d47301c24a523997e910a35a9482b10f81bb1e6c5a7315997a1e693895bf71f96befc2017d2beb587510f47
|
||||||
|
DIST mautrix-slack-0_pre20240501.gh.tar.gz 103759 BLAKE2B d7db7c698e89679deac910db355169114988629ea376221ee120eab4c2c088664ae452d5d49ecd4b503308d3f8817ff8a8f8933006f1bb8ad4dfc5a70f81024b SHA512 499a47fb4bfa416f45952a3df6e49441c4486888e5243cefc630c10f7b1d474121d1410c9b7cd297898db6d3975fde64ff41f848c985d8928aac8bfc26d67e94
|
25
net-im/mautrix-slack/files/mautrix-slack.initd
Normal file
25
net-im/mautrix-slack/files/mautrix-slack.initd
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
#!/sbin/openrc-run
|
||||||
|
# Copyright 1999-2023 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
name="mautrix-slack daemon"
|
||||||
|
description="A Matrix-Slack puppeting bridge"
|
||||||
|
module="mautrix_slack"
|
||||||
|
|
||||||
|
pidfile="/run/${RC_SVCNAME}.pid"
|
||||||
|
command="/usr/bin/mautrix-slack"
|
||||||
|
command_args="-c /etc/mautrix/${module}.yaml -r /var/lib/mautrix/slack/registration.yaml"
|
||||||
|
command_background=true
|
||||||
|
command_user="mautrix-slack:mautrix"
|
||||||
|
|
||||||
|
output_log="/var/log/mautrix/slack/daemon.log"
|
||||||
|
error_log="/var/log/mautrix/slack/daemon.log"
|
||||||
|
|
||||||
|
depend() {
|
||||||
|
need net
|
||||||
|
}
|
||||||
|
|
||||||
|
start_pre() {
|
||||||
|
checkpath -d -m 0755 -o "$command_user" /var/lib/mautrix/slack
|
||||||
|
checkpath -f -m 0644 -o "$command_user" "$output_log"
|
||||||
|
}
|
12
net-im/mautrix-slack/files/mautrix-slack.service
Normal file
12
net-im/mautrix-slack/files/mautrix-slack.service
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
[Unit]
|
||||||
|
Description=A Matrix-Slack puppeting bridge
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
User=mautrix-slack
|
||||||
|
Group=mautrix
|
||||||
|
Restart=always
|
||||||
|
ExecStart=/usr/bin/mautrix-slack -c /etc/mautrix/mautrix_slack.yaml -r /var/lib/mautrix/slack/registration.yaml
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
64
net-im/mautrix-slack/mautrix-slack-0_pre20240501.ebuild
Normal file
64
net-im/mautrix-slack/mautrix-slack-0_pre20240501.ebuild
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
# Copyright 2022-2024 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=8
|
||||||
|
|
||||||
|
inherit go-module systemd
|
||||||
|
|
||||||
|
COMMIT="75d2ffd88b6f1d097697fab363099ed7d37fff6f"
|
||||||
|
DESCRIPTION="A Matrix-Slack puppeting bridge based on slack-go"
|
||||||
|
HOMEPAGE="https://github.com/mautrix/slack"
|
||||||
|
SRC_URI="https://github.com/mautrix/slack/archive/${COMMIT}.tar.gz -> ${P}.gh.tar.gz
|
||||||
|
https://herbizarre.swordarmor.fr/garbage/${P}-deps.tar.xz
|
||||||
|
"
|
||||||
|
S="${WORKDIR}/slack-${COMMIT}"
|
||||||
|
|
||||||
|
LICENSE="AGPL-3"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="~amd64"
|
||||||
|
|
||||||
|
RDEPEND="
|
||||||
|
acct-user/${PN}
|
||||||
|
dev-libs/olm
|
||||||
|
"
|
||||||
|
DEPEND="${RDEPEND}"
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
ego build
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
dobin mautrix-slack
|
||||||
|
|
||||||
|
keepdir /var/log/mautrix/slack
|
||||||
|
fowners -R root:mautrix /var/log/mautrix
|
||||||
|
fperms -R 770 /var/log/mautrix
|
||||||
|
sed -i -e "s/\.\/logs/\/var\/log\/mautrix\/slack/" "example-config.yaml" || die
|
||||||
|
|
||||||
|
insinto "/etc/mautrix"
|
||||||
|
newins "example-config.yaml" "${PN/-/_}.yaml"
|
||||||
|
|
||||||
|
newinitd "${FILESDIR}/${PN}.initd" "${PN}"
|
||||||
|
systemd_dounit "${FILESDIR}/${PN}.service"
|
||||||
|
|
||||||
|
fowners -R root:mautrix /etc/mautrix
|
||||||
|
fperms -R 770 /etc/mautrix
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_postinst() {
|
||||||
|
einfo
|
||||||
|
elog ""
|
||||||
|
elog "Before you can use ${PN}, you must configure it correctly"
|
||||||
|
elog "The configuration file is located at \"/etc/mautrix/${PN/-/_}.yaml\""
|
||||||
|
elog "When done, run the following command: emerge --config ${CATEGORY}/${PN}"
|
||||||
|
elog "Then, you must register the bridge with your homeserver"
|
||||||
|
elog "Refer your homeserver's documentation for instructions"
|
||||||
|
elog "The registration file is located at /var/lib/${PN/-/\/}/registration.yaml"
|
||||||
|
elog "Finally, you may start the ${PN} daemon"
|
||||||
|
einfo
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_config() {
|
||||||
|
su - "${PN}" -s /bin/sh -c \
|
||||||
|
"/usr/bin/${PN} -c /etc/mautrix/${PN/-/_}.yaml -g -r /var/lib/${PN/-/\/}/registration.yaml"
|
||||||
|
}
|
18
net-im/mautrix-slack/metadata.xml
Normal file
18
net-im/mautrix-slack/metadata.xml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||||
|
<pkgmetadata>
|
||||||
|
<maintainer type="person">
|
||||||
|
<name>Julien Roy</name>
|
||||||
|
<email>julien@jroy.ca</email>
|
||||||
|
</maintainer>
|
||||||
|
<upstream>
|
||||||
|
<maintainer>
|
||||||
|
<name>Tulir Asokan</name>
|
||||||
|
<email>tulir@maunium.net</email>
|
||||||
|
</maintainer>
|
||||||
|
<changelog>https://github.com/mautrix/slack/releases</changelog>
|
||||||
|
<doc>https://docs.mau.fi/bridges/go/slack/index.html</doc>
|
||||||
|
<bugs-to>https://github.com/mautrix/slack/issues</bugs-to>
|
||||||
|
<remote-id type="github">mautrix/slack</remote-id>
|
||||||
|
</upstream>
|
||||||
|
</pkgmetadata>
|
Loading…
Reference in a new issue