diff options
-rw-r--r-- | .SRCINFO | 29 | ||||
-rw-r--r-- | PKGBUILD | 44 | ||||
-rw-r--r-- | mautrix-googlechat-registration | 8 | ||||
-rw-r--r-- | mautrix-googlechat.install | 8 | ||||
-rw-r--r-- | mautrix-googlechat.service | 8 |
5 files changed, 97 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..3c8fc8af73b4 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,29 @@ +pkgbase = mautrix-googlechat + pkgdesc = A Matrix-Google Chat puppeting bridge. + pkgver = 0.3.0 + pkgrel = 1 + url = https://github.com/mautrix/googlechat + install = mautrix-googlechat.install + arch = any + license = AGPLv3 + makedepends = python-setuptools + depends = python + depends = python-aiohttp + depends = python-asyncpg + depends = python-commonmark + depends = python-magic-git + depends = python-mautrix + depends = python-olm + depends = python-protobuf + depends = python-pycryptodome + depends = python-ruamel-yaml + depends = python-unpaddedbase64 + depends = python-yarl + source = https://github.com/mautrix/googlechat/archive/refs/tags/v0.3.0.tar.gz + source = mautrix-googlechat-registration + source = mautrix-googlechat.service + sha256sums = 82c2b3c5acea8a85b0753ccb9c67576b42680f37312832fee537492a9363814e + sha256sums = fe7b3a6b600d8ed79f55bd15cb1dab2ff52b06b7a0a33b76057d9d2adfa32249 + sha256sums = ae59346bae9bc0601714068b236fdbfbab6a9c363fe11207d01acc8a28f1194a + +pkgname = mautrix-googlechat diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..7fe37f3ad593 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,44 @@ +# Maintainer: Deon Spengler <deon@spengler.co.za> + +pkgname=mautrix-googlechat +pkgver=0.3.0 +pkgrel=1 +pkgdesc="A Matrix-Google Chat puppeting bridge." +url="https://github.com/mautrix/googlechat" +depends=(python + python-aiohttp + python-asyncpg + python-commonmark + python-magic-git + python-mautrix + python-olm + python-protobuf + python-pycryptodome + python-ruamel-yaml + python-unpaddedbase64 + python-yarl) +makedepends=(python-setuptools) +license=(AGPLv3) +arch=(any) +install="${pkgname}.install" +source=("https://github.com/mautrix/googlechat/archive/refs/tags/v${pkgver}.tar.gz" + "mautrix-googlechat-registration" + "mautrix-googlechat.service") +sha256sums=('82c2b3c5acea8a85b0753ccb9c67576b42680f37312832fee537492a9363814e' + 'fe7b3a6b600d8ed79f55bd15cb1dab2ff52b06b7a0a33b76057d9d2adfa32249' + 'ae59346bae9bc0601714068b236fdbfbab6a9c363fe11207d01acc8a28f1194a') + +build() { + cd googlechat-${pkgver} + python setup.py build +} + +package() { + cd googlechat-${pkgver} + python setup.py install --root="$pkgdir" --optimize=1 + + install -Dm664 ${pkgdir}/usr/example-config.yaml ${pkgdir}/etc/synapse/mautrix-googlechat/config.yaml + rm ${pkgdir}/usr/example-config.yaml + install -Dm755 ${srcdir}/mautrix-googlechat-registration ${pkgdir}/usr/bin/mautrix-googlechat-registration + install -Dm644 ${srcdir}/mautrix-googlechat.service ${pkgdir}/usr/lib/systemd/system/mautrix-googlechat.service +} diff --git a/mautrix-googlechat-registration b/mautrix-googlechat-registration new file mode 100644 index 000000000000..3e9882054ccf --- /dev/null +++ b/mautrix-googlechat-registration @@ -0,0 +1,8 @@ +#!/usr/bin/bash + +if [[ $EUID -ne 0 ]]; then + echo "This script must be run as root" + exit 1 +fi + +python -m mautrix_googlechat -c /etc/synapse/mautrix-googlechat/config.yaml -r /etc/synapse/mautrix-googlechat/registration.yaml -g diff --git a/mautrix-googlechat.install b/mautrix-googlechat.install new file mode 100644 index 000000000000..9093d4ffcb1b --- /dev/null +++ b/mautrix-googlechat.install @@ -0,0 +1,8 @@ +post_install() { + echo "Update the config '/etc/synapse/mautrix-googlechat/config.yaml' to your environment" + echo "Generate the appservice registration with the following command" + echo " mautrix-googlechat-registration" + echo "Register the bridge by makeing the following change to homeserver.yaml" + echo " app_service_config_files:" + echo " - /etc/synapse/mautrix-googlechat/registration.yaml" +} diff --git a/mautrix-googlechat.service b/mautrix-googlechat.service new file mode 100644 index 000000000000..b695710aa881 --- /dev/null +++ b/mautrix-googlechat.service @@ -0,0 +1,8 @@ +[Unit] +Description=Mautrix Google Chat bridge + +[Service] +ExecStart=/usr/bin/python -m mautrix_googlechat -c /etc/synapse/mautrix-googlechat/config.yaml + +[Install] +WantedBy=multi-user.target |