# Maintainer: katt # Contributor: LLL2yu pkgname=gallery-dl pkgver=1.26.9 pkgrel=3 pkgdesc='Command-line program to download image-galleries and collections from several image hosting sites' arch=(any) url=https://github.com/mikf/gallery-dl license=(GPL-2.0-or-later) depends=(python python-requests) makedepends=(python-build python-installer python-setuptools python-wheel git) checkdepends=(yt-dlp) optdepends=('ffmpeg: Pixiv Ugoira conversion' 'yt-dlp: Video downloads' 'youtube-dl: Video downloads' 'python-pysocks: SOCKS proxy support' 'python-brotli: Brotli compression support' 'python-brotlicffi: Brotli compression support' 'python-yaml: YAML configuration file support' 'python-toml: TOML configuration file support for Python<3.11' 'python-secretstorage: GNOME keyring passwords for --cookies-from-browser') source=(git+"${url}".git#tag=v"${pkgver}"?signed) validpgpkeys=(3E09F5908333DD83DBDCE7375680CA389D365A88) #Mike Fährmann sha512sums=('f2e11d10b56ee9c76605bd759661620e57d22090e9309589bc54d583410316dc661f6be9c7f33b2555417696e43925c82101debcff468d7db39baf12649325d3') prepare() { # Clean out old wheels etc. git -C "${pkgname}" clean -dfx git -C "${pkgname%-git}" cherry-pick -n 5227bb6b1d62ecef5b281592b0d001e7f9c101e3 # [text] catch general Exceptions } build() { cd ${pkgname} make python -m build --wheel --no-isolation } check() { make -C ${pkgname} test } package() { cd ${pkgname} python -m installer --destdir="$pkgdir" dist/*.whl }