You are not logged in.

#1 2008-11-14 15:49:18

ezzetabi
Member
Registered: 2006-08-27
Posts: 947

Packages and sub-packages

Does makepkg manages subpackages somewhat?
My problem is about the ppl package, but I think it can be more general.

The `default' package contains the c and c++ interface, while a second packages contains keep the swi-prolog interface.

Most of the code is the same and the two packages compliles twice the same stuff, is there a way to make two (or more) .pkg.tar.gz files in the end?
Something like: you compile everything and split the output in more than one package.

Offline

#2 2008-11-14 16:51:15

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: Packages and sub-packages

Check if they both dump the common source files to the same relative path in the build directory. If they do, try building one package then replacing its PKGBUILD with the other one in the same directory. I think running makepkg again will just replace existing source files when the names are the same. If the files are the same, the compiled binaries should still be there (unless they get moved by the first PKGBUILD, in which case change that to copy the files to the pkg dir without moving them) so it shouldn't recompile everything.

If that doesn't work I would look at what's getting built more closely and try to move the files around between builds to avoid duplicate compilation. You could use the "-o" option on the second invocation of makepkg to just download the source, then see if you can move in some other stuff from the first build, change anything that needs to be changed, then use the "-e" option so makepkg uses the source already in the src dir.

That's what I would do anyway, but I'm really tired right now and still at noob at this, so I reserve the right to give useless advice. tongue

Last edited by Xyne (2008-11-14 16:52:55)


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#3 2008-11-14 21:42:26

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,401
Website

Re: Packages and sub-packages

Short answer, no makepkg does not support this.  Long answer is it probably will with pacman-3.4 (or whenever I get around to reviewing/adjusting all the patches...)

Offline

#4 2008-11-15 15:23:47

ezzetabi
Member
Registered: 2006-08-27
Posts: 947

Re: Packages and sub-packages

In the meanwhile I can force the package creation using directly tar and making the .PKGINFO and the .INSTALL files...
After all most of the work is still of pacman when installing/updating/removing...

Offline

#5 2008-11-15 15:56:01

Daenyth
Forum Fellow
From: Boston, MA
Registered: 2008-02-24
Posts: 1,244

Re: Packages and sub-packages

There are makepkg patches to support this on the bug tracker, but it's not in a release yet.

Offline

Board footer

Powered by FluxBB