advice needed: building two gnumeric binaries from same source

Jani Monoses jani.monoses at
Thu Apr 27 16:11:38 BST 2006


as part of the effort of building a few selected apps without gnome 
dependencies for the xubuntu desktop install we came across a not too 
clean solution for doing this for gnumeric and would like to see if 
someone has better ideas.

The situation is the following:
gnumeric depends on libgoffice and both of these upstreams have 
--disable-gnome configure switches.

libgoffice was recently uploaded and when it builds it results in 
libgoffice-1-dev, libgoffice-gtk-1-2, libgoffice-1-2 and two dbg libs too.

libgoffice and libgoffice-gtk are API/ABI compatible obviously and are 
drop in replacements for each other. This is guaranteed by gnumeric 
upstream, and makes sense. Since they provide the same .so files the 
packages Conflict/Replace each other.

We want to build gnumeric and gnumeric-gtk from the same source package 
too. One to depend on libgoffice the other on libgoffice-gtk.
Now because these two conflict they cannot be installed as part of the 
same build chroot. So this is the workaround used which makes the 
packaging a bit controversial:

Build depend on libgoffice-dev and this will bring in the libgoffice 
runtime lib as a dependency.

But after the two packages are built and the shlibs calculated, replace
libgoffice-1-2 with libgoffice-gtk-1-2 in the shlibs list of 
gnumeric-gtk so at runtime it correctly depends on the gtk lib.

The package works ok with this trick. Besides it being ugly are there 
any pitfalls we did not think about? Do you have a nicer idea?

The initial thinking was to make a libgoffice-gtk-dev and rename the 
-gtk only shared object files themselves so they do not need to 
conflict. But that is violating what upstream calls these and even 
messier IMHO. And the two -dev packages would have been a ugly if 
possible at all.


More information about the ubuntu-devel mailing list