On Fri, Feb 18, 2011 at 1:10 AM, David C. Rankin <drankinatty@suddenlinkmail.com> wrote:
Guys,
I'm working on a second set of pkgbuild for Trinity that do the svn download for you and work like normal pkgbuilds for other svn projects.
One issue I'm having is getting the "finished package name" to include the svn revision as $pkgver instead of the initial (eg. pkgver=9999).
The bottom line is if I update pkgver in build() it isn't used when the final package is written. If I only update it between build() and package() then the final package gets the correct svn rev as $pkgver, but all messages during build are wrong.
So I end up updating the pkgver in build() and then between build() and package(). That doesn't seem right.
The problem seems like a scope issue for pkgver. If set in build() pkgver isn't seen globally in the PKGBUILD script, even though it is declared with global scope and updated in build().
Can somebody familiar with PKGBUILDs give the following a quick look to make sure it is reasonable and I'm not biting my myself by the double call to update pkgver?
http://www.3111skyline.com/dl/dt/trinity/arch/pkgbuild/svn/PKGBUILD-tqtinter...
Thanks!
-- David C. Rankin, J.D.,P.E.
makepkg includes some magic to adjust the $pkgver - however the variables have to be named _svntrunk and _svnmod. See man PKGBUILD, section DEVELOPMENT DIRECTIVES.