You are not logged in.

#1 2006-09-05 07:27:53

aegean_linux
Member
Registered: 2006-01-10
Posts: 16
Website

[idea] making makepkg able to make multiple packages.

Hi All!

I am thinking of creating a modification for makepkg, so that it can build multiple packages from one PKGBUILD. What I mean by this, is that (for example) you write a PKGBUILD for kdemultimedia, and it will build it, but it will spit out a split package.

An idea of this PKGBUILD is one that I have based around moodin:

pkgname=moodin
pkgver=0.4.2
pkgrel=1
pkgdesc="Moodin in a ksplash engine which provides funky login screens."
url="http://moodwrod.com/"
depends=('kdebase')
source=(http://moodwrod.com/files/${pkgname}_${pkgver}.tar.gz)
creates=('moodin_libs' 'moodin_themes')

build() {
  cd $startdir/src/$pkgname-$pkgver

  #patch -Np1 -i ../???.patch || return 1
  ./configure --prefix=/opt/kde
  make || return 1
}

create_moodin_libs {
  cd $startdir/src/$pkgname-$pkgver

  make DESTDIR=$startdir/pkg install
  rm $startdir/pkg/opt/kde/share/themes
}

create_moodin_themes {
  cd $startdir/src/$pkgname-$pkgver

  cp themes $startdir/pkg/opt/kde/share/themes -r
}

when I makepkg this build script, it will then split out three packages:
moodin-0.4.2-1.pkg.tar.bz2
moodin_libs-0.4.2-1.pkg.tar.bz2
moodin_themes-0.4.2-1.pkg.tar.bz2

The 'moodin' package, would depend on moodin_libs and moodin_themes.

makepkg will also do a check on all the packages to make sure that none of the split packages had any conflicting files.

Please tell me what you think, and if you think it  may be worthwhile.

Thanks,
Tim


<b>AegeanLinux</b> aka ALi.
Version 0.5-rc1
http://www.aegeanlinux.be
http://svn.aegeanlinux.be:81

Offline

#2 2006-09-05 10:54:46

JGC
Developer
Registered: 2003-12-03
Posts: 1,664

Re: [idea] making makepkg able to make multiple packages.

Hmm, not a very bad idea, though I would suggest to make a pkg dir for subpackages too. This solution is much cleaner than the solution I've seen in frugalware the last time I looked at it.

Offline

#3 2006-09-05 10:55:49

Cam
Member
From: Brisbane, Aus
Registered: 2004-12-21
Posts: 658
Website

Re: [idea] making makepkg able to make multiple packages.

subpkg is frugal is a good idea but Fsplit is messy. different pkg/ dirs would be a good idea.

Offline

#4 2006-09-05 11:05:53

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: [idea] making makepkg able to make multiple packages.

i'll ack what JGC said. This is a very nice clean way of doing this.

Offline

#5 2006-09-05 12:12:54

aegean_linux
Member
Registered: 2006-01-10
Posts: 16
Website

Re: [idea] making makepkg able to make multiple packages.

Good Good. There seems like enough intrest for me to continue first thing after I come home from school.

Thanks JGC for your idea about sticking it in one pkg subdir, however, I like my setup the way it is how it sticks all my packages in one directory.

So what do you think about the way that the PKGBUILD script is laid out? Is there anything extra you think should be added at all?

Can't wait to get onto this!

I shall put all my code on my subversion server ( http://www.aegeanlinux.be:81/ ) in the Pacman Utilities Repository.

Please, if you have any further ideas to contribute, that would be great!

BTW, I aim for this to replace makepkg, with full compatibility for the "old" PKGBUILD's

Thanks,

Tim.

P.S. just svn co http://www.aegeanlinux.be:81/pacman/


<b>AegeanLinux</b> aka ALi.
Version 0.5-rc1
http://www.aegeanlinux.be
http://svn.aegeanlinux.be:81

Offline

#6 2006-09-05 15:14:54

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: [idea] making makepkg able to make multiple packages.

This would certainly clean up modules alot, but what about install files?

Offline

#7 2006-09-05 17:14:54

JGC
Developer
Registered: 2003-12-03
Posts: 1,664

Re: [idea] making makepkg able to make multiple packages.

We can have two approaches here:
- several build functions for several subpackages, meaning pkg/ gets cleaned between calling them
- one build() function that distributes installed files across several pkg/ dirs.

I would like to see the 2nd option. This way I could run a standard ./configure; make; make install in build() and after that moving all the subpackage files out of pkg/ into pkg-subpackage/ (or, if the upstream tarball has good support for it, make install from various directories).

This feature would save me from running sed over multimedia-plugins/*/PKGBUILD and entering 40x extrapkg every time GStreamer is updated for example.

Offline

#8 2006-09-05 21:14:26

aegean_linux
Member
Registered: 2006-01-10
Posts: 16
Website

Re: [idea] making makepkg able to make multiple packages.

JGC wrote:

We can have two approaches here:
- several build functions for several subpackages, meaning pkg/ gets cleaned between calling them
- one build() function that distributes installed files across several pkg/ dirs.

JGC, I would rather the second option too, and I think that is more towards I am going to my patch, (read first post above).

build() { 
  CD $startdir/src/$pkgname-$pkgver 
 
  #patch -Np1 -i ../???.patch || return 1 
  ./configure --prefix=/opt/kde 
  make || return 1 
} 
 
create_moodin_libs { 
  cd $startdir/src/$pkgname-$pkgver 
 
  make DESTDIR=$startdir/pkg install 
  rm $startdir/pkg/opt/kde/share/themes 
} 
 
create_moodin_themes { 
  cd $startdir/src/$pkgname-$pkgver 
 
  cp themes $startdir/pkg/opt/kde/share/themes -r 
} 

In this example here, you can see that there is one build function. It is then up to the separate make_'s to do what it has to do to get the package split.

Hmmm, Well, I am going to start work on it in a few (7 -> 8) hours, so there is still some time to get implimentation ideas tongue

Thanks,

   - Tim


<b>AegeanLinux</b> aka ALi.
Version 0.5-rc1
http://www.aegeanlinux.be
http://svn.aegeanlinux.be:81

Offline

#9 2006-09-06 08:54:15

Romashka
Forum Fellow
Registered: 2005-12-07
Posts: 1,054

Re: [idea] making makepkg able to make multiple packages.

Isn't package splitting and subpackages support already in Pacman 3? AFAIK Frugalware's pacman already supports this.
Phrakture, as you are going to continue Pacman 3 development, could you look at CVS to see if this is already here and what needs to be improved, or merge patches from Frugalware's darcs?


to live is to die

Offline

#10 2006-09-07 16:14:27

Cam
Member
From: Brisbane, Aus
Registered: 2004-12-21
Posts: 658
Website

Re: [idea] making makepkg able to make multiple packages.

pacman-dev ML has been receiving a lot of backported packages lately but nobody from the arch side has said much. phrakture is busy with work last i heard and nobody else is too active with pacman development

Offline

#11 2006-09-08 06:45:20

aegean_linux
Member
Registered: 2006-01-10
Posts: 16
Website

Re: [idea] making makepkg able to make multiple packages.

UPDATE: I have hit somewhat of a snag with my makepkg modification that allows split packages.

It goes somewhat OK, but I do not know how to get each package to have a separate DEPEND variable. I will clean the code up and send a patch. Shouldn't take to long.

(p.s do you like our new site smile )

- Tim


<b>AegeanLinux</b> aka ALi.
Version 0.5-rc1
http://www.aegeanlinux.be
http://svn.aegeanlinux.be:81

Offline

Board footer

Powered by FluxBB