1DH_LINK(1) Debhelper DH_LINK(1)
2
3
4
6 dh_link - create symlinks in package build directories
7
9 dh_link [debhelper options] [-A] [-Xitem] [source destination ...]
10
12 dh_link is a debhelper program that creates symlinks in package build
13 directories.
14
15 dh_link accepts a list of pairs of source and destination files. The
16 source files are the already existing files that will be symlinked from
17 (called target by ln(1)). The destination files are the symlinks that
18 will be created (called link name by ln(1)). There must be an equal
19 number of source and destination files specified.
20
21 Be sure you do specify the absolute path to both the source and
22 destination files (unlike you would do if you were using something like
23 ln(1)). Please note that the leading slash is optional.
24
25 dh_link will generate symlinks that comply with Debian policy -
26 absolute when policy says they should be absolute, and relative links
27 with as short a path as possible. It will also create any
28 subdirectories it needs to put the symlinks in.
29
30 Any pre-existing destination files will be replaced with symlinks.
31
32 dh_link also scans the package build tree for existing symlinks which
33 do not conform to Debian policy, and corrects them (v4 or later).
34
36 debian/package.links
37 Lists pairs of source and destination files to be symlinked. Each
38 pair should be put on its own line, with the source and destination
39 separated by whitespace.
40
41 In each pair the source file (called target by ln(1)) comes first
42 and is followed by the destination file (called link name by
43 ln(1)). Thus the pairs of source and destination files in each line
44 are given in the same order as they would be given to ln(1).
45
46 In contrast to ln(1), source and destination paths must be absolute
47 (the leading slash is optional).
48
49 Supports substitution variables in compat 13 and later as
50 documented in debhelper(7).
51
53 -A, --all
54 Create any links specified by command line parameters in ALL
55 packages acted on, not just the first.
56
57 -Xitem, --exclude=item
58 Exclude symlinks that contain item anywhere in their filename from
59 being corrected to comply with Debian policy.
60
61 source destination ...
62 Create a file named destination as a link to a file named source.
63 Do this in the package build directory of the first package acted
64 on. (Or in all packages if -A is specified.)
65
67 dh_link usr/share/man/man1/foo.1 usr/share/man/man1/bar.1
68
69 Make bar.1 be a symlink to foo.1
70
71 dh_link var/lib/foo usr/lib/foo \
72 usr/share/man/man1/foo.1 usr/share/man/man1/bar.1
73
74 Make /usr/lib/foo/ be a link to /var/lib/foo/, and bar.1 be a symlink
75 to the foo.1
76
77 var/lib/foo usr/lib/foo
78 usr/share/man/man1/foo.1 usr/share/man/man1/bar.1
79
80 Same as above but as content for a debian/package.links file.
81
83 debhelper(7)
84
85 This program is a part of debhelper.
86
88 Joey Hess <joeyh@debian.org>
89
90
91
9213.7.1 2022-04-22 DH_LINK(1)