Hi,
A typical rpm spec file has just one %build section and subpackages contain sub-set of the build tree. I want to create 3 different rpms with different names which follow "subpackage" schema, but, they will contain the full set of build files. I will explain why I need this.
IBM MQ Series provides very strange API. The function MQCONN, for example, will behave differently if you link your application either with -lmqm or with -lmqic (you have to choose one). The fist one is so called "server" version, second is "client" version and it depends on what MQ Series you use (client or server edition). In order to accommodate to this requirement, make files for my application have this logic:
ifndef WITHOUTMQ MQDEFS = -DMQSERIES ifdef WITHMQCLIENT MQLIBS = -lmqic else MQLIBS = -lmqm endif endif
So I can create complete set of binaries for each case: no MQ at all, server or client installation. I want to pack results in 3 different rpms: app.rpm, app-MQServer.rpm and app-MQClient.rpm. rpm -ql for each package will list the same file names. How can I accomplish this in one spec file? Thank you.
Sincerely yours, Vadym Chepkov
On Tue, 2009-03-24 at 07:17 -0700, Vadym Chepkov wrote:
IBM MQ Series provides very strange API. The function MQCONN, for example, will behave differently if you link your application either with -lmqm or with -lmqic (you have to choose one).
[...]
Strange translates to "utterly stupid" here. This should not have been a compile-time option, but a run-time option in the first place. This is the very same kind of decision the GRUB 2 people made about PC BIOS vs. EFI.
So I can create complete set of binaries for each case: no MQ at all, server or client installation. I want to pack results in 3 different rpms: app.rpm, app-MQServer.rpm and app-MQClient.rpm. rpm -ql for each package will list the same file names. How can I accomplish this in one spec file?
We, unlike Debian, avoid file conflict as much as we can (it would make sense to have both packages installed, wouldn't it?). So your only option is to name the files differently, I'd say. For the executable, you can use alternatives system (see update-alternatives(8)).
Regards,
packaging@lists.fedoraproject.org