Build a package from

  Last modified on Sunday 16 July 2017

PROJECT: The Lifecycle of Debian Objects .: A package for the Qt configuration utility qt5ct is not available in the Debian archives but a "debianized" version is available through, a service where Debian developers sponsor (usually source) packages uploaded by non-Debian developers.

This qt5ct package contains a .dsc (Debian Source Control) text file that describes the source package. I use this file to build a qt5ct-VERSION.deb binary package ready to be installed!

Let's go!

All packages are signed with public key encryption. Ensure the build machine is setup with GnuPG: Verify a PGP signature with GnuPG

0. Build tools

Devscripts is a collection of tools for Debian developers. Install ...

$ sudo apt install devscripts

1. Import key

Search for the package uploader's public key ...

$ gpg --keyserver hkps:// --search-keys
gpg: data source:
(1)     Mateusz Łukasik <>
          2048 bit RSA key CCD91D6111A06851, created: 2012-01-26
Keys 1-1 of 1 for "".  Enter number(s), N)ext, or Q)uit > n

Import the key from the keyserver ...

$ gpg --recv-keys CCD91D6111A06851
gpg: key CCD91D6111A06851: "Mateusz Łukasik <>" not changed
gpg: Total number processed: 1
gpg:              unchanged: 1

Display the keyring containing our new key ...

$ gpg --list-keys
pub   rsa2048 2012-01-26 [SC]
uid           [ unknown] Mateusz Łukasik <>
sub   rsa2048 2012-01-26 [E]
sub   rsa2048 2012-01-26 [E]

Setup the dscverify tool from devscripts to use my personal gpg keyring ...

$ cp /etc/devscripts.conf ~/.devscripts

... and in ~/.devscripts I activate the option DSCVERIFY_KEYRINGS="" and specify my keyring location (DSCVERIFY_KEYRINGS="~/.gnupg/pubring.kbx").

2. Build-Depends

Take note and install any packages required to build the source package that are listed in the *.dsc file (qt5ct_0.31-2.dsc) ...

Build-Depends: debhelper (>= 10), qtbase5-dev, libqt5svg5-dev, qttools5-dev-tools, qtbase5-private-dev, libfontconfig1-dev, libfreetype6-dev, libglib2.0-dev, libxrender-dev, libmtdev-dev [linux-any], libegl1-mesa-dev

Install ...

$ sudo apt install debhelper qtbase5-dev libqt5svg5-dev qttools5-dev-tools qtbase5-private-dev libfontconfig1-dev libfreetype6-dev libglib2.0-dev libxrender-dev libmtdev-dev libegl1-mesa-dev

3. Build and install

Use dget to download the source and debuild to build the *.deb file ...

$ dget
$ cd /path/to/extracted/package
$ debuild -us -uc

Package qt5ct_0.31-2_amd64.deb is built and placed one directory up from the current build directory. Install using dpkg ...

$ sudo dpkg -i qt5ct_0.31-2_amd64.deb

If dpkg exits with an error message about dependencies, install the missing ones and run the command again.

Links: How do I install a package from and Structure of a source package

Happy hacking!

More • qt5ctqtshelldebianlinuxcrypto