Package Details: dpsprep-git 2.2.15.1.gf4fab7f-1

Git Clone URL: https://aur.archlinux.org/dpsprep-git.git (read-only, click to copy)
Package Base: dpsprep-git
Description: A DjVu to PDF converter with a focus on small output size and the ability to preserve document outlines and text layers
Upstream URL: https://github.com/kcroker/dpsprep
Licenses: GPL-3.0-only
Conflicts: dpsprep
Provides: dpsprep
Submitter: dark-saber
Maintainer: ianis
Last Packager: ianis
Votes: 3
Popularity: 0.000416
First Submitted: 2015-07-10 10:29 (UTC)
Last Updated: 2025-07-09 15:09 (UTC)

Required by (0)

Sources (1)

Latest Comments

1 2 3 Next › Last »

ianis commented on 2025-07-09 15:09 (UTC)

I recently started using dynamic pkgver after adding a separate dpsprep package. This is the first time there is a commit without a version tag.

As per the VCS packaging guidelines on the wiki, I added a call to tr to replace dashes with dots.

dreieck commented on 2025-07-09 14:51 (UTC)

pkgver() generates an invalid version:

==> Starting pkgver()...
==> ERROR: pkgver is not allowed to contain colons, forward slashes, hyphens or whitespace.
==> ERROR: pkgver() generated an invalid version: 2.2.15-1-gf4fab7f

Here is a suggestion for an updated pkgver():

pkgver() {
    cd "$(_fullsrcdir)"

    _ver="$(git describe --tags | sed -E -e 's|^[vV]||' -e 's|\-g[0-9a-f]*$||' | tr '-' '+')"
    _rev="$(git rev-list --count HEAD)"
    _date="$(git log -1 --date=format:"%Y%m%d" --format="%ad")"
    _hash="$(git rev-parse --short HEAD)"

    if [ -z "${_ver}" ]; then
        error "Version could not be determined."
        return 1
    else
        printf '%s' "${_ver}.r${_rev}.${_date}.${_hash}"
    fi
}

Also, package() needs to be adapted.

diff to the PKGBUILD:

--- PKGBUILD.orig   2025-07-09 16:47:37.273644470 +0200
+++ PKGBUILD    2025-07-09 16:50:53.056985985 +0200
@@ -3,3 +3,3 @@
 _pkgbasename="${pkgname%-git}"
-pkgver=2.2.15
+pkgver=2.2.15+1.r126.20250702.f4fab7f
 pkgrel=1
@@ -26,3 +26,14 @@
     cd "$(_fullsrcdir)"
-    git describe --tags | cut --characters 2-
+
+    _ver="$(git describe --tags | sed -E -e 's|^[vV]||' -e 's|\-g[0-9a-f]*$||' | tr '-' '+')"
+    _rev="$(git rev-list --count HEAD)"
+    _date="$(git log -1 --date=format:"%Y%m%d" --format="%ad")"
+    _hash="$(git rev-parse --short HEAD)"
+
+    if [ -z "${_ver}" ]; then
+        error "Version could not be determined."
+        return 1
+    else
+        printf '%s' "${_ver}.r${_rev}.${_date}.${_hash}"
+    fi
 }
@@ -43,3 +54,3 @@
     cd "$(_fullsrcdir)"
-    python -m installer --destdir="$pkgdir" dist/*$pkgver*.whl
+    python -m installer --destdir="$pkgdir" dist/*.whl
     install -D -m755 bin/dpsprep "$pkgdir/usr/bin/dpsprep"

Regards and thanks for maintaining!

dreieck commented on 2025-03-30 22:09 (UTC)

You can rename it and add a replaces=("dpsprep-git<=2.2.13"), conflicts=("dpsprep-git") directive. The replaces statement should(?) make AUR helpers smoothly update it.

I think the current naming and content is just not aligning with the packaging "rules" so should be fixed in any case.

(Renaming is done as follows: Upload newly named package and file a merge request on the old package to be merged into the new one.)

ianis commented on 2025-03-30 21:26 (UTC)

I am not the one who created the package, nor the project, but I am the one who maintains both now. I would gladly name it dpsprep if I was creating the package now, but it has a long history before I took over and people are used to it.

I can remove the dependency on the tag, although I don't see much of a point in doing so. I update the AUR package whenever I update the tag.

It seems reasonable to add provides and conflicts next time I bump the package version. Nothing of value would be lost until then.

dreieck commented on 2025-03-30 20:25 (UTC) (edited on 2025-03-30 22:06 (UTC) by dreieck)

Ahoj,

you call it a -git package but you download a fixed version/ tag.

So please either:

  • Rename it to dpsprep,
  • or download the latest state from the git repository.
    And also add a proper pkgver() function, provides=("dpsprep"), conflicts=("dpsprep") if you keep it a -git package.

Regards and thanks form the package!

menteith commented on 2025-01-26 21:21 (UTC)

@Ianis Step 2. did the trick. Thanks for your help!

ianis commented on 2025-01-26 17:15 (UTC)

@menteith I'm afraid I can't help you here - all dependencies are listed both in the AUR package and in the pyproject.toml file in the source code.

  1. Make sure you don't use virtual environments when building the package since then you would get a broken package.
  2. Try (re)installing python-fpdf2 from the AUR.
  3. If that fails, you can go to the GitHub page and try installing manually.

menteith commented on 2025-01-26 16:46 (UTC)

@ianis Thanks for a such a quick response and of course for maintaning this package! Now the error mentioned earlier is gone, but there is another one:

ERROR dpsprep - ModuleNotFoundError: No module named 'fpdf'

ianis commented on 2025-01-26 16:25 (UTC)

@menteith Long story short, I had to update some dependencies and configurations for the program itself. Please try now.