]> git.donarmstrong.com Git - debhelper.git/blob - dh_compress.1
r197: Initial Import
[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/info, usr/man, usr/X11R6/man, and
15 all files in usr/doc that are larger than 4k in size, except
16 the copyright file, .html files and .gif files, and all changelog files. It
17 skips any files that appear to be already compressed (based on their
18 extentions).
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.
25 .SH EXAMPLE
26 Here is a sample debian/compress file that causes dh_compress to compress
27 the same files as it would by default. This is a good starting point for
28 customization of what files are compressed:
29 .PP
30  find usr/info usr/man usr/X11*/man -type f
31  find usr/doc -type f \\ 
32         \\( -size +4k -or -name "changelog*" \\) \\
33         ! -name "*.htm*" ! -name "*.gif" ! -iname "*.gz" \\
34         ! -iname "*.taz" ! -iname "*.tgz" ! -iname "*.z" \\
35         ! -name "copyright"
36 .SH OPTIONS
37 .TP
38 .B debhelper options
39 See
40 .BR debhelper (1)
41 for a list of options common to all debhelper commands.
42 .TP
43 .B \-Xitem, \--exclude=item
44 Exclude files that contain "item" anywhere in their filename from being
45 compressed. For example, -X.jpeg will exclude jpeg's from compression.
46 You may use this option multiple times to build up a list of things to
47 exclude. You can accomplish the same thing by using a debian/compress file,
48 but this is easier.
49 .TP
50 .B \-A, \--all
51 Compress all files specified by command line parameters in ALL packages
52 acted on.
53 .TP
54 .B file ...
55 Add these files to the list of files to compress.
56 .SH NOTES
57 The debian/compress file applies to the first binary package listed in your
58 control file. For the other packages, you can make files named
59 debian/package.compress, where "package" is the name of the package they 
60 apply to. (This works for the first binary package too.)
61 .SH ENVIRONMENT
62 See
63 .BR debhelper (1)
64 for a list of environment variables that affect all debhelper commands.
65 .SH "SEE ALSO"
66 .BR debhelper (1)
67 .SH BUGS
68 Filenames with spaces in them may not properly be compressed.
69 .SH "CONFORMS TO"
70 Debian policy, version 2.5.0.0
71 .SH AUTHOR
72 Joey Hess <joeyh@master.debian.org>