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 HTH -- Ben Reser <[EMAIL PROTECTED]> http://ben.reser.org If your love has no hope of being welcomed do not voice it; for if it be silent it can endure, a guarded flame, within you. - The Wisdom of the Sands
