Глава 16. debmake options

Содержание

16.1. Shortcut option (-i)
16.2. debmake -b
16.3. Snapshot upstream tarball
16.4. debmake -B
16.5. debmake -x

Here are some additional explanations for debmake options.

The debmake command offers a shortcut option.

  • -i : выполнить сценарий для сборки двоичного пакета

Действия из примера, приведённого выше в «Глава 5, Simple packaging», можно выполнить с помощью следующей простой команды.

[base_dir] $ debmake package-1.0.tar.xz -i debuild
[Подсказка]Подсказка

A URL such as «https://www.example.org/DL/package-1.0.tar.xz» for a tarball, «https://github.com/username/package.git» for a git repository, or «/path/to/source_dir» for a local source tree may be used as an argument.

The debmake command with the -b option provides an intuitive and flexible method to create the initial template debian/control file. This file defines the split of the Debian binary packages with the following stanzas:

The debmake command also sets an appropriate set of substvars (substitution variables) used in each pertinent dependency stanza.

Ниже приводится цитата соответствующей части страницы руководства debmake.

-b, --binaryspec "binarypackage[:type], …​"

set the binary package specs by a comma separated list of binarypackage:type pairs. Here, binarypackage is the binary package name, and the optional type is chosen from the following type values:

  • bin: C/C++ compiled ELF binary code package (any, foreign) (default, alias: "", i.e., null-string)
  • data: Data (fonts, graphics, …​) package (all, foreign) (alias: da)
  • dev: пакет с библиотекой разработки (any, same) (псевдоним: de)
  • doc: пакет документации (all, foreign) (псевдоним: do)
  • lib: пакет с библиотекой (any, same) (псевдоним: l)
  • perl: пакет со сценарием на языке Perl (all, foreign) (псевдоним: pl)
  • python3: Python (version 3) script package (all, foreign) (alias: py3, python, py)
  • ruby: пакет со сценарием на языке Ruby (all, foreign) (псевдоним: rb)
  • nodejs: Node.js based JavaScript package (all, foreign) (alias: js)
  • script: Shell and other interpreted language script package (all, foreign) (alias: sh)

The pair values in the parentheses, such as (any, foreign), are the Architecture and Multi-Arch stanza values set in the debian/control file. In many cases, the debmake command makes good guesses for type from binarypackage. If type is not obvious, type is set to bin.

Here are examples for typical binary package split scenarios where the upstream Debian source package name is foo:

  • Generating an executable binary package foo:

    • «-b’foo:bin'», or its short form «-b'-'», or no -b option
  • Generating an executable (python3) binary package python3-foo:

    • «-b’python3-foo:py'», or its short form «-b’python3-foo'»
  • Generating a data package foo:

    • «-b’foo:data'», or its short form «-b'-:data'»
  • Generating a executable binary package foo and a documentation one foo-doc:

    • «-b’foo:bin,foo-doc:doc'», or its short form «-b'-:-doc'»
  • Generating a executable binary package foo, a library package libfoo1, and a library development package libfoo-dev:

    • «-b’foo:bin,libfoo1:lib,libfoo-dev:dev'» or its short form «-b'-,libfoo1,libfoo-dev'»

Если содержимое дерева исходного кода не совпадает с настройками поля тип, то команда debmake выводит предупреждение.

This test building scheme is suitable for git repositories organized as described in gbp-buildpackage(7), which uses the master, upstream, and pristine-tar branches.

The upstream snapshot from the upstream source tree in the upstream VCS can be made as:

[~] $ cd /path/to/upstream-vcs
[upstream-vcs] $ debmake -p package -i debuild

If the upstream VCS is hosted in the package/ directory instead of the upstream-vcs/ directory, the «-p package» can be skipped.

If the upstream source tree in the VCS contains the debian/* files, the debmake command with the -i option automates the making of a non-native Debian package from the VCS snapshot while using these debian/* files.

[upstream-vcs] $ dch
   ... update debian/changelog
[upstream-vcs] $ git add -A .; git commit -m "vcs with debian/*"
[upstream-vcs] $ debmake -p package -i debuild

This non-native Debian binary package building scheme without the real upstream tarball is considered a quasi-native Debian package. See «Раздел 11.12, «Quasi-native Debian packaging»» for more details.

The debmake command invoked with the -B option can generate template files with .ex suffix. This is handy if you want to see auto-generated template files to the existing ones.

Количество шаблонных файлов, создаваемых командой debmake зависит от опции -x[01234].

[Примечание]Примечание

Команда debmake не меняет ни один из существующих файлов настройки.