章 16. debmake options

# 章 16. debmake options

Here are some additional explanations for debmake options.

## 16.1. Shortcut option (-i)

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.

## 16.2. debmake -b

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:

- Package:
- Architecture: (e.g. amd64)
- Multi-Arch: (see “節 10.10, “多體系架構””)
- Depends:
- Pre-Depends:

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 命令會發出警告。

## 16.3. debmake -B

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.

## 16.4. debmake -x

debmake 生成的模板檔案數量由 -x[01234] 選項進行控制。

- 請參見 “節 14.1, “挑選最好的模板”” 以瞭解與揀選使用模板檔案的方式。

| 注意
debmake 命令不會修改任何已存在的配置文件。

章 15. debmake(1) 手冊頁 |  |