[pacman-dev] My first splitted package
pierre at archlinux.de
Sun Jan 18 08:40:00 EST 2009
Am Samstag 17 Januar 2009 13:56:30 schrieb Pierre Schmitz:
> The next one I'll try is php. It should be more complex but there won't be
> strange dependencies between sub packages.
OK, I have created a splitted php package now. Maybe I don't get it, but I
think php has some of the worst build systems ever. :-)
To sum things up, I have to say I really like the current implementation. It's
really clean and even if you do not split the package a separate package
function has a lot of advantages.
I have also use makepkg -R a lot; added and removed sub packages and all went
So, what I have learnt from packageing PHP?
I have to use configure;make;make install several times. That's why I asked
for build_pkg1.. functions. But thinking about it several build functions
might be really problematic; especially if you want to repackage and call
order of those functions is important. The solution is to use "out of source
tree builds". This way you could do different things for each sub package.
Future versions of namcap should do some more tests like:
* Are all deps of sub packages are defined as makedeps?
* Do we have package functions for all pkgnames and vise versa?
$pkgname seems to allways point to the first entry of the pkgname array. See
the following test case:
echo -n should be empty:
echo -n should be test1:
echo -n should be test2:
This allway echos test1 which is not really expected.
So back to PHP. The main problem was that PHP itself is quite modular,but the
build system is not. So I had to do several hack to get everything build
within one PKGBUILD. Anyway: Once this is done we get a clean solution and
don't have to abuse optdepends.
The result are the following packages:
In my first attepmt I had nearly everything as a sub package which was a bit
extreme. So I finally decided to split only to avoid unneeded dependencies.
E.g. there is no need to install postgres if you don't use it.
This also makes it possible to add some less used features/modules without
worring about increasing dependencies for others.
I have attached the (quite long) PKGBUILD.
Telefon 0228 9716608
Mobil 0160 95269831
Jabber pierre at jabber.archlinux.de
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 19564 bytes
Desc: not available
More information about the pacman-dev