Make a Debian Package (.deb) from a Qt Project
I just made my package by following tutorial. I recommend running qmake
to create the Makefile
, so that you don't run into problems while executing dpkg-buildpackage
.
Steps
Assuming you have already setup the debian
directory in the source code,
- Copy the source directory (where the
.pro
file is) to your Home directory and rename it toyourProjectName_projectVersion
. - Open a terminal and execute
cd yourProjectName_projectVersion
. - Then, execute
dh_make -s -c gpl -e yourEmailAddress --createorig
- Finally, execute
dpkg-buildpackage
. You may get something likeerror exit status 255
, if so, check that thetar.xs
file in you Home folder matches the file requested bydpkg-buildpackage
(check the last lines of the output ofdpkg-buildpackage
to find out what file wants).
If you seek an easier and faster way, you can use Debreate (I did not test it, so I cannot assure you that it will work).
I hope this helps anyone who wants to distribute their Qt project.