Hints on packaging a library

Felipe Sateler fsateler at debian.org
Thu Aug 26 23:24:32 UTC 2010


On 26/08/10 11:31, Alexandre Quessy wrote:
> Hello everyone,
> I was wondering if someone had hints on how to package a library. The
> things I want to package are often distributed with at least an
> executable which uses them.
> 
> The packages I am working and contain libraries on are: scenic, spinframework.
> I am also interested in packaging lyd.
> 
> For now, I used CDBS, but I would like to give a try to dh 7, to
> compare. :) Whatever works first...
> Any examples of packages I should check out?

Liblo is really straightforward, as you noted. The problem with shared
libraries is not the packaging per se, but the updating of it to avoid
partial upgrades breaking, ABI breaks and other breakage.

> 
> I looked at liblo, which is a library I know and use. It's pretty
> straightforward.
> I found some info about the soversion (liblyd0, for example) in the
> Debian policy manual.
> http://www.debian.org/doc/debian-policy/ch-sharedlibs.html#s-shlibs
> There is no debian/shlibs file in the Git repo for the packaging of
> liblo. I guess it's generated by the debian/rules file?

No, liblo doesn't have a shlibs file because it has a symbols file.
Symbols provide a finer grained dependency check, but at a higher overhead.

> 
> It seems like the versioning of the shlibs rely on the
> LO_SO_VERSION=7:0:0 in configure.ac. Some project may not provide this
> upstream.

No, that accounts for the SONAME (the 7.0.0 part after liblo.so). If a
project does not provide a SONAME, then please tell upstream to start
doing so, or just package it as a private library.


-- 
Saludos,
Felipe Sateler



More information about the pkg-multimedia-maintainers mailing list