Package Details: scangearmp2-sane-git 4.60.2+2.r204.20230920.78ec743-1

Git Clone URL: https://aur.archlinux.org/scangearmp2-sane-git.git (read-only, click to copy)
Package Base: scangearmp2-sane-git
Description: Canon ScanGear MP v2 scanner utility and sane backend
Upstream URL: https://github.com/ThierryHFR/scangearmp2
Licenses: GPL, custom:canon
Conflicts: scangearmp2
Provides: scangearmp2
Submitter: pvdl1984
Maintainer: pvdl1984
Last Packager: pvdl1984
Votes: 3
Popularity: 0.008612
First Submitted: 2022-03-26 10:57 (UTC)
Last Updated: 2023-09-21 14:17 (UTC)

Required by (0)

Sources (1)

Latest Comments

« First ‹ Previous 1 2

dreieck commented on 2023-09-20 10:12 (UTC) (edited on 2023-09-20 10:20 (UTC) by dreieck)

As this is a VCS package, you must provide a proper pkgver() function.

e.g.:

pkgver() {
  cd "${srcdir}/${pkgname}"

  _ver="$(git describe  --tags | sed 's|^[vV]||' | sed 's|-g[0-9a-fA-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
}

which currently produces 4.60.0+4.r199.20230814.3e7b771.

Regards and thanks for maintaining!