[arch-general] PKGBUILD question
Magnus Therning
magnus at therning.org
Sat Jan 7 01:57:09 EST 2012
On Fri, Jan 06, 2012 at 07:41:32PM -0800, Don Juan wrote:
> I am trying to update a AUR pkgbuild I found and the source file
> when I download it has a - in the file name
>
> name_2.0.1-beta1
>
> I figure out using ${pkgver//_/-} converts it properly when listing
> it as name_2.0.1_beta1.
>
> The problem I have run into and can not seem to find info about or
> something I have ever run into is that it seems bsdtar when
> extracting is making the name as name_2.0.1-BETA1 and not making it
> name_2.0.1-beta1 and makepkg fails saying it can not find the proper
> file of name_2.0.1-beta1.
>
> I have it as so in my PKGBUILD
> package() {
> cd ${srcdir}/${pkgname}_${pkgver//_/-}
>
> also as
> cd ${srcdir}/${pkgname}_${pkgver}
>
> the tarball being downloaded converts properly and dl's fine, it
> just seems to be in the next step for package, unless I just really
> am not grasping this yet. If so feel free to say I need to read
> more. But I think its something easy I am just looking over.
You do realise there is no *requirement* to use $pkgname and $pkgver,
right? You can just hard code the correct names into the PKGBUILD
and be done with it. The only drawback is that you need to modify a
few more places when updating the package in the future. That is a
*very* minor drawback in the vast majority of cases.
Also, in the future consider uploading the PKGBUILD you are working on
to a pastebin. It will likely make it much easier to ask you
question. :-)
/M
--
Magnus Therning OpenPGP: 0xAB4DFBA4
email: magnus at therning.org jabber: magnus at therning.org
twitter: magthe http://therning.org/magnus
Perl is another example of filling a tiny, short-term need, and then
being a real problem in the longer term.
-- Alan Kay
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://mailman.archlinux.org/pipermail/arch-general/attachments/20120107/d0d54e06/attachment.asc>
More information about the arch-general
mailing list