// vim:set filetype=asciidoc:
[[options]]
== *debmake* options

Here are some additional explanations for *debmake* options.

[[ai-option]]
=== Shortcut option (*-i*)

The *debmake* command offers a shortcut option.

* *-i* : execute script to build the binary package

The example in the above "`<<simple>>`" can be done simply as follows.

----
[base_dir] $ debmake package-1.0.tar.xz -i debuild
----

TIP: 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.

[[boption]]
=== *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 "`<<multiarch>>`")
* *Depends:*
* *Pre-Depends:*

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

Let's quote the pertinent part from the *debmake* manpage here.

include::binary.txt[]

[[dt-option]]
=== Snapshot upstream tarball

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 "`<<quasi-native>>`" for more details.


[[backupoption]]
=== *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.

[[xoption]]
=== *debmake -x*

The amount of template files generated by the *debmake* command depends on the *-x*[01234] option.

* See "`<<emptypkg>>`" for cherry-picking of the template files.

NOTE: None of the existing configuration files are modified by the *debmake* command.
