Merge pull request 'Add ebuild for mautrix-whatsapp 0.2510.0' (#166) from feature/mautrix-whatsapp into main
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
Reviewed-on: #166
This commit is contained in:
commit
c8b657de20
7 changed files with 148 additions and 16 deletions
File diff suppressed because one or more lines are too long
15
metadata/md5-cache/net-im/mautrix-whatsapp-0.2510.0
Normal file
15
metadata/md5-cache/net-im/mautrix-whatsapp-0.2510.0
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=crypt? ( dev-libs/olm )
|
||||||
|
DESCRIPTION=A Matrix-WhatsApp puppeting bridge
|
||||||
|
EAPI=8
|
||||||
|
HOMEPAGE=https://github.com/mautrix/whatsapp/
|
||||||
|
INHERIT=go-module optfeature systemd
|
||||||
|
IUSE=crypt
|
||||||
|
KEYWORDS=~amd64
|
||||||
|
LICENSE=AGPL-3 GPL-3
|
||||||
|
RDEPEND=crypt? ( dev-libs/olm ) acct-user/mautrix-whatsapp
|
||||||
|
SLOT=0
|
||||||
|
SRC_URI=https://github.com/mautrix/whatsapp/archive/v0.2510.0.tar.gz -> mautrix-whatsapp-0.2510.0.gh.tar.gz https://gentoo-overlay.friedli.info/mautrix-whatsapp-0.2510.0-deps.tar.xz
|
||||||
|
_eclasses_=multiprocessing 1e32df7deee68372153dca65f4a7c21f toolchain-funcs 98d9f464d912ae6b7316fb8a3721f5db flag-o-matic a7afe42e95fb46ce9691605acfb24672 go-env 0e2babf96e7d0b045fc07ad199eb2399 go-module d96f2a2fd6d8fbad6d94516bf238f885 optfeature 538bce96e5589935b57e178e8635f301 systemd a964c0cbe818b5729da1dbfcee5be861
|
||||||
|
_md5_=6163a2914b69bce0572569e4cf2dcb08
|
||||||
6
net-im/mautrix-whatsapp/Manifest
Normal file
6
net-im/mautrix-whatsapp/Manifest
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
AUX mautrix-whatsapp.initd 720 BLAKE2B 1a2c4b9a87831d83c36d831d6421fb088c8af3bf1278cd0c7c4e82a73bb596faf858c8d1ddfd88d95f48100f5142e604d533c63a443d47aa69686ff2659b5a4b SHA512 4bb97b6e26a9114f5554800646233e0700094d3931ec5e467179e9144829092e5ea3e1177e898f260d9e09bdababf86d545c581efa0f9ace1d2a3ae2719fa7ae
|
||||||
|
AUX mautrix-whatsapp.service 300 BLAKE2B 735ec741b3b7b1d965d7c518fa77c9fc14b42ea8811bb5f5d1c044a329d9ec62e8e2673a94d425e6665155840075bc753a51de1acd93c286653e2f185ef0dae6 SHA512 77b0ab4f78d41296bbf483a632f34c924d11ca6500831a338f3668450606ef9cf7355274a538dcca47ff13becd491fc86e5a5282c0cfdeefeecfcb872f80d547
|
||||||
|
DIST mautrix-whatsapp-0.2510.0-deps.tar.xz 51320028 BLAKE2B c9e26fb0415d816379924cee280161ea6a80e34346a837ca2ed3023eaceecd52e3ac168866dfa0d916159328b0bb718ab8428218008f1387252f1266d98c5f6a SHA512 6edd562d533abee80e2dafc71aeac327ecb6f74bbe1c91edfaec8f86e7dd0a4a5b60df5f67e57fa46a45135b769e6ef2c175ae2a9d662b25f890788ddbd46f55
|
||||||
|
DIST mautrix-whatsapp-0.2510.0.gh.tar.gz 124351 BLAKE2B 9df1b814f75064247025cb766230ac2ebc852c80c34af09438ef036151eeed95d3598bd0c52b175650dfda5982ec4fc6edef221551d355ca97a7766690e3583c SHA512 f218e3bfa5793da8f402973052712812fd1e26eb32af36e9cdfa19f4685dab05798290d2b80c70a560b8204c3e7eadb7e2087ed49eca4f47a863dccb8f0f8a00
|
||||||
|
EBUILD mautrix-whatsapp-0.2510.0.ebuild 2018 BLAKE2B a68fca912f85d2cb22a6a434455156018a53969e1c04c37debeab770a84bcb7b350e292364a5ce9b950a2256a6de6f144c06ceeef6b58b3129f9d0bf025da21e SHA512 24ba00bfac514816bbe43ef0fe13cfcc55502d42ddcc25a3be6a0aabdeec0ec970c7612818617dfc02597716bc9040fd4ee9ec3e44231e608b6008b22f33b72f
|
||||||
|
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/whatsapp/daemon.log"
|
||||||
|
error_log="/var/log/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
|
||||||
69
net-im/mautrix-whatsapp/mautrix-whatsapp-0.2510.0.ebuild
Normal file
69
net-im/mautrix-whatsapp/mautrix-whatsapp-0.2510.0.ebuild
Normal file
|
|
@ -0,0 +1,69 @@
|
||||||
|
# Copyright 2022-2025 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://gentoo-overlay.friedli.info/${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 ./cmd/mautrix-whatsapp $(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
|
||||||
|
|
||||||
|
(
|
||||||
|
echo -e '# Network-specific config options\nnetwork:'
|
||||||
|
sed 's/^/ /' pkg/connector/example-config.yaml || die
|
||||||
|
cat ../go-mod/maunium.net/go/mautrix@v0.25.2/bridgev2/matrix/mxmain/example-config.yaml || die
|
||||||
|
) |
|
||||||
|
sed "s_\./logs/bridge\.log_/var/log/mautrix/whatsapp/mautrix-whatsapp.log_" > "${PN/-/_}.yaml" || die
|
||||||
|
|
||||||
|
insinto "/etc/mautrix"
|
||||||
|
doins "${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…
Add table
Add a link
Reference in a new issue