1DH_MAKESHLIBS(1) Debhelper DH_MAKESHLIBS(1)
2
3
4
6 dh_makeshlibs - automatically create shlibs file and call
7 dpkg-gensymbols
8
10 dh_makeshlibs [debhelper options] [-mmajor] [-V[dependencies]] [-n]
11 [-Xitem] [-- params]
12
14 dh_makeshlibs is a debhelper program that automatically scans for
15 shared libraries, and generates a shlibs file for the libraries it
16 finds.
17
18 It will also ensure that ldconfig is invoked during install and removal
19 when it finds shared libraries. Since debhelper 9.20151004, this is
20 done via a dpkg trigger. In older versions of debhelper, dh_makeshlibs
21 would generate a maintainer script for this purpose.
22
23 Since debhelper 12.3, dh_makeshlibs will by default add an additional
24 udeb line for udebs in the shlibs file, when the udeb has the same name
25 as the deb followed by a "-udeb" suffix (e.g. if the deb is called
26 "libfoo1", then debhelper will auto-detect the udeb if it is named
27 "libfoo1-udeb"). Please use the --add-udeb and --no-add-udeb options
28 below when this auto-detection is insufficient.
29
30 If you previously used --add-udeb and are considering to migrate to
31 using the new auto-detection feature in 12.3, then please remember to
32 test that the resulting DEBIAN/shlibs files are as expected. There are
33 some known corner cases, where the auto-detection is insufficient.
34 These include when the udeb contains library files from multiple
35 regular deb packages or when the packages do not follow the expected
36 naming convention.
37
39 debian/package.shlibs
40 Installs this file, if present, into the package as DEBIAN/shlibs.
41 If omitted, debhelper will generate a shlibs file automatically if
42 it detects any libraries.
43
44 Note in compat levels 9 and earlier, this file was installed by
45 dh_installdeb(1) rather than dh_makeshlibs.
46
47 debian/package.symbols
48 debian/package.symbols.arch
49 These symbols files, if present, are passed to dpkg-gensymbols(1)
50 to be processed and installed. Use the arch specific names if you
51 need to provide different symbols files for different
52 architectures.
53
55 -mmajor, --major=major
56 Instead of trying to guess the major number of the library with
57 objdump, use the major number specified after the -m parameter.
58 This is much less useful than it used to be, back in the bad old
59 days when this program looked at library filenames rather than
60 using objdump.
61
62 -V, -Vdependencies
63 --version-info, --version-info=dependencies
64 If a shlibs file is generated by this program, this option controls
65 what version will be used in the dependency relation.
66
67 In compat 12 and later, dh_makeshlibs defaults to
68 -VUpstream-Version. In compat 11 and earlier the default behaved
69 like -VNone.
70
71 The dh_makeshlibs tool can generate dependencies in three variants:
72
73 -VUpstream-Version
74 The dependency will be "packagename (>= packageversion)". Note
75 that Upstream-Version is case-sensitive and must be written
76 exactly as shown here.
77
78 This is a conservative setting that always ensures that other
79 packages' shared library dependencies are at least as tight as
80 they need to be (unless the library is prone to changing ABI
81 without updating the upstream version number).
82
83 The flip side is that packages might end up with dependencies
84 that are too tight in some cases (note a symbols file can
85 mitigate this issue). This is often of minor temporary
86 inconvenience and usually a lot better than the fall out caused
87 by forgetting to bump the dependency information.
88
89 This explicit form was added in debhelper/11.3. In previous
90 versions, a -V without any dependency information was used
91 instead (and that form still works)
92
93 -VNone
94 The dependency will be "packagename". Note that None is case-
95 sensitive and must be written exactly as shown here.
96
97 This form is generally unsafe with the only exception being if
98 upstream does not extend the ABI in any way. However, most
99 upstreams improve their interfaces over time and packagers are
100 recommended to use -VUpstream-Version (or one of the other
101 forms of -Vdependencies).
102
103 Alternatively, this may be sufficient if (and only if) the
104 package uses symbol versioning (see dpkg-gensymbols(1)) and
105 does not build any udeb packages. Note that symbols are not
106 supported for udeb packages, which solely relies on shlibs for
107 dependency handling.
108
109 -Vpackage-relation
110 In this case, the value passed to -V will be used as a
111 dependency relation. The package-relation should generally be
112 of the form "some-package-name (>= some-package-version)".
113 Remember to include the package name.
114
115 Note that debhelper will use the value as it is with no sanity
116 checking or modification. In rare special cases, this is
117 needed to generate a dependency on a different package than the
118 one containing the library.
119
120 When choosing a value for this option, please keep mind that if the
121 package provides a symbols file, then that this is generally
122 preferred over the shlibs file for regular .deb packages. See
123 dpkg-shlibdeps(1) for more information on this topic.
124
125 -n, --no-scripts
126 Do not add the "ldconfig" trigger even if it seems like the package
127 might need it. The option is called --no-scripts for historical
128 reasons as dh_makeshlibs would previously generate maintainer
129 scripts that called ldconfig.
130
131 -Xitem, --exclude=item
132 Exclude files that contain item anywhere in their filename or
133 directory from being treated as shared libraries.
134
135 --add-udeb=udeb
136 Create an additional line for udebs in the shlibs file and use udeb
137 as the package name for udebs to depend on instead of the regular
138 library package.
139
140 This option is only useful for special cases such as when debhelper
141 cannot auto-detect package name of the udeb package, when the udeb
142 will contain libraries from multiple deb packages, or when the udeb
143 contains libraries not present in the deb package.
144
145 --no-add-udeb
146 Do not add any udeb lines to the shlibs file. This can be used to
147 disable the default auto-detection of udebs.
148
149 This may be useful in case you do not want a shlibs file at all for
150 the udeb because no package will depend on it. E.g. because adding
151 a udeb package for the library was "overkill" and the library is
152 embedded in a different udeb package.
153
154 -- params
155 Pass params to dpkg-gensymbols(1).
156
158 dh_makeshlibs -VNone
159 Assuming this is a package named libfoobar1, generates a shlibs
160 file that looks something like:
161 libfoobar 1 libfoobar1
162
163 dh_makeshlibs -VUpstream-Version
164 Assuming the current version of the package is 1.1-3, generates a
165 shlibs file that looks something like:
166 libfoobar 1 libfoobar1 (>= 1.1)
167
168 dh_makeshlibs -V 'libfoobar1 (>= 1.0)'
169 Generates a shlibs file that looks something like:
170 libfoobar 1 libfoobar1 (>= 1.0)
171
173 debhelper(7)
174
175 This program is a part of debhelper.
176
178 Joey Hess <joeyh@debian.org>
179
180
181
18213.5.2 2021-11-02 DH_MAKESHLIBS(1)