dh_strip

Autres langues

Langue: en

Version: 2004-04-28 (openSuse - 09/10/07)

Section: 1 (Commandes utilisateur)

NAME

dh_strip - strip executables, shared libraries, and some static libraries

SYNOPSIS

dh_strip [debhelper options] [-Xitem] [--dbg-package=package] [--keep-debug]

DESCRIPTION

dh_strip is a debhelper program that is responsible for stripping executables, shared libraries, and static libraries that are not used for debugging.

This program examines your package build directories and works out what to strip on its own. It uses file(1) and file permisions and filenames to figure out what files are shared libraries (*.so), executable binaries, and static (lib*.a) and debugging libraries (lib*_g.a, debug/*.so), and strips each as much as is possible. (Which is not at all for debugging libraries.) In general it seems to make very good guesses, and will do the right thing in almost all cases.

Since it is very hard to automatically guess if a file is a module, and hard to determine how to strip a module, dh_strip does not currently deal with stripping binary modules such as .o files.

OPTIONS

-Xitem, --exclude=item
Exclude files that contain ``item'' anywhere in their filename from being stripped. You may use this option multiple times to build up a list of things to exclude.
--dbg-package=package
This option tells dh_strip that the given package has an associated ``-dbg'' package. dh_strip will, when stripping off the debug symbols of files in the given package, save them to independent files in the package build directory for the ``-dbg'' package.

For example, you might have a package named libfoo, and want to include a libfoo-dbg package that contains debugging symbols. The command ``dh_strip --dbg-package=libfoo'' will make dh_strip save the debugging symbols for usr/lib/libfoo.so.0 into usr/lib/debug/usr/lib/libfoo.so.0 in the package build directory for libfoo-dbg. If libfoo-dbg is installed, gdb will automatically load up the debugging symbols from it when debugging libfoo.

This option may be repeated to list more than one package.

Note that if you use this option, your package should build-depend on binutils (>= 2.14.90.0.7).

-k, --keep-debug
Debug symbols will be retained, but split into an independant file in usr/lib/debug/ in the package build directory. --dbg-package is easier to use than this option, but this option is more flexible.

Note that if you use this option, your package should build-depend on binutils (>= 2.12.90.0.9).

NOTES

If the DEB_BUILD_OPTIONS environment variable contains ``nostrip'', nothing will be stripped, in accordance with Debian policy.

CONFORMS TO

Debian policy, version 3.0.1

SEE ALSO

debhelper(7)

This program is a part of debhelper.

AUTHOR

Joey Hess <joeyh@debian.org>