Building the Application Package¶
About This Task¶
Once the application source builds properly locally, has been added to a working directory, and template files are created and updated using the debmake command, it is time to build the package with the debuild command as described in this procedure. This will create non-native application packages for use in other systems.
Before You Begin¶
You must have the necessary development tools installed. For details, see Development Tools Overview and Requirements
You must have a package directory with updated template files. For details, see Generating and Modifying Package Template Files.
Procedure¶
Navigate to the package working directory. For example:
$ cd fibonacci-1.0
Run the debuild command.
The debuild command will generate lots of output. Towards the end of the package build, it will provide a list of warnings based on the updates, or lack of updates, to the template files.
$ debuild -us -uc -ui ---Output truncated---
The command options ensure that the dpkg-source command checks for errors in an empty folder first. Then, the source code is compiled, which adds the binary to the packageDir/debian/fibonacci/bin/ folder. Finally, the dpkg-source command checks for errors. Providing there are no issues with the source code, the build completes successfully.
Review the output warnings and make any recommended changes to the template files in the packageDir/debian folder. Once complete, rerun the debuild command with options to clear-up the warnings. Repeat this process until all issues are resolved to meet your development needs.
Review the output files.
The generated output files comprise your Debian-specific package build. For example
$ cd .. $ tree -FL 1 / ├── fibonacci-1.0/ ├── fibonacci_1.0-1_amd64.build ├── fibonacci_1.0-1_amd64.buildinfo ├── fibonacci_1.0-1_amd64.changes ├── fibonacci_1.0-1_amd64.deb ├── fibonacci_1.0-1.debian.tar.xz ├── fibonacci_1.0-1.dsc ├── fibonacci_1.0.orig.tar.gz -> fibonacci-1.0.tar.gz ├── fibonacci-1.0.tar.gz └── fibonacci-dbgsym_1.0-1_amd64.ddeb
Each file serves a specific purpose:
fibonacci_1.0-1_amd64.build is the build log file
fibonacci_1.0-1_amd64.buildinfo is the metadata file created by the dpkg-genbuildinfo command
fibonacci_1.0-1_amd64.changes is the metadata file for the Debian package
fibonacci_1.0-1_amd64.deb is the new binary package
fibonacci-dbgsym_1.0-1_amd64.ddeb is the debug symbol binary package for use in debugging
fibonacci_1.0-1.debian.tar.xz includes the maintainer generated contents
fibonacci_1.0-1.dsc is the package source metadata file
fibonacci_1.0.orig.tar.gz is a symlink to the upstream tarball file
Results¶
Once run successfully, the debuild command creates multiarch binaries for use in other Linux architectures. The next step is to verify the package installs successfully. For details, see Testing New and Updated Packages.