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 withgit clonethe version number will not change and the PKGBUILD script will comparepkgver()instead. So what is the purpose ofpkgver=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:


Put in ‘69420’, run makepkg -o. It will replace the value with the result of pkgver(). Generate SRCINFO etc., then push to AUR. When changing the PKGBUILD itself, either upstream will have changed, resulting in a higher pkgver and therefore triggering updates for AUR clients, or you need to increase the pkgrel.
So in short, it doesn’t matter what I have as
pkgver=variable then? I was just curious to why there is an outdated version number by other package builds. I will then probably use the latest version number as of uploading the script and leave it out of sync in the PKGBUILD script if there is no need to change the script itself.Is that how the -git versions operate?