# WARNING: DRAFT ONLY - No idea if it actually builds yet
_pkgname=slidge
pkgname="python-$_pkgname-git"
pkgver=0.1.0.r9.gc45818f
pkgrel=1
pkgdesc='XMPP puppeteer gateway library in python'
arch=('x86_64' 'armv7h' 'aarch64')
url="https://slidge.im/"
license=('AGPL3')
depends=('python>=3.11' 'python-slixmpp>=1.12.0' 'python-slixmpp<1.13.0' 'python-aiohttp>=3.11.11' 'python-aiohttp<4' 'python-qrcode>=8.0' 'python-qrcode<9.0' 'python-magic>=0.4.27' 'python-magic<0.5' 'python-configargparse>=1.7' 'python-configargparse<2' 'python-pillow>=11.0.0' 'python-pillow<12' 'python-alembic>=1.14.0' 'python-alembic<2' 'python-sqlalchemy>=2' 'python-sqlalchemy<3' 'python-defusedxml>=0.7.1' 'python-blurhash')
# TODO: package python-thumbhash as python-blurhash replacement
makedepends=('git' 'python-build' 'python-wheel' 'python-installer' 'python-setuptools')
source=('git+https://codeberg.org/slidge/slidge')
sha256sums=('SKIP')

pkgver() {
  cd $_pkgname
  git describe --long --abbrev=7 | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd $_pkgname
  python -m build --wheel --no-isolation
}

package() {
  cd slidge
  python -m installer --destdir="$pkgdir" dist/*.whl
}
