You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.7 KiB

# Maintainer: Baltazár Radics <baltazar.radics@gmail.com>
_pkgname=mautrix-facebook
pkgname=$_pkgname-git
pkgver=0.2.0.r5.2fb76cb
pkgrel=1
pkgdesc='A Matrix-Facebook Messenger puppeting bridge'
arch=(any)
url='https://github.com/tulir/mautrix-facebook'
license=(AGPL3)
depends=(python python-{aiohttp,yarl,asyncpg,ruamel-yaml,commonmark,magic-git,mautrix,pycryptodome,paho-mqtt})
makedepends=(git)
optdepends=(
'python-pillow: animated_stickers'
'python-olm: e2be'
'python-unpaddedbase64: e2be'
'python-prometheus_client: metrics'
'python-setuptools: weblogin'
)
provides=($_pkgname)
conflicts=($_pkgname)
backup=("etc/$_pkgname/config.yaml")
source=(
"git+https://github.com/tulir/$_pkgname.git"
"$_pkgname.sysusers"
"$_pkgname.tmpfiles"
"$_pkgname.service"
"config.patch"
)
sha256sums=('SKIP'
'c7bb43143885e811028e2bca23c175d67128d6f9c1638446779cefb267a24226'
'368d44410aca3ba8bdb74f38a9cfdece49686709c01ba6d06aa05cc0d102db9d'
'882aee27fcd4f2fef193adad0302c40afa658c3804b73fc4e0c4d164f52014c3'
'0173a47e99e7de79a618b7255493d56bc45c9f275444a9d0ffbfae73b73f6e90')
pkgver() {
cd $_pkgname
git describe --long --tags | sed 's/^v//;s/\([^-]*-\)g/r\1/;s/-/./g'
}
prepare() {
cd $_pkgname
git apply ../config.patch
}
package() {
install -Dm644 $_pkgname.service "$pkgdir"/usr/lib/systemd/system/$_pkgname.service
install -Dm644 $_pkgname.sysusers "$pkgdir"/usr/lib/sysusers.d/$_pkgname.conf
install -Dm644 $_pkgname.tmpfiles "$pkgdir"/usr/lib/tmpfiles.d/$_pkgname.conf
cd $_pkgname
python setup.py install --root="$pkgdir" --optimize=1
install -d "$pkgdir"/etc/$_pkgname
mv "$pkgdir"/usr/example-config.yaml "$pkgdir"/etc/$_pkgname/config.yaml
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}