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