| Post Reply | RetroFed Forums Forum Index » Arch Linux |
| Author | Message | ||
|---|---|---|---|
|
thingsiplay lemmy.ml ![]() thingsiplay@lemmy.ml Joined: 2026-01-09 |
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
I am reading and researching, but need some assistance for this question. Currently reading the Archwiki: |
||
| 11 Original | |||
|
exu feditown.com ![]() exu@feditown.com Joined: 2023-09-29 |
Run the |
||
| 1 | |||
|
thingsiplay lemmy.ml ![]() thingsiplay@lemmy.ml Joined: 2026-01-09 |
Run the git describe command in a cloned repo to get the right tag.
By all respect, I'm not asking how to get current version or tag from downloaded source. The |
||
| 1 | |||
|
pabryan lemmy.ml ![]() pabryan@lemmy.ml Joined: 2026-06-03 |
I think the answer can be found at The pkgver() function
I read that as set pkgver to the most recent version at the time you last updated the PKGBUILD. Then the pkgver() function will update it when building the package. I guess you just need something set. It's not clear to me if it actually matters or not. |
||
| 6 | |||
|
thingsiplay lemmy.ml ![]() thingsiplay@lemmy.ml Joined: 2026-01-09 |
I think the answer can be found at The pkgver() function To use pkgver(), you still need to declare the pkgver variable with the most recent value. makepkg will invoke function pkgver(), and update variable pkgver accordingly. I read that as set pkgver to the most recent version at the time you last updated the PKGBUILD. Then the pkgver() function will update it when building the package. I gue...
This seems to be what everyone else is doing. After further discussions and research, it seems like the And this was confusing, I thought I was missing something. Your linked webpage at least talks about this subject, which I couldn't find in the Archwiki. It drove me crazy! So thanks for the link. I will just set the last version number, it doesn't even matter (it seems). |
||
| 1 | |||
|
SavvyBeardedFish reddthat.com SavvyBeardedFish@reddthat.com Joined: 2023-08-11 |
This seems to be what everyone else is doing. After further discussions and research, it seems like the pkgver= variable is completely ignored. And in newer versions one does not need to set it if pkgver() is used (only in older versions it was still needed). But everyone sets it nonetheless. And this was confusing, I thought I was missing something. Your linked webpage at least talks about thi...
Initially just set it to anything, then the first time you run Something else I see a lot of people get wrong: you only need to manually push the latest |
||
| 1 | |||
|
thingsiplay lemmy.ml ![]() thingsiplay@lemmy.ml Joined: 2026-01-09 |
Initially just set it to anything, then the first time you run makepkg it will update to the correct/latest version according to your pkgver() function. Something else I see a lot of people get wrong: you only need to manually push the latest pkgver string when you make changes to the PKGBUILD, otherwise just leave it as-is, since it will auto-update locally when people run makepkg
For now I just put the current version string and uploaded it. Man I forgot how to do all of that stuff, that was stressful with all of the other issues I had.
Not really. If the version of the program does not change, but you make changes to the PKGBUILD, then you have to change pkgrel instead. pkgver change only if the application or library you try to build and install changes its version, pkgrel if the PKGBUILD is changed. https://wiki.archlinux.org/title/PKGBUILD#Version |
||
| 2 | |||
|
exu feditown.com ![]() exu@feditown.com Joined: 2023-09-29 |
By all respect, I'm not asking how to get current version or tag from downloaded source. The git describe is already in the script under pkgver(), which is used to compare the current version with installed version. My question is about the variable pkgver=. What do I type in there? Why does everyone have a version number there, if the current version is read and compared with git describe in pkgver()?
Use the same version there. Pacman just needs a version value and by using the git version you're not actively breaking anything. |
||
| 2 | |||
|
SavvyBeardedFish reddthat.com SavvyBeardedFish@reddthat.com Joined: 2023-08-11 |
For now I just put the current version string and uploaded it. Man I forgot how to do all of that stuff, that was stressful with all of the other issues I had. you only need to manually push the latest pkgver string when you make changes to the PKGBUILD Not really. If the version of the program does not change, but you make changes to the PKGBUILD, then you have to change pkgrel instead. pkgver...
Sure, that's true! |
||
| 2 | |||
|
pabryan lemmy.ml ![]() pabryan@lemmy.ml Joined: 2026-06-03 |
This seems to be what everyone else is doing. After further discussions and research, it seems like the pkgver= variable is completely ignored. And in newer versions one does not need to set it if pkgver() is used (only in older versions it was still needed). But everyone sets it nonetheless. And this was confusing, I thought I was missing something. Your linked webpage at least talks about thi...
Yes, it took a little digging to find it! Not sure why it's necessary if it's unused. Maybe for error checking? Is it tricky for shell scripts to detect whether a function (i.e. pkgver()) has been defined? |
||
| 2 | |||
|
thingsiplay lemmy.ml ![]() thingsiplay@lemmy.ml Joined: 2026-01-09 |
Yes, it took a little digging to find it! Not sure why it's necessary if it's unused. Maybe for error checking? Is it tricky for shell scripts to detect whether a function (i.e. pkgver()) has been defined?
Some discussions say the variable was still needed in old versions of either the application that dealt with it or the web backend, its not clear. Some sort of software that depended on the variable. In later versions they finally made the variable optional, but most people seem to just add it out of good habit. It could also be used as a fallback, in case the function resolves to nothing or so, not sure. Someone else suggested the last version found in the variable could be documentation itself as a rough guideline to see from when this install script was. I find like the documentation is missing this information and should clear it up. For newcomers this would help. |
||
| 1 | |||
| Post Reply |
Back to top |