[arch-general] sanity check - pkgbuild writing svn rev as $pkgver for new packages - help?
jan.steffens at gmail.com
Thu Feb 17 19:31:41 EST 2011
On Fri, Feb 18, 2011 at 1:10 AM, David C. Rankin
<drankinatty at suddenlinkmail.com> wrote:
> 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
> 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.
More information about the arch-general