[[boption]]
=== debmake -b

The *-b* option of the *debmake* command provides intuitive and flexible methods to customize packaging parameters in the *debian/control* file.  It sets the following stanza values.

* *Package:*
* *Architecture:*
* *Multi-Arch:*
* *Depends:*
* *Pre-Depends:*

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

*****
include::binary.txt[]
*****

Here are some typical multiarch package split scenarios for the following upstream source examples:

* a library source 'libfoo-1.0'*.tar.gz*
* a tool source 'bar-1.0'*.tar.gz* written in a compiled language
* a tool source 'baz-1.0'*.tar.gz* written in an interpreted language

[options="header", cols="3,2,3,2,8"]
|====
|'binarypackage'   |'type'   |*Architecture:*|*Multi-Arch:*	|Package content
|*lib*'foo1'	   |*lib*^*^ |any |same    |the shared library, co-installable
|*lib*'foo1'*-dbg* |*dbg*^*^ |any |same    |the shared library debug symbols, co-installable
|*lib*'foo'*-dev*  |*dev*^*^ |any |same    |the shared library header files etc., co-installable
|*lib*'foo'*-tools*|*bin*^*^ |any |foreign |the run-time support programs, not co-installable
|*lib*'foo'*-doc*  |*doc*^*^ |all |foreign |the shared library documentation files
|'bar'             |*bin*^*^ |any |foreign |the compiled program files, not co-installable
|'bar'*-doc*       |*doc*^*^ |all |foreign |the documentation files for the program
|'baz'             |*script* |all |foreign |the interpreted program files
|====

TIP: The binary package name starting with a ``*-*'' (hyphen) is treated as the abbreviated name.  The real binary package name is generated by attaching it to the source package name.

For the cases marked with ^*^ in the above table, the 'type' values are guessed right from the package names.

The default type is the *bin* type which means the compiled ELF binary executables.  This is why the example in <<simple>> does not specify *-b* option.

For programs written in other compiled languages, you may need to add its run-time library package dependency to the resulting binary package by adjusting the *Depends:* stanza of the *debian/control* file.

The development package for the shared library should depend on it and should contain a version numberless symlink to it. E.g.: */usr/lib/x86_64-linux-gnu/*'libfoo'*.so* -> 'libfoo'*.so.*'1'

NOTE: The *dbg* type package can be made either one-on-one for each *bin* and *lib* type package or one-on-all for all *bin* and *lib* type packages.
