On fredagen den 9 augusti 2002 20.01 Ben Reser wrote: > On Fri, Aug 09, 2002 at 01:29:02PM -0400, Oden Eriksson wrote: > > Ok. I have another similar spec file problem... If you (or someone else) > > have the time, please take a look at the latest webalizer spec file. The > > webalizer is now providing localized binaries (a whole bunch of them), > > but in order to make it possible using just *one* spec file I had to > > rename the built binary as "/usr/bin/webalizer-the_lang" and do bad woodo > > magic in "%post the_lang". > > > > I don't have a clue how to package the "/usr/bin/webalizer-the_lang" > > binary as just "/usr/bin/webalizer" for each generated binary rpm. > > > > Do you see the problem? Do you understand what I'm trying to do? > > > > I guess It *would* be possible to generate (sub) spec files on-the-fly, > > and have rpm spawn out and just package these... This is very complicated > > as you also have to fool rpm itself because you will not have any > > src.rpm:s for the out-spawned on-the-fly generated stuff... I'm > > scratching my head here... > > What you want is the %() construct which runs shell code and the output > of it is processed as though it was in your spec file. Unfortunately it > all has to go on one line. You could however put the script to do the > generation a separate file and list it as a source and call it via > %($SOURCE2) but that would require you to also pass it whatever params > needed passing... Anyway I've redone it with an inlined script to do > the generation. It's kinda ugly but a lot easier to maintain that gobs > of separate sections. > > I've put it up here: > http://ben.reser.org/mandrake/x86/webalizer-2.01.10-5mdk.src.rpm
Very nice! This was very simple and strips down the spef file a great deal, I'm impressed!. But..., I think there's a limit of 255 characters that you can have on one line. Aslo it doesn't provide the /usr/bin/webalizer binary for each package, only the softlinks. As I come to think of it we also have another package "snort" in main that would also benefit from this if we come up with a solution. Maybe like this if it was possible: %install -n webalizer-swedish bla bla bla %install -n webalizer-german bla bla bla If this was possible I think we would have found the solution. -- Regards // Oden Eriksson Deserve-IT Networks -> http://d-srv.com
