This commit is contained in:
parent
b1cdc5f6d8
commit
4dc25b4995
5 changed files with 127 additions and 0 deletions
6
net-im/mautrix-whatsapp/Manifest
Normal file
6
net-im/mautrix-whatsapp/Manifest
Normal file
|
@ -0,0 +1,6 @@
|
|||
AUX mautrix-whatsapp.initd 736 BLAKE2B c0fac17cbc6493eb564816a037a7a47d3d09fb6956d9dd0f4a869012f00cc3bb84f5f80a7e98869b3da19b54a9cdc5719988fdc80e3444de153463a05e3a9f4c SHA512 830207cc4ad0a9c10032ac3130304cb448cac14d3b957b21627f14c0fc08adf44eb95e936dae7106f7e81577c170f03545b1b6d1407cc91cacef710367bf27d2
|
||||
AUX mautrix-whatsapp.service 300 BLAKE2B 735ec741b3b7b1d965d7c518fa77c9fc14b42ea8811bb5f5d1c044a329d9ec62e8e2673a94d425e6665155840075bc753a51de1acd93c286653e2f185ef0dae6 SHA512 77b0ab4f78d41296bbf483a632f34c924d11ca6500831a338f3668450606ef9cf7355274a538dcca47ff13becd491fc86e5a5282c0cfdeefeecfcb872f80d547
|
||||
DIST mautrix-whatsapp-0.10.9-deps.tar.xz 43772080 BLAKE2B a2ce5900a7825eaa4294b04b5973f7dbe8df77d0495884f8bff0621c974621ca324f93318e295523453c2b9243ea600d43516a80f07d337c6507cc61b8904276 SHA512 1d6d9c699e14c98a340945d0fbcef065ce8d1b749fba4d4edea394f47f80616edde31f5421721f79b7a135450574d51a150c316c5155967fe06b76fb1512b4bb
|
||||
DIST mautrix-whatsapp-0.10.9.gh.tar.gz 159599 BLAKE2B f757d353957506b5a7f71da748c0e2d3e8eecac6026914561e7da9c0488a6604355760dca40c59f01a69261ebcd8e1d9eb7c90e376119df7b9762864c6487e85 SHA512 6b9909fdce95accc15f948fe55e35df19923bfd4b4630ec267ae9948b8c3625c7323b75837a723de9c45b65e3f4da4684cb2ee079734d9a26c0008f173f95737
|
||||
EBUILD mautrix-whatsapp-0.10.9.ebuild 1766 BLAKE2B bd523353e388a3ea2185de00f9554a90ec5f207bf2189582dc1231c6a5f743bfe0d28a0644287513ad8f325c11ed5c71388b781e0e3dffcdf794187aecccdf06 SHA512 74237394ac8dabcb0a716d647465c7512623df41bfbc5512f4ee35527861fc9fa8717bf2d96dbe13aa1ef04e95aabc56e4e7f1ffaab7e37ad93f948b6c3ee288
|
||||
MISC metadata.xml 729 BLAKE2B 45b18f64fa458b57989d139aba7ff0f176525822a719c2fa1fa99f4d936f2bb7f0283dd7ae1a2ef4f6b60fb7882e49d2d9d1fe3ff3d2687557f8b45543c821c3 SHA512 a4c16669bb08c3e7243f4c0089a3e43cb0f3a11132f4156ef12eae9527c5110a754155a5790434e9e5a9c623f6838ebf7b69af0629ebdf8c441b01648c002de1
|
25
net-im/mautrix-whatsapp/files/mautrix-whatsapp.initd
Normal file
25
net-im/mautrix-whatsapp/files/mautrix-whatsapp.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-whatsapp daemon"
|
||||
description="A Matrix-WhatsApp puppeting bridge"
|
||||
module="mautrix_whatsapp"
|
||||
|
||||
pidfile="/run/${RC_SVCNAME}.pid"
|
||||
command="/usr/bin/mautrix-whatsapp"
|
||||
command_args="-c /etc/mautrix/${module}.yaml -r /var/lib/mautrix/whatsapp/registration.yaml"
|
||||
command_background=true
|
||||
command_user="mautrix-whatsapp:mautrix"
|
||||
|
||||
output_log="/var/log/mautrix/mautrix-whatsapp_daemon.log"
|
||||
error_log="/var/log/mautrix/mautrix-whatsapp_daemon.log"
|
||||
|
||||
depend() {
|
||||
need net
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
checkpath -d -m 0755 -o "$command_user" /var/lib/mautrix/whatsapp
|
||||
checkpath -f -m 0644 -o "$command_user" "$output_log"
|
||||
}
|
12
net-im/mautrix-whatsapp/files/mautrix-whatsapp.service
Normal file
12
net-im/mautrix-whatsapp/files/mautrix-whatsapp.service
Normal file
|
@ -0,0 +1,12 @@
|
|||
[Unit]
|
||||
Description=A Matrix-WhatsApp puppeting bridge
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
User=mautrix-whatsapp
|
||||
Group=mautrix
|
||||
Restart=on-failure
|
||||
ExecStart=/usr/bin/mautrix-whatsapp -c /etc/mautrix/mautrix_whatsapp.yaml -r /var/lib/mautrix/whatsapp/registration.yaml
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
63
net-im/mautrix-whatsapp/mautrix-whatsapp-0.10.9.ebuild
Normal file
63
net-im/mautrix-whatsapp/mautrix-whatsapp-0.10.9.ebuild
Normal file
|
@ -0,0 +1,63 @@
|
|||
# Copyright 2022-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit go-module optfeature systemd
|
||||
|
||||
DESCRIPTION="A Matrix-WhatsApp puppeting bridge "
|
||||
HOMEPAGE="https://github.com/mautrix/whatsapp/"
|
||||
SRC_URI="https://github.com/mautrix/whatsapp/archive/v${PV}.tar.gz -> ${P}.gh.tar.gz
|
||||
https://distfiles.chuso.net/distfiles/${P}-deps.tar.xz"
|
||||
S="${WORKDIR}/whatsapp-${PV}"
|
||||
|
||||
LICENSE="AGPL-3 GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE="crypt"
|
||||
|
||||
DEPEND="crypt? ( dev-libs/olm )"
|
||||
|
||||
RDEPEND="
|
||||
${DEPEND}
|
||||
acct-user/${PN}
|
||||
"
|
||||
|
||||
src_compile() {
|
||||
ego build $(use crypt || echo '-tags nocrypto')
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin "${PN}"
|
||||
|
||||
keepdir /var/log/mautrix/${PN/mautrix-/}
|
||||
fowners -R root:mautrix /var/log/mautrix
|
||||
fperms -R 770 /var/log/mautrix
|
||||
sed -i -e "s_\./logs_/var/log/mautrix_" "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() {
|
||||
optfeature "sending GIFs" media-video/ffmpeg
|
||||
|
||||
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"
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
su - "${PN}" -s /bin/sh -c \
|
||||
"/usr/bin/${PN} -c /etc/mautrix/${PN/-/_}.yaml -g -r /var/lib/${PN/-/\/}/registration.yaml"
|
||||
}
|
21
net-im/mautrix-whatsapp/metadata.xml
Normal file
21
net-im/mautrix-whatsapp/metadata.xml
Normal file
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>manuel@fritteli.ch</email>
|
||||
<name>Manuel Friedli</name>
|
||||
</maintainer>
|
||||
<use>
|
||||
<flag name="crypt">Enable end-to-bridge encryption with <pkg>dev-libs/olm</pkg>.</flag>
|
||||
</use>
|
||||
<upstream>
|
||||
<maintainer>
|
||||
<name>Tulir Asokan</name>
|
||||
<email>tulir@maunium.net</email>
|
||||
</maintainer>
|
||||
<changelog>https://github.com/mautrix/whatsapp/releases</changelog>
|
||||
<doc>https://docs.mau.fi/bridges/go/whatsapp/index.html</doc>
|
||||
<bugs-to>https://github.com/mautrix/whatsapp/issues</bugs-to>
|
||||
<remote-id type="github">mautrix/whatsapp</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
Loading…
Reference in a new issue