[[lib]]
=== Library package

Packaging library software requires you to perform much more work than usual.  Here are some reminders for packaging library software:

* The library binary package must be named as in <<libnames>>.
* Debian ships shared libraries such as */usr/lib/<triplet>/lib*'foo-0.1'*.so.*'1.0.0' (see <<multiarch>>).
* Debian encourages using versioned symbols in the shared library (see <<symbols>>).
* Debian doesn't ship ***.la**  libtool library archive files.
* Debian discourages using and shipping ***.a** static library files.

Before packaging shared library software, see:

* https://www.debian.org/doc/debian-policy/#document-ch-sharedlibs[Chapter 8 - Shared libraries] of the ``Debian Policy Manual''
* https://www.debian.org/doc/debian-policy/#libraries[10.2 Libraries] of the ``Debian Policy Manual''
* https://www.debian.org/doc/manuals/developers-reference/best-pkging-practices.html#bpp-libraries[6.7.2. Libraries] of the ``Debian Developer's Reference''

For the historic background study, see:

* https://debconf4.debconf.org/talks/dependency-hell/img1.html[Escaping the Dependency Hell] footnote:[This document was written before the introduction of the *symbols* file.]
** This encourages having versioned symbols in the shared library.
* https://www.netfort.gr.jp/\~dancer/column/libpkg-guide/libpkg-guide.html[Debian Library Packaging guide] footnote:[The strong preference is to use the SONAME versioned *-dev* package names over the single *-dev* package name in https://www.netfort.gr.jp/~dancer/column/libpkg-guide/libpkg-guide.html#devpkg[Chapter 6. Development (-DEV) packages], which does not seem to be shared by the former ftp-master (Steve Langasek). This document was written before the introduction of the *multiarch* system and the *symbols* file.]
** Please read the discussion thread following https://lists.debian.org/debian-devel/2004/06/msg00069.html[its announcement], too.
