diff options
author | Ianis Vasilev | 2024-02-24 18:31:11 +0200 |
---|---|---|
committer | Ianis Vasilev | 2024-02-24 18:31:11 +0200 |
commit | 3380371615b2b9ad03f7bfae67b6526da100b09f (patch) | |
tree | 0768f0b2b2f72ae6bd79ad54d279eb05a6945beb | |
parent | b98fd1dc8a7be356e0af2ab3483cf8bc21367203 (diff) | |
download | aur-3380371615b2b9ad03f7bfae67b6526da100b09f.tar.gz |
namcap and tests
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 23 |
2 files changed, 15 insertions, 14 deletions
@@ -1,10 +1,14 @@ pkgbase = dpsprep-git pkgdesc = A DjVu to PDF converter with a focus on small output size and the ability to preserve document outlines and text layers pkgver = r89.3d4c8c3 - pkgrel = 1 + pkgrel = 3 url = https://github.com/kcroker/dpsprep arch = any license = GPL3 + checkdepends = python + checkdepends = ruff + checkdepends = mypy + checkdepends = python-pytest makedepends = git makedepends = python-build makedepends = python-installer @@ -1,12 +1,12 @@ # Maintainer: Ianis Vasilev <ianis@ivasilev.net> pkgname=dpsprep-git -_gitname=dpsprep pkgver=r89.3d4c8c3 -pkgrel=1 +pkgrel=3 pkgdesc='A DjVu to PDF converter with a focus on small output size and the ability to preserve document outlines and text layers' url='https://github.com/kcroker/dpsprep' arch=('any') license=('GPL3') +checkdepends=(python ruff mypy python-pytest) makedepends=(git python-build python-installer python-wheel) depends=(python python-click python-djvulibre python-fpdf2 python-loguru python-pillow python-pdfrw) @@ -14,23 +14,20 @@ optdepends=('ocrmypdf: Optional OCR and advanced PDF optimization') source=('git+https://github.com/kcroker/dpsprep.git') md5sums=('SKIP') -pkgver() { - cd "${srcdir}/${_gitname}/" - printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" -} - -prepare() { - git -C "${srcdir}/${_gitname}" clean -fdx +check() { + cd "${srcdir}/dpsprep" + make lint + make test } build() { - cd "${srcdir}/${_gitname}/" + cd "${srcdir}/dpsprep" python -m build --wheel --no-isolation } package() { - cd "${srcdir}/${_gitname}/" - /usr/bin/python -m installer --destdir="$pkgdir" dist/*.whl + cd "${srcdir}/dpsprep" + python -m installer --destdir="$pkgdir" dist/*.whl install -D -m755 bin/dpsprep "$pkgdir/usr/bin/dpsprep" - install -D -m755 dpsprep.1 "$pkgdir/usr/share/man/man1/dpsprep.1" + install -D -m644 dpsprep.1 "$pkgdir/usr/share/man/man1/dpsprep.1" } |