15
B<dh_strip> [S<I<debhelper options>>] [B<-X>I<item>] [--dbg-package=package] [--keep-debug]
15
B<dh_strip> [S<I<debhelper options>>] [B<-X>I<item>] [B<--dbg-package=>I<package>] [B<--keep-debug>]
19
dh_strip is a debhelper program that is responsible for stripping
19
B<dh_strip> is a debhelper program that is responsible for stripping
20
20
executables, shared libraries, and static libraries that are not used for
23
23
This program examines your package build directories and works out what
24
24
to strip on its own. It uses L<file(1)> and file permissions and filenames
25
to figure out what files are shared libraries (*.so), executable binaries,
26
and static (lib*.a) and debugging libraries (lib*_g.a, debug/*.so), and
25
to figure out what files are shared libraries (F<*.so>), executable binaries,
26
and static (F<lib*.a>) and debugging libraries (F<lib*_g.a>, F<debug/*.so>), and
27
27
strips each as much as is possible. (Which is not at all for debugging
28
28
libraries.) In general it seems to make very good guesses, and will do the
29
29
right thing in almost all cases.
31
31
Since it is very hard to automatically guess if a file is a
32
module, and hard to determine how to strip a module, dh_strip does not
33
currently deal with stripping binary modules such as .o files.
32
module, and hard to determine how to strip a module, B<dh_strip> does not
33
currently deal with stripping binary modules such as F<.o> files.
39
39
=item B<-X>I<item>, B<--exclude=>I<item>
41
Exclude files that contain "item" anywhere in their filename from being
41
Exclude files that contain I<item> anywhere in their filename from being
42
42
stripped. You may use this option multiple times to build up a list of
45
45
=item B<--dbg-package=>I<package>
47
Causes dh_strip to save debug symbols stripped from the packages it acts on
47
Causes B<dh_strip> to save debug symbols stripped from the packages it acts on
48
48
as independent files in the package build directory of the specified debugging
51
51
For example, if your packages are libfoo and foo and you want to include a
52
foo-dbg package with debugging symbols, use dh_strip --dbg-package=foo-dbg.
52
I<foo-dbg> package with debugging symbols, use B<dh_strip --dbg-package=>I<foo-dbg>.
54
54
Note that this option behaves significantly different in debhelper
55
55
compatibility levels 4 and below. Instead of specifying the name of a debug
56
56
package to put symbols in, it specifies a package (or packages) which
57
57
should have separated debug symbols, and the separated symbols are placed
58
in packages with "-dbg" added to their name.
58
in packages with B<-dbg> added to their name.
60
60
=item B<-k>, B<--keep-debug>
62
62
Debug symbols will be retained, but split into an independent
63
file in usr/lib/debug/ in the package build directory. --dbg-package
63
file in F<usr/lib/debug/> in the package build directory. B<--dbg-package>
64
64
is easier to use than this option, but this option is more flexible.
70
If the DEB_BUILD_OPTIONS environment variable contains "nostrip", nothing
70
If the B<DEB_BUILD_OPTIONS> environment variable contains B<nostrip>, nothing
71
71
will be stripped, in accordance with Debian policy (section 10.1