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:
-
You are given a C file that prints a welcome message. You are given a C file that prints a welcome message.
-
In the
Makefile
file, add build and install targets so that the object filewelcome
is installed in theusr/bin
directory. -
Make the necessary changes in the
control
,changelog
, andrules
files of themy-package/debian
directory to build themy-package
package. -
Set the compatibility and enter the
dpkg-buildpackage
command on the terminal. (Click “Show Hint” for the actual command.) -
After successfully building the Debian package, install the package using
sudo dpkg -i <packagename>
command. -
If your package is built and installed successfully, you may execute the
welcome
command to see the welcome message.
Get hands-on with 1400+ tech skills courses.