# Maintainer: exponential _pkgname=python3-krfzf-py pkgname=python3-krfzf-py-git pkgver=0.0.4.r1.e403493 pkgrel=2 pkgdesc="A pythonic fzf wrapper." arch=('all') license=('GPL3') depends=('python3') makedepends=('git' 'python3-build' 'python3-poetry' 'python3-installer' 'python3-wheel') _gitname='fzf.py' source=("git+https://github.com/justfoolingaround/$_gitname") b2sums=(SKIP) provides=('python3-krfzf-py') conflicts=('python3-krfzf-py') pkgver() { cd "${_gitname}" printf "%s.r%s.%s" "$(grep 'version =' pyproject.toml | cut -d '"' -f 2)" "$(git rev-list --count HEAD)" "$(git describe --long --always | sed 's/\([^-]*-g\)/r\1/;s/-/./g')" } build(){ python3 -m build --no-isolation --wheel "$srcdir/${_gitname}" } package() { cd $srcdir/${_gitname/-/_} _py=$(python3 --version) _py=${_py%%.*} python3 -m installer --prefix="/usr" --destdir="$pkgdir" \ "dist/krfzf_py-${pkgver%.r*}-py${_py##* }-none-any.whl" # Manual remove local mv "$pkgdir/usr/local/"* "$pkgdir/usr/" rmdir "$pkgdir/usr/local" install -Dm644 "LICENSE" "$pkgdir/usr/share/doc/$_pkgname/license" install -Dm644 "readme.md" "$pkgdir/usr/share/doc/$_pkgname/readme" }