Exercise: The Debian Build System

Construct and install a package using the Debian build system.

We'll cover the following

Task

In this exercise, you are required to create a my-package_0.1_amd64.deb package using the Debian build system. To complete the task, you need to perform the following steps:

  1. You are given a C file that prints a welcome message. You are given a C file that prints a welcome message.

  2. In the Makefile file, add build and install targets so that the object file welcome is installed in the usr/bin directory.

  3. Make the necessary changes in the control, changelog, and rules files of the my-package/debian directory to build the my-package package.

  4. Set the compatibility and enter the dpkg-buildpackage command on the terminal. (Click “Show Hint” for the actual command.)

  5. After successfully building the Debian package, install the package using sudo dpkg -i <packagename> command.

  6. If your package is built and installed successfully, you may execute the welcome command to see the welcome message.

Get hands-on with 1200+ tech skills courses.