diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 42 |
1 files changed, 29 insertions, 13 deletions
@@ -1,19 +1,27 @@ # Maintainer: BluePeril <blueperil (at) blueperil _dot_ de> pkgname=matrix-appservice-telegram -pkgver=0.8.2 -pkgrel=2 +pkgver=0.9.0_rc3 +pkgrel=1 pkgdesc="A Matrix-Telegram hybrid puppeting/relaybot bridge." url="https://github.com/tulir/mautrix-telegram" -depends=('python' 'python-telethon-session-sqlalchemy' 'python-telethon>=1.14.0' 'python-ruamel-yaml' 'python-commonmark' 'python-alembic' 'python-mautrix>=0.5.0' 'python-aiohttp' 'python-magic-ahupp') +depends=('python' 'python-telethon-session-sqlalchemy' 'python-telethon>=1.17.0' 'python-ruamel-yaml' 'python-commonmark' 'python-alembic' 'python-mautrix>=0.8.2' 'python-aiohttp' 'python-magic-ahupp') makedepends=('python') optdepends=('python-cryptg: Uses native code for Telegram crypto stuff instead of pure Python' + 'python-cchardet: For faster encoding detection' + 'python-aiodns: For asyncronous DNS requests' 'python-pillow: WebP <-> PNG conversion for stickers' + 'python-qrcode: Login with QR code' 'python-moviepy: High quality thumbnails for Telegram->Matrix gifs and videos' 'python-numpy: High quality thumbnails for Telegram->Matrix gifs and videos' 'python-psycopg2: PostgreSQL support' + 'python-asyncpg: End-to-bridge encryption support' + 'python-olm: End-to-bridge encryption support' + 'python-unpaddedbase64: End-to-bridge encryption support' + 'python-pycryptodome: End-to-bridge encryption support' 'lottieconverter-git: convert WebP to GIF or WEBM' - 'python-matrix-nio>=0.12.0: End-to-bridge encryption support') + 'python-prometheus_client: metrics upload' + ) install=mautrix-telegram.install license=('AGPLv3') arch=('any') @@ -22,10 +30,12 @@ backup=('etc/mautrix-telegram/alembic.ini' 'etc/mautrix-telegram/registration.yaml') source=("https://github.com/tulir/mautrix-telegram/archive/v${pkgver/_rc/-rc}.tar.gz" 'mautrix-telegram.service' - 'fix_telethon_version.patch') -sha256sums=('1f227f50e84f643fc7633f1a8f336aa1e51db6c12628e983783c2995a41d497f' - '52b9e24a238bb34daa4966f033593516089ae1e7a72b373e5fa0a08a25082123' - 'f68fccabe067e409f8bb8ca7c03bebdce425ea5ed903b103691e31c26f3bcaa6') + 'mautrix-telegram.sysusers' + 'mautrix-telegram.tmpfiles') +sha256sums=('12a78afa60474fb72b7e50566b8f3163d4cbac5b94e1213a843dade95566c3ad' + 'd77c91154204ba5a5297c87c8b8a25209e125024aeee7c49f37416ccb7bd556a' + 'e069958db276309d00864ee3dded5700b78806c82663346aa2ef6878e2c0566b' + 'b7a13a8e400229f13cc6ff65319fa8cfc3eea4e9a4e6aba8933de663663bef94') prepare() { cd $srcdir/mautrix-telegram-${pkgver/_rc/-rc} @@ -47,10 +57,16 @@ build() { package() { cd $srcdir/mautrix-telegram-${pkgver/_rc/-rc} python setup.py install --root="${pkgdir}" --optimize=1 - mkdir -pm0755 ${pkgdir}/etc/mautrix-telegram ${pkgdir}/usr/lib/systemd/system/ - mv ${pkgdir}/usr/lib/python3.8/site-packages/mautrix_telegram/example-config.yaml ${pkgdir}/etc/mautrix-telegram/ - mv ${pkgdir}/usr/{alembic,alembic.ini} ${pkgdir}/etc/mautrix-telegram/ - sed -i -e "s|script_location = alembic|script_location = /etc/mautrix-telegram/alembic/|" ${pkgdir}/etc/mautrix-telegram/alembic.ini + + install -dm 750 "${pkgdir}/usr/share/mautrix-telegram/" + install -Dm 644 ../mautrix-telegram.service "${pkgdir}/usr/lib/systemd/system/mautrix-telegram.service" + install -Dm 644 ../mautrix-telegram.sysusers "${pkgdir}/usr/lib/sysusers.d/mautrix-telegram.conf" + install -Dm 644 ../mautrix-telegram.tmpfiles "${pkgdir}/usr/lib/tmpfiles.d/mautrix-telegram.conf" + + # cleanup rm -rf ${pkgdir}/usr/lib/python*/site-packages/tests - cp ../mautrix-telegram.service ${pkgdir}/usr/lib/systemd/system/ + + # Fix alembic position + mv ${pkgdir}/usr/{alembic,alembic.ini} "${pkgdir}/usr/share/mautrix-telegram/" + sed -i -e "s|script_location = alembic|script_location = /usr/share/mautrix-telegram/alembic/|" "${pkgdir}/usr/share/mautrix-telegram/alembic.ini" } |