gentoo-overlay/net-im/mautrix-whatsapp-bin/mautrix-whatsapp-bin-0.10.7-r1.ebuild
Manuel Friedli 9eb79d94db
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
Fix pkgcheck style issues.
Signed-off-by: Manuel Friedli <manuel@fritteli.ch>
2024-06-12 00:56:18 +02:00

46 lines
1.1 KiB
Bash

# 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}"
S="${WORKDIR}"
LICENSE="AGPL-3"
SLOT="0"
KEYWORDS="~amd64"
IUSE="+ffmpeg postgres"
DEPEND="acct-user/mautrix-whatsapp-bin"
RDEPEND="${DEPEND}
ffmpeg? ( media-video/ffmpeg[opus] )
postgres? ( >=dev-db/postgresql-10 )
!postgres? ( dev-db/sqlite )"
src_unpack() {
cp "${DISTDIR}/${P}" "${S}/mautrix-whatsapp"
}
src_compile() {
:
}
src_install() {
exeinto /opt/mautrix-whatsapp
doexe mautrix-whatsapp
insinto /opt/mautrix-whatsapp
newins "${FILESDIR}/example-config.yaml" config.yaml
systemd_dounit "${FILESDIR}"/mautrix-whatsapp.service
fowners mautrix-whatsapp-bin:mautrix-whatsapp-bin /opt/mautrix-whatsapp/mautrix-whatsapp
fowners mautrix-whatsapp-bin:mautrix-whatsapp-bin /opt/mautrix-whatsapp/config.yaml
fperms 0640 /opt/mautrix-whatsapp/config.yaml
}