2024-04-02 23:35:43 +02:00
|
|
|
# Copyright 1999-2024 Gentoo Authors
|
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
|
|
|
EAPI=8
|
|
|
|
inherit systemd
|
|
|
|
|
|
|
|
DESCRIPTION="A Matrix-WhatsApp puppeting bridge."
|
|
|
|
HOMEPAGE="https://docs.mau.fi/bridges/go/whatsapp/index.html"
|
|
|
|
SRC_URI="https://github.com/mautrix/whatsapp/releases/download/v${PV}/mautrix-whatsapp-amd64 -> ${P}"
|
|
|
|
|
2024-04-26 14:51:38 +02:00
|
|
|
IUSE="postgres"
|
|
|
|
|
2024-04-02 23:35:43 +02:00
|
|
|
LICENSE="AGPL-3"
|
|
|
|
SLOT="0"
|
|
|
|
KEYWORDS="~amd64"
|
|
|
|
|
|
|
|
DEPEND="acct-user/mautrix-whatsapp-bin"
|
2024-04-26 14:51:38 +02:00
|
|
|
RDEPEND="${DEPEND}
|
2024-04-26 14:55:08 +02:00
|
|
|
postgres? ( >=dev-db/postgresql-10 )
|
|
|
|
!postgres? ( dev-db/sqlite )"
|
2024-04-02 23:35:43 +02:00
|
|
|
|
|
|
|
S="${WORKDIR}"
|
|
|
|
|
|
|
|
src_unpack() {
|
|
|
|
cp "${DISTDIR}/${P}" "${S}/mautrix-whatsapp"
|
|
|
|
}
|
|
|
|
|
|
|
|
src_compile() {
|
|
|
|
:
|
|
|
|
}
|
|
|
|
|
|
|
|
src_install() {
|
|
|
|
exeinto /opt/mautrix-whatsapp
|
|
|
|
doexe mautrix-whatsapp
|
|
|
|
|
|
|
|
insinto /opt/mautrix-whatsapp
|
2024-04-26 14:51:38 +02:00
|
|
|
newins "${FILESDIR}/example-config.yaml" config.yaml
|
2024-04-02 23:35:43 +02:00
|
|
|
|
|
|
|
systemd_dounit "${FILESDIR}"/mautrix-whatsapp.service
|
|
|
|
|
2024-04-26 14:51:38 +02:00
|
|
|
# fowners mautrix-whatsapp-bin:mautrix-whatsapp-bin /opt/mautrix-whatsapp/mautrix-whatsapp
|
|
|
|
# fowners mautrix-whatsapp-bin:mautrix-whatsapp-bin /opt/mautrix-whatsapp/example-config.yaml
|
|
|
|
# fperms 0640 /opt/mautrix-whatsapp/example-config.yaml
|
2024-04-02 23:35:43 +02:00
|
|
|
}
|