~noskcaj/ubuntu/saucy/debhelper/saucy

« back to all changes in this revision

Viewing changes to dh_strip

  • Committer: Bazaar Package Importer
  • Author(s): أحمد المحمودي (Ahmed El-Mahmoudy)
  • Date: 2011-02-07 17:16:49 UTC
  • mfrom: (1.4.21 sid)
  • Revision ID: james.westby@ubuntu.com-20110207171649-v8k6uowavom83cxt
Tags: 8.1.0ubuntu1
* Merge with Debian (LP: #714705); remaining changes:
  - dh_installinit: Add --upstart-only and --onlyscripts-upstart modes.
  - Add various autoscripts for above: postinst-upstart,
    postinst-upstart-replace, postinst-upstart-restart,
    prerm-upstart, prerm-upstart-norestart, preinst-removeconffile.
  - dh_installudev: Change default init.d symlink priority to 40.
  - dh_installchangelogs: Do not install upstream changelog in compat level
    7. This floods packages with huge upstream changelogs which take
    precious CD space.
  - dh_strip, dh_makeshlibs: use triplet-objdump, triplet-objcopy and
    triplet-strip from cross-binutils when cross-compiling; Debian #412118.
  - add dh_apparmor and autoscripts
  - debian/rules: override build target to set executable bit for
    dh_apparmor before actually running dh build, that is in order to get
    the manpage built for dh_apparmor.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
 
13
13
=head1 SYNOPSIS
14
14
 
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>]
16
16
 
17
17
=head1 DESCRIPTION
18
18
 
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
21
21
debugging.
22
22
 
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.
30
30
 
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.
34
34
 
35
35
=head1 OPTIONS
36
36
 
38
38
 
39
39
=item B<-X>I<item>, B<--exclude=>I<item>
40
40
 
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
43
43
things to exclude.
44
44
 
45
45
=item B<--dbg-package=>I<package>
46
46
 
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
49
49
package.
50
50
 
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>.
53
53
 
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.
59
59
 
60
60
=item B<-k>, B<--keep-debug>
61
61
 
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.
65
65
 
66
66
=back
67
67
 
68
68
=head1 NOTES
69
69
 
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
72
72
"Binaries").
73
73