dpkg-name.1 4.1 KB

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