[[joption]]
=== debmake -j

The generation of the functioning multi binary package always requires extra manual works than that of the functioning single binary package.  The test build of the source package is essential part of it.

For example, let's package the same 'package-1.0'*.tar.gz* (see <<simple>>) into a multi binary package.  At the line invoking the *debmake* command, let's invoke it with the *-j* option instead for the test building and the report generation.

----
 $ debmake -j
----

NOTE: The *-j* option for *debmake* invokes *dpkg-depcheck*(1) to run *debian/rules* under *strace*(1) to obtain library dependencies.  Unfortunately, this is very slow.  If you know the library package dependencies from other sources such as the SPEC file in the source, you may just run "*debmake* ..." without *-j* and ``*debian/rules install*'' to check the install paths of the generated files.

* Check the last lines of 'package'**.build-dep.log** to judge build dependencies for *Build-Depends*. (You do not need to list packages used by *debhelper*, *perl*, or *fakeroot* explicitly in *Build-Depends*.  This technique is useful for the generation of the single binary package, too.)
* Check the contents of 'package'**.install.log** to identify the install paths for files to decide how you split them into multiple packages.

----
 $ rm -rf package-1.0
 $ tar -xvzf package-1.0.tar.gz
 $ cd package-1.0
 $ debmake -b"package1:type1, ..."
----

* Update *debian/control* and *debian/*'binarypackage'**.install** files using the above information.
* Update other *debian/** files as needed.

----
 $ debuild
----

** Each 'binarypackage_version-revision_arch'**.deb** has files specified by the **debian/**'binarypackage'**.install** file.

