this post was submitted on 26 Sep 2026
10 points (100.0% liked)

Programming

28800 readers
210 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 3 years ago
MODERATORS
 

cross-posted from: https://lemmy.ml/post/53225512

I want to create and upload an AUR package. For context, I did that years ago for specific releases, but now I want to create a new package that focuses on upstream Git without specific releases.

What do I write to the pkgver= value? Do I just take the latest version there? Because it is downloading with git clone the version number will not change and the PKGBUILD script will compare pkgver() instead. So what is the purpose of pkgver= for when downloading and building from Git directly? Looking at examples from other existing packages, they all have a number there. But its mostly outdated, so I don't get it.

pkgname=thename-git
_pkgname="$(pkgname%-git}"
pkgver=???

pkgver() {
    cd "${_pkgname}"
    git describe --long | sed 's/\([^-]*-g\)/r\1/'
}

I am reading and researching, but need some assistance for this question. Currently reading the Archwiki:

you are viewing a single comment's thread
view the rest of the comments
[โ€“] bitfucker@programming.dev 1 points 2 weeks ago (1 children)

My two cent is put the PKGBUILD version itself. That is, if the build script is version 1, then just put that. If the PKGBUILD are updated in the future, bump it up as usual

[โ€“] thingsiplay@lemmy.ml 5 points 2 weeks ago

No, that would be wrong. The PKGBUILD version itself is tracked by pkgrel=, which is bumped up whenever the build script is needed to change and the actual downloaded program is not. pkgver= is strictly the version for the program to install.