On Thu, Nov 01, 2007 at 08:57:19AM -0700, varun_shrivastava wrote: > i have a library and want to package it > But it has a configuration option as --enable-debug=yes/no > > So i need to make 2 packages as > > 1) libinput0 > 2) libinput0-debug > > So now if an application uses libinput, how the $(shlibs:Depends) variable > get substituted, during application package being built. Because dpkg will > automatically determine and substitute the variable according to which one > of the above two lib packages are installed, at the time of application > package being built.
It won't be a problem, because the -dbg package (the standard suffix isn't -debug) doesn't have full copies of the library, just the debugging symbols. The only place where you could run into trouble would be if --enable-debug for this package doesn't just enable -g -O0 and disable stripping, but instead actually modifies the source to be compiled (such as adding fprintf(stderr, "DEBUG: Got here\n") throughout the source, or something else similarly irritating). If that's the case, then you've got a real problem, as I can't think of a really good solution to that. I suspect the best solution there is going to be to have the regular library and the -dbg library *conflict* with each other, and have the -dev package depend on only the non-dbg version, so anyone who's building against the library is guaranteed to only have the non-dbg version installed. That is, however, unbelievably ugly, and largely defeats the purpose of having a -dbg version of the library, because the people who are going to want the debugging-enabled library are the people who are linking against the library... I would suggest working out exactly what --enable-debug does to the library build process, and changing anything that isn't symbol related to be run-time rather than build-time configured (so enabling any fprintf(stderr, "DEBUG: ") with an environment variable rather than #ifdef), and then the problem reverts to the standard "strip symbols, stick symbols in -dbg package" method. - Matt -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]