chiark / gitweb /
dpkg (1.18.25) stretch; urgency=medium
[dpkg] / man / dpkg-name.man
1 .\" dpkg manual page - dpkg-name(1)
2 .\"
3 .\" Copyright © 1995-1996 Erick Branderhorst
4 .\" Copyright © 2007-2013, 2015 Guillem Jover <guillem@debian.org>
5 .\"
6 .\" This is free software; you can redistribute it and/or modify
7 .\" it under the terms of the GNU General Public License as published by
8 .\" the Free Software Foundation; either version 2 of the License, or
9 .\" (at your option) any later version.
10 .\"
11 .\" This is distributed in the hope that it will be useful,
12 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
13 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 .\" GNU General Public License for more details.
15 .\"
16 .\" You should have received a copy of the GNU General Public License
17 .\" along with this program.  If not, see <https://www.gnu.org/licenses/>.
18 .
19 .TH dpkg\-name 1 "%RELEASE_DATE%" "%VERSION%" "dpkg suite"
20 .nh
21 .SH NAME
22 dpkg\-name \- rename Debian packages to full package names
23 .
24 .SH SYNOPSIS
25 .B dpkg\-name
26 .RI [ option ...]
27 .RB [ \-\- ]
28 .IR file ...
29 .
30 .SH DESCRIPTION
31 .PP
32 This manual page documents the
33 .B dpkg\-name
34 program which provides an easy way to rename
35 .B Debian
36 packages into their full package names. A full package name consists of
37 .IB package _ version _ architecture . package-type
38 as specified in the control file of the package. The \fIversion\fP part
39 of the filename
40 consists of the upstream version information optionally followed by a
41 hyphen and the revision information. The \fIpackage-type\fP part comes
42 from that field if present or fallbacks to \fBdeb\fP.
43 .
44 .SH OPTIONS
45 .TP
46 .BR \-a ", " \-\-no\-architecture
47 The destination filename will not have the architecture information.
48 .TP
49 .BR \-k ", " \-\-symlink
50 Create a symlink, instead of moving.
51 .TP
52 .BR \-o ", " \-\-overwrite
53 Existing files will be overwritten if they have the same name as the
54 destination filename.
55 .TP
56 .BR \-s ", " \-\-subdir " [\fIdir\fP]"
57 Files will be moved into a subdirectory. If the directory given as argument exists
58 the files will be moved into that directory otherwise the name of
59 the target directory is extracted from the section field in the
60 control part of the package. The target directory will be
61 «unstable/binary\-\fIarchitecture\fP/\fIsection\fP».
62 If the section is not found in the control, then \fBno\-section\fP is assumed,
63 and in this case, as well as for sections \fBnon\-free\fP and \fBcontrib\fP
64 the target directory is «\fIsection\fP/binary\-\fIarchitecture\fP».
65 The section field is not required so a lot of packages will find their way
66 to the \fBno\-section\fP area.
67 Use this option with care, it's messy.
68 .TP
69 .BR \-c ", " \-\-create\-dir
70 This option can used together with the \fB\-s\fP option. If a target
71 directory isn't found it will be created automatically.
72 .B Use this option with care.
73 .TP
74 .BR \-? ", " \-\-help
75 Show the usage message and exit.
76 .TP
77 .BR \-v ", " \-\-version
78 Show the version and exit.
79 .
80 .SH BUGS
81 Some packages don't follow the name structure
82 .IB package _ version _ architecture .deb\fR.\fP
83 Packages renamed by \fBdpkg\-name\fP
84 will follow this structure. Generally this will have no impact on how
85 packages are installed by
86 .BR dselect (1)/ dpkg (1),
87 but other installation tools
88 might depend on this naming structure.
89 .
90 .SH EXAMPLES
91 .TP
92 .B dpkg\-name bar\-foo.deb
93 The file \fBbar\-foo.deb\fP will be renamed to bar\-foo_1.0\-2_i386.deb or
94 something similar (depending on whatever information is in the control
95 part of \fBbar\-foo.deb\fP).
96 .TP
97 .B find /root/debian/ \-name '*.deb' | xargs \-n 1 dpkg\-name \-a
98 All files with the extension \fBdeb\fP in the directory /root/debian and its
99 subdirectory's will be renamed by \fBdpkg\-name\fP if required into names
100 with no architecture information.
101 .TP
102 .B find \-name '*.deb' | xargs \-n 1 dpkg\-name \-a \-o \-s \-c
103 .B Don't do this.
104 Your archive will be messed up completely because a lot of packages
105 don't come with section information.
106 .B Don't do this.
107 .TP
108 .B dpkg\-deb \-\-build debian\-tmp && dpkg\-name \-o \-s .. debian\-tmp.deb
109 This can be used when building new packages.
110 .
111 .SH SEE ALSO
112 .BR deb (5),
113 .BR deb\-control (5),
114 .BR dpkg (1),
115 .BR dpkg\-deb (1),
116 .BR find (1),
117 .BR xargs (1).