]> git.donarmstrong.com Git - debhelper.git/blob - dh_compress.1
r348: * Fixes for perl 5.6.
[debhelper.git] / dh_compress.1
1 .TH DH_COMPRESS 1 "" "Debhelper Commands" "Debhelper Commands"
2 .SH NAME
3 dh_compress \- compress files and fix symlinks in package build directories
4 .SH SYNOPSIS
5 .B dh_compress
6 .I "[debhelper options] [-Xitem] [-A] [file ...]"
7 .SH "DESCRIPTION"
8 dh_compress is a debhelper program that is responsible for compressing
9 the files in package build directories, and makes sure that any symlinks
10 that pointed to the files before they were compressed are updated to point
11 to the new files.
12 .P
13 By default, dh_compress compresses files that debian policy mandates should
14 be compressed, namely all files in usr/share/info, usr/share/man, 
15 usr/X11R6/man, and all files in usr/share/doc that are larger than 4k in size,
16 (except the copyright file, .html files and .gif files), and all changelog 
17 files. It skips any files that appear to be already compressed (based on their
18 extensions).
19 .P
20 If a debian/package.compress file exists (debian/compress may be used for the
21 first binary package in debian/control), however, it will be ran as a shell
22 script, and all filenames that the shell script outputs will be compressed
23 instead of the default files. Note that the shell script will be run from
24 inside the package build directory. Note though that using -X is a much
25 better idea in general; you should only use a debian/compress file if you
26 really have to.
27 .SH EXAMPLE
28 Here is a sample debian/compress file that causes dh_compress to compress
29 the same files as it would by default. This is a good starting point for
30 customization of what files are compressed:
31 .PP
32  find usr/info usr/share/info usr/man usr/share/man usr/X11*/man -type f ! -name "*.gz"
33  find usr/doc usr/share/doc -type f \\ 
34         \\( -size +4k -or -name "changelog*" \\) \\
35         \\( -name changelog.html -or ! -iname "*.htm*" \\) \\
36         ! -iname "*.gif" ! -iname "*.png" ! -iname "*.jpg" ! -iname "*.jpeg" ! -iname "*.gz" \\
37         ! -iname "*.taz" ! -iname "*.tgz" ! -iname "*.z" \\
38         ! -name "copyright"
39 .SH OPTIONS
40 .TP
41 .B debhelper options
42 See
43 .BR debhelper (1)
44 for a list of options common to all debhelper commands.
45 .TP
46 .B \-Xitem, \--exclude=item
47 Exclude files that contain "item" anywhere in their filename from being
48 compressed. For example, -X.jpeg will exclude jpeg's from compression.
49 You may use this option multiple times to build up a list of things to
50 exclude. You can accomplish the same thing by using a debian/compress file,
51 but this is easier.
52 .TP
53 .B \-A, \--all
54 Compress all files specified by command line parameters in ALL packages
55 acted on.
56 .TP
57 .B file ...
58 Add these files to the list of files to compress.
59 .SH NOTES
60 The debian/compress file applies to the first binary package listed in your
61 control file. For the other packages, you can make files named
62 debian/package.compress, where "package" is the name of the package they 
63 apply to. (This works for the first binary package too.)
64 .SH ENVIRONMENT
65 See
66 .BR debhelper (1)
67 for a list of environment variables that affect all debhelper commands.
68 .SH "SEE ALSO"
69 .BR debhelper (1)
70 .SH BUGS
71 Filenames with spaces in them may not properly be compressed.
72 .SH "CONFORMS TO"
73 Debian policy, version 3.0.0.0
74 .SH AUTHOR
75 Joey Hess <joeyh@debian.org>