# Maintainer: Paul Weingardt # Co-Maintainer: Mark Wagie # Contributor: TDY pkgname=git-cola pkgver=4.4.1 pkgrel=1 pkgdesc="The highly caffeinated Git GUI" arch=('any') url="https://git-cola.github.io" license=('GPL-2.0-or-later') depends=( 'git' 'hicolor-icon-theme' 'python-numpy' 'python-polib' 'python-pyqt5' 'python-qtpy' ) makedepends=( 'python-build' 'python-installer' 'python-jaraco.packaging' 'python-rst.linker' 'python-setuptools-scm' 'python-sphinx' 'python-wheel' 'rsync' ) checkdepends=('appstream-glib' 'desktop-file-utils') optdepends=( 'python-pygments: syntax highlighting' 'python-pyinotify: file system change monitoring' 'python-send2trash: enables "Send to Trash" functionality.' 'tk: to use the built-in ssh-askpass handler' ) source=("$pkgname-$pkgver.tar.gz::https://github.com/git-cola/git-cola/archive/v$pkgver.tar.gz" '0001-Unvendorize-polib.py.patch') sha256sums=('231786deef4a384b904ea4bc0856386448e91161cfed1aadf17494f28a5cbfd0' '00db8356a4bc6f1d9dade64ab04b6f8bada2df22b246e21551ce925de9f95625') prepare() { cd "$pkgname-$pkgver" # Remove vendorized polib.py patch -Np1 -i ../0001-Unvendorize-polib.py.patch rm cola/polib.py } build() { cd "$pkgname-$pkgver" python -m build --wheel --no-isolation make prefix=/usr doc } check() { cd "$pkgname-$pkgver" desktop-file-validate share/applications/*.desktop appstream-util validate-relax --nonet share/metainfo/*.appdata.xml # Not running the unit tests because users don't know how to build in a chroot # Run the unit tests # GIT_CONFIG_NOSYSTEM=true LC_ALL="C.UTF-8" make test V=2 } package() { cd "$pkgname-$pkgver" python -m installer --destdir="$pkgdir" dist/*.whl make prefix=/usr DESTDIR="$pkgdir" install-doc install -Dm644 "contrib/_${pkgname}" -t "$pkgdir/usr/share/zsh/site-functions/" install -Dm644 "contrib/$pkgname-completion.bash" \ "$pkgdir/usr/share/bash-completion/completions/$pkgname" }