Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Fedora Packaging (http://www.linux-archive.org/fedora-packaging/)
-   -   RPM variation (http://www.linux-archive.org/fedora-packaging/269099-rpm-variation.html)

Vadym Chepkov 03-24-2009 01:17 PM

RPM variation
 
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

--
Fedora-packaging mailing list
Fedora-packaging@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-packaging

Lubomir Rintel 03-24-2009 02:14 PM

RPM variation
 
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,
--
Lubomir Rintel <lkundrak@v3.sk>

--
Fedora-packaging mailing list
Fedora-packaging@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-packaging


All times are GMT. The time now is 01:33 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.