[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: First package: A library

On Tue, May 19, 1998 at 02:44:31AM -0400, Mike Goldman wrote:
> So, jumping in with both feet, I went ahead and extracted the source and
> ran deb-make in directory 'gc-4.13alpha1'.
> In the debian subdirectory, the control file designated the Source: as
> 'gc' (and this seems quite correct), and two Package:'s were designated
> 'gc1-dev' and 'gc1'.
> So my initial question is, should these packages be named 'gc1' or 'gc',
> or perhaps 'gc4.13alpha1'?

libgc4 and libgc4-dev you should consider if you want to build a libgc4-dbg
too. Consider that a libgck already exists.
This could permit the contemporary installation of different versions of the

> So what special work do library packages need, before I get in too far
> over my head?

Compile the sources with -fPIC -Wall -pipe -D_REENTRANT 
link the shared lib using
-shared -Wl,-soname,libgc4.so.4 -o libgc4.so.4.13alpha1 
(whateves the version is), but without -rpath (which is considered harmful).
Install the shared lib in the libgc package, stripping it using 
strip --strip-unneeded
After that create a symlink named libgc4.so.4
Install in debian/tmp/DEBIAN a postinst with the instruction

In the libgc4-dev package you'll put the static "ar" library stripped using
strip --strip-debug , and a symlink from the shared lib (in the main package)
to libgc4.so (which is needed while compiling a program using this library).
Put there the include files, the manpages and the examples (if any).
The -dev package must depend on the main package, so you don't need to install
the copyright and the changelog because they are already there. Just create a
symlink from libgc4-dev to libgc4 in debian/tmp/usr/doc .

If you decide to build also a -dbg package, you have the option to decide if
you want to create only a "traditional" static lib or also a shared debugging
library. In all cases you have to reconfigure and recompile enabling all
debugging flags, options and defines. Usually 
should be enough. Don't use  -s  ad you should not strip the lib.
Build the static lib in the usual way, while you can create the shared lib
using   -shared -Wl,-soname,libgc4.so.4 -o libgc4.so.4.13alpha1   as usual,
but without stripping it.
My personal suggestion (not yet policy) is to install both the static and the
shared library in /usr/lib/debug  using exactly the same filename used for the
normal libraries. Don't call ldconfig for the debug library.
To have the most usefull debugging package, I use for the libs I maintain
(liblockdev and libdb2) to install also the sources files (without the include
files) in debian/tmp/usr/src/<package> .
If you want to do that you should also force that pathname inside the object
files, by using a overwriting rule for compilation. I can help you in this, if
you want to :-)

Using the same schema I also build a static and shared lib with profiling
enabled (you have to recompile everything again with  -pg  :-) and I install 
them in debian/tmp/usr/lib/profile (in the same -dbg package).

fab - hoping that my childish english is not too criptic :-)
| fpolacco@icenet.fi    fpolacco@debian.org    fpolacco@pluto.linux.it
| 6F7267F5 fingerprint 57 16 C4 ED C9 86 40 7B 1A 69 A1 66 EC FB D2 5E
> support the open-source initiative! http://www.opensource.org/

To UNSUBSCRIBE, email to debian-mentors-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Reply to: