Chapter 8. Shared libraries
59
8.6.4 Providing a
shlibs
file
If your package provides a shared library, you should create a
shlibs
file following the format
described above. It is usual to call this file
debian/shlibs
(but if you have multiple binary
packages, you might want to call it
debian/shlibs.
package
instead). Then let
debian
/rules
install it in the control area:
install  m644 debian/shlibs debian/tmp/DEBIAN
or, in the case of a multi binary package:
install  m644 debian/shlibs.
package
debian/
package
/DEBIAN/shlibs
An alternative way of doing this is to create the
shlibs
file in the control area directly from
debian/rules
without using a
debian/shlibs
file at all,
10
since the
debian/shlibs
file
itself is ignored by
dpkg shlibdeps
.
As
dpkg shlibdeps
reads the
DEBIAN/shlibs
files in all of the binary packages being
built from this source package, all of the
DEBIAN/shlibs
files should be installed before
dpkg shlibdeps
is called on any of the binary packages.
8.6.5 Writing the
debian/shlibs.local
file
This file is intended only as a temporary fix if your binaries or libraries depend on a library
whose package does not yet provide a correct
shlibs
file.
We will assume that you are trying to package a binary
foo
.
When you try running
dpkg shlibdeps
you get the following error message (
 O
displays the dependency informa 
tion on
stdout
instead of writing it to
debian/substvars
, and the lines have been wrapped
for ease of reading):
$ dpkg shlibdeps  O debian/tmp/usr/bin/foo
dpkg shlibdeps: warning: unable to find dependency
information for shared library libbar (soname 1,
path /usr/lib/libbar.so.1, dependency field Depends)
shlibs:Depends=libc6 (>= 2.2.2 2)
You can then run
ldd
on the binary to find the full location of the library concerned:
$ ldd foo
libbar.so.1 => /usr/lib/libbar.so.1 (0x4001e000)
libc.so.6 => /lib/libc.so.6 (0x40032000)
/lib/ld linux.so.2 => /lib/ld linux.so.2 (0x40000000)
So the
foo
binary depends on the
libbar
shared library, but no package seems to provide
a
*.shlibs
file handling
libbar.so.1
in
/var/lib/dpkg/info/
. Let's determine the
package responsible:
10
This is what
dh_makeshlibs
in the
debhelper
suite does.






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

gay web hosting

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Inexpensive Web Hosting  Jsp Web Hosting

Cheapest Web Hosting Jsp Hosting Cheap Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved