summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorIanis Vasilev2024-02-24 18:31:11 +0200
committerIanis Vasilev2024-02-24 18:31:11 +0200
commit3380371615b2b9ad03f7bfae67b6526da100b09f (patch)
tree0768f0b2b2f72ae6bd79ad54d279eb05a6945beb
parentb98fd1dc8a7be356e0af2ab3483cf8bc21367203 (diff)
downloadaur-3380371615b2b9ad03f7bfae67b6526da100b09f.tar.gz
namcap and tests
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD23
2 files changed, 15 insertions, 14 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 64e0d7ef927a..276046ee9343 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -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
diff --git a/PKGBUILD b/PKGBUILD
index 01c6073a7386..086d8a8549bc 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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"
}