You are not logged in.

#1 2008-05-19 17:53:22

Kane
Member
Registered: 2006-10-08
Posts: 220

How to build a package with a hyphen

Hi guys,
Im trying to make my own wine 1.0-rc1
Ive tried just changing the pkgver but i get

 ERROR: pkgver is not allowed to contain hyphens.

so what is the preferred method of doing it?

Thanks

Offline

#2 2008-05-19 18:23:57

pressh
Developer/TU
From: Netherlands
Registered: 2005-08-14
Posts: 1,719

Re: How to build a package with a hyphen

Kane wrote:
 ERROR: pkgver is not allowed to contain hyphens.

so what is the preferred method of doing it?

use

pkgver=1.0rc1

Offline

#3 2008-05-19 21:33:59

Kane
Member
Registered: 2006-10-08
Posts: 220

Re: How to build a package with a hyphen

sorry i meant that the source file is called wine-1.0-rc1.tar.bz2

Offline

#4 2008-05-19 22:10:00

pressh
Developer/TU
From: Netherlands
Registered: 2005-08-14
Posts: 1,719

Re: How to build a package with a hyphen

Kane wrote:

sorry i meant that the source file is called wine-1.0-rc1.tar.bz2

I'm not really sure what the question is if it was not my previous assumption.

Basically, if the source is called wine-1.0-rc1.tar.bz2, you use the pkgver in the way I said above. In case that in some other place in the PKGBUILD 1.0-rc1 should appear (for exampe cd $startdir/wine-1.0-rc1 (don't know if that is the case btw)) you just write it like that and don't define extra variables (so most likely you will need to substitute 1.0-rc1 for all $pkgver appearances except the first one).

Last edited by pressh (2008-05-19 22:11:09)

Offline

#5 2008-05-19 23:59:25

mrbug
Member
Registered: 2007-07-17
Posts: 221

Re: How to build a package with a hyphen

I'm sure that it's "incorrect," but I add another variable called _subpkg and add $_subpkg after all of the $pkgname variables...

$pkgname-$pkgver becomes $pkgname-$_subpkg-$pkgver


dvdtube - download all uploads from a YouTube user and then optionally create a DVD.
(Regular version AUR link / SVN version AUR link)

Offline

#6 2008-05-20 06:40:19

Kane
Member
Registered: 2006-10-08
Posts: 220

Re: How to build a package with a hyphen

Thanks, that worked smile

I thought about doing it that way, but then thought what is the point in the $pkgver if you have to manually change every occurance.

Offline

#7 2008-05-20 11:42:29

kumico
Member
Registered: 2007-09-28
Posts: 224
Website

Re: How to build a package with a hyphen

i think the convention is to create a new variable called _pkgver with the real required pkgver, and set pkgver to one without the hyphen

Offline

#8 2008-05-20 14:06:17

pressh
Developer/TU
From: Netherlands
Registered: 2005-08-14
Posts: 1,719

Re: How to build a package with a hyphen

kumico wrote:

i think the convention is to create a new variable called _pkgver with the real required pkgver, and set pkgver to one without the hyphen

no it is not. Please be sure you've read the Arch packaging standards before commenting on such things.

http://wiki.archlinux.org/index.php/Arch_Packaging_Standards wrote:

Do not introduce new variables into your PKGBUILD build scripts, unless the package cannot be built without doing so, as these could possibly conflict with variables used in makepkg itself. If a new variable is absolutely required, prefix the variable name with an underscore (_)

Offline

Board footer

Powered by FluxBB