You are not logged in.
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
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
subpkg is frugal is a good idea but Fsplit is messy. different pkg/ dirs would be a good idea.
Offline
i'll ack what JGC said. This is a very nice clean way of doing this.
Offline
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
This would certainly clean up modules alot, but what about install files?
Offline
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
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
Thanks,
- Tim
<b>AegeanLinux</b> aka ALi.
Version 0.5-rc1
http://www.aegeanlinux.be
http://svn.aegeanlinux.be:81
Offline
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
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
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 )
- Tim
<b>AegeanLinux</b> aka ALi.
Version 0.5-rc1
http://www.aegeanlinux.be
http://svn.aegeanlinux.be:81
Offline