dpkg (1.18.25) stretch; urgency=medium
[dpkg] / man / dpkg-name.man
CommitLineData
1479465f
GJ
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
22dpkg\-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
32This manual page documents the
33.B dpkg\-name
34program which provides an easy way to rename
35.B Debian
36packages into their full package names. A full package name consists of
37.IB package _ version _ architecture . package-type
38as specified in the control file of the package. The \fIversion\fP part
39of the filename
40consists of the upstream version information optionally followed by a
41hyphen and the revision information. The \fIpackage-type\fP part comes
42from that field if present or fallbacks to \fBdeb\fP.
43.
44.SH OPTIONS
45.TP
46.BR \-a ", " \-\-no\-architecture
47The destination filename will not have the architecture information.
48.TP
49.BR \-k ", " \-\-symlink
50Create a symlink, instead of moving.
51.TP
52.BR \-o ", " \-\-overwrite
53Existing files will be overwritten if they have the same name as the
54destination filename.
55.TP
56.BR \-s ", " \-\-subdir " [\fIdir\fP]"
57Files will be moved into a subdirectory. If the directory given as argument exists
58the files will be moved into that directory otherwise the name of
59the target directory is extracted from the section field in the
60control part of the package. The target directory will be
61«unstable/binary\-\fIarchitecture\fP/\fIsection\fP».
62If the section is not found in the control, then \fBno\-section\fP is assumed,
63and in this case, as well as for sections \fBnon\-free\fP and \fBcontrib\fP
64the target directory is «\fIsection\fP/binary\-\fIarchitecture\fP».
65The section field is not required so a lot of packages will find their way
66to the \fBno\-section\fP area.
67Use this option with care, it's messy.
68.TP
69.BR \-c ", " \-\-create\-dir
70This option can used together with the \fB\-s\fP option. If a target
71directory isn't found it will be created automatically.
72.B Use this option with care.
73.TP
74.BR \-? ", " \-\-help
75Show the usage message and exit.
76.TP
77.BR \-v ", " \-\-version
78Show the version and exit.
79.
80.SH BUGS
81Some packages don't follow the name structure
82.IB package _ version _ architecture .deb\fR.\fP
83Packages renamed by \fBdpkg\-name\fP
84will follow this structure. Generally this will have no impact on how
85packages are installed by
86.BR dselect (1)/ dpkg (1),
87but other installation tools
88might depend on this naming structure.
89.
90.SH EXAMPLES
91.TP
92.B dpkg\-name bar\-foo.deb
93The file \fBbar\-foo.deb\fP will be renamed to bar\-foo_1.0\-2_i386.deb or
94something similar (depending on whatever information is in the control
95part of \fBbar\-foo.deb\fP).
96.TP
97.B find /root/debian/ \-name '*.deb' | xargs \-n 1 dpkg\-name \-a
98All files with the extension \fBdeb\fP in the directory /root/debian and its
99subdirectory's will be renamed by \fBdpkg\-name\fP if required into names
100with 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.
104Your archive will be messed up completely because a lot of packages
105don'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
109This 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).