# dh_makeshlibs

## NAME



           dh_makeshlibs - automatically create shlibs file and call
           dpkg-gensymbols
    


## SYNOPSIS



           **dh_makeshlibs**[_debhelper options_] [**-m** _major_] [**-V** _[dependencies]_]
           [**-n**] [**-X** _item_] [**--**_params_]
    


## DESCRIPTION



           **dh_makeshlibs** is a debhelper program that automatically scans for
           shared libraries, and generates a shlibs file for the libraries it
           finds.
    
           It will also ensure that ldconfig is invoked during install and
           removal when it finds shared libraries.  Since debhelper
           9.20151004, this is done via a dpkg trigger.  In older versions of
           debhelper, **dh_makeshlibs** would generate a maintainer script for
           this purpose.
    
           Since debhelper 12.3, **dh_makeshlibs** will by default add an
           additional _udeb_ line for udebs in the shlibs file, when the udeb
           has the same name as the deb followed by a "-udeb" suffix (e.g. if
           the deb is called "libfoo1", then debhelper will auto-detect the
           udeb if it is named "libfoo1-udeb"). Please use the **--add-udeb** and
           **--no-add-udeb** options below when this auto-detection is
           insufficient.
    
           If you previously used **--add-udeb** and are considering to migrate
           to using the new auto-detection feature in 12.3, then please
           remember to test that the resulting _DEBIAN/shlibs_ files are as
           expected.  There are some known corner cases, where the
           auto-detection is insufficient.  These include when the udeb
           contains library files from multiple regular deb packages or when
           the packages do not follow the expected naming convention.
    


## FILES



           debian/_package_.shlibs
               Installs this file, if present, into the package as
               DEBIAN/shlibs.  If omitted, debhelper will generate a shlibs
               file automatically if it detects any libraries.
    
               Note in compat levels 9 and earlier, this file was installed
               by dh_installdeb(1) rather than **dh_makeshlibs**.
    
           debian/_package_.symbols
           debian/_package_.symbols._arch_
               These symbols files, if present, are passed to
               dpkg-gensymbols(1) to be processed and installed. Use the _arch_
               specific names if you need to provide different symbols files
               for different architectures.
    


## OPTIONS



           **-m** _major_ , **--major=**_major_
               Instead of trying to guess the major number of the library
               with objdump, use the major number specified after the -m
               parameter. This is much less useful than it used to be, back
               in the bad old days when this program looked at library
               filenames rather than using objdump.
    
           **-V** , **-V** _dependencies_
           **--version-info** , **--version-info=**_dependencies_
               If a shlibs file is generated by this program, this option
               controls what version will be used in the dependency relation.
    
               In compat 12 and later, **dh_makeshlibs** defaults to
               **-VUpstream-Version**.  In compat 11 and earlier the default
               behaved like **-VNone**.
    
               The **dh_makeshlibs** tool can generate dependencies in three
               variants:
    
               **-VUpstream-Version**
                   The dependency will be "_packagename_ **( >**= _packageversion_**)** ".
                   Note that _Upstream-Version_ is case-sensitive and must be
                   written exactly as shown here.
    
                   This is a conservative setting that always ensures that
                   other packages' shared library dependencies are at least
                   as tight as they need to be (unless the library is prone
                   to changing ABI without updating the upstream version
                   number).
    
                   The flip side is that packages might end up with
                   dependencies that are too tight in some cases (note a
                   symbols file can mitigate this issue).  This is often of
                   minor temporary inconvenience and usually a lot better
                   than the fall out caused by forgetting to bump the
                   dependency information.
    
                   This explicit form was added in debhelper/11.3.  In
                   previous versions, a **-V** without any dependency information
                   was used instead (and that form still works)
    
               **-VNone**
                   The dependency will be "_packagename_ ".  Note that _None_ is
                   case-sensitive and must be written exactly as shown here.
    
                   This form is generally unsafe with the only exception
                   being if upstream does not extend the ABI in any way.
                   However, most upstreams improve their interfaces over time
                   and packagers are recommended to use **-VUpstream-Version**
                   (or one of the other forms of **-V** _dependencies_).
    
                   Alternatively, this may be sufficient if (and only if) the
                   package uses symbol versioning (see dpkg-gensymbols(1))
                   and does _not_ build any udeb packages.  Note that symbols
                   are not supported for udeb packages, which solely relies
                   on shlibs for dependency handling.
    
               **-V** _package-relation_
                   In this case, the value passed to **-V** will be used as a
                   dependency relation.  The _package-relation_ should
                   generally be of the form "_some-package-name_ **( >**=
                   _some-package-version_**)** ".  Remember to include the package
                   name.
    
                   Note that debhelper will use the value _as it is_ with no
                   sanity checking or modification.  In _rare special_ cases,
                   this is needed to generate a dependency on a different
                   package than the one containing the library.
    
               When choosing a value for this option, please keep mind that
               if the package provides a symbols file, then that this is
               generally preferred over the shlibs file for regular .deb
               packages.  See dpkg-shlibdeps(1) for more information on this
               topic.
    
           **-n** , **--no-scripts**
               Do not add the "ldconfig" trigger even if it seems like the
               package might need it.  The option is called **--no-scripts** for
               historical reasons as **dh_makeshlibs** would previously generate
               maintainer scripts that called **ldconfig**.
    
           **-X** _item_ , **--exclude=**_item_
               Exclude files that contain _item_ anywhere in their filename or
               directory from being treated as shared libraries.
    
           **--add-udeb=**_udeb_
               Create an additional line for udebs in the shlibs file and use
               _udeb_ as the package name for udebs to depend on instead of the
               regular library package.
    
               This option is only useful for special cases such as when
               debhelper cannot auto-detect package name of the udeb package,
               when the udeb will contain libraries from multiple deb
               packages, or when the udeb contains libraries **not** present in
               the deb package.
    
           **--no-add-udeb**
               Do not add any udeb lines to the shlibs file.  This can be
               used to disable the default auto-detection of udebs.
    
               This may be useful in case you do not want a shlibs file at
               all for the udeb because no package will depend on it.  E.g.
               because adding a udeb package for the library was "overkill"
               and the library is embedded in a different udeb package.
    
           **--**_params_
               Pass _params_ to dpkg-gensymbols(1).
    


## EXAMPLES



           **dh_makeshlibs -VNone**
               Assuming this is a package named _libfoobar1_ , generates a
               shlibs file that looks something like:
                libfoobar 1 libfoobar1
    
           **dh_makeshlibs -VUpstream-Version**
               Assuming the current version of the package is 1.1-3,
               generates a shlibs file that looks something like:
                libfoobar 1 libfoobar1 (>= 1.1)
    
           **dh_makeshlibs -V 'libfoobar1 ( >= 1.0)'**
               Generates a shlibs file that looks something like:
                 libfoobar 1 libfoobar1 (>= 1.0)
    


* * *