You are not logged in.
How do you make a package from a PKGBUILD that specifies "any" in the architecture field so that the same pkg tarball can be installed on any system. I.e. how do you get makepkg to create "any.pkg.tar.gz" instead of "local_architecture.pkg.tar.gz"?
I didn't find anything in the makepkg man page or the wiki, but I'm sure that I've seen some doc pkgs that had this in the pkg file name. If I've imagined this, how do you create an i686 pkg from an x86_64 machine and vice versa when the pkg itself is architecture-independent?
EDIT
Rephrased the question to make it clearer.
EDIT 2
The behavior is exactly as one would logically expect...
"arch=('any')" generates an "-any.pkg.tar.gz" pkg
"arch=('i686' 'x86_64')" generates an "-<architecture>.pkg.tar.gz" pkg
I was so sure that the PKGBUILD specified 'any' that I didn't bother to double-check, hence my confused and stupid question.
Last edited by Xyne (2008-10-24 22:57:39)
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
How do you make a package that supports "any" architecture, i.e. get a makepkg to create "pkg.any.tar.gz" instead of "pkg.local_architecture.tar.gz"?
You put
arch=('any')
in the PKGBUILD.
If I've imagined this, how do you create an i686 pkg from an x86_64 machine and vice versa when the pkg itself is architecture-independent?
The 'package' is just a tarred bunch of files. If they are arch independent, then it's just about the filename, and about the file with the name .PKGINFO in the root of the tarball - you can edit that and change the "arch= ..." line. So although it's possible, why would you want to do that?
Offline
I already have 'any' in the PKGBUILD. The reason would be simplify pkg distribution. I know that the files are architecture-agnostic, which is why I figured there would be a less tedious way than opening the tarball and manually editing the .PKGINFO file. It would be simple enough to write a quick script to do it, but I still suspect that there's some cleaner way.
Thanks for the reply all the same.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
I guess I didn't get your question then. I don't know of any cleaner way of cross-creating packages. Maybe someone does. I need to get some sleep instead of bothering you with useless posts...
Offline
That was my fault. I just edited the OP after I reread my question. Sorry about that. Your reply was valid for the way my question was phrased.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
If the architecture is set to 'any', you should be able to -U the package on any system? Does this not work?
Offline
I don't know. I haven't tried it because I only have Arch on one system here. If that's the case though, then all I should need to change is the pkg tarball file name, correct? I'll try to get around to testing this soon by creating a minirepo for powerpill and maybe a few other scripts (which are all architecture-independent). *
Would it be worth filing a feature request for makepkg to create "any.tar.gz" packages? From what I've seen, packages which compile to architecture-dependent binaries tend to have "(i686 x86_64)" rather than "any", so there shouldn't be any problem with such behavior.
Thoughts?
*edit: which would only be cosmetic
Last edited by Xyne (2008-10-24 21:46:51)
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
A package tarball that's built with the architecture specified as 'any' comes out in the form of $pkgname-$pkgver-$pkgrel-any.pkg.tar.gz, so it already works the way you want (if I'm understanding you correctly).
ARCH|awesome3.0 powered by Pentium M 750 | 512MB DDR2-533 | Radeon X300 M
The journey is the reward.
Offline
Hi, my name is Xyne, and apparently I'm an idiot.
*facepalms*
I posted this thread because I noticed that my powerpill PKGBUILD always generated an x86_64 package while I knew it should be 'any'. Of course, having been so sure that it was 'any', I didn't actually bother to double-check that the line said ('any'). It turns out that it was specified as ('i686' 'x86_64'), so the behavior is exactly what one would logically expect.
In my defence though, that PKGBUILD was orignally created by someone else for powerpill and I've only changed a few things for each update... but yeah, I'm completely absent-minded sometimes.
Sorry for wasting the time of anyone who read this thread.
Last edited by Xyne (2008-10-24 22:58:03)
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
... but yeah, I'm completely absent-minded sometimes.
aren't we all
ARCH|awesome3.0 powered by Pentium M 750 | 512MB DDR2-533 | Radeon X300 M
The journey is the reward.
Offline
aren't we all
Sure, but luckily most of us avoid committing evidence of it to threads that will last for years.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline