On 1/8/24 17:52, Doug Newgard wrote:
r(commit count).g(commit)
but that is about the best I was able to work out. If you know some additional cmake magic I missed that allows grabbing the name from one of the generated files in a format better than that above, you will have to help me with it, I couldn't find it. I don't know of a way directly. The format you mentioned here works, as if a tag is added, you can easily switch to git describe without having to add an epoch. If you want to match upstream closer, you can do it by parsing CMakeLists.txt directly, something like awk 'match($0,/set\(PROJECT_VERSION ([0-9.]*)/,a) {print a[1];}' CMakeLists.txt to get you the project version, then add the rest.
That works fine to pick out the "2.0" Project Version. Where were you thinking that would be proper in the filename? As a prefix to the current pkgver? The wiki page is silent on considering both. It's clear the version "should be the same as the version released by the author", but how would you incorporate both the CMakeList info any the git repository info? Something like: wiringx-git-2.0.r251.g54030cd-1-x86_64.pkg.tar.zst I'm good either way, though adding the 2.0 does make the name seem rather long. What do you think? -- David C. Rankin, J.D.,P.E.