The past few days I have been trying, without success, to create a deb package for a programme with a Qt interface. The previous steps I have done so far:
- Created a gpg key and registered it at Launchpad;
- Identified myself with the
DEBEMAIL
andDEBFULLNAME
variables in~/.bashrc
; - Checked out the source code from GitHub;
- Successfully built the programme (it uses
qmake
to generate aMakefile
), identifying all its dependencies; - Created a source folder including the
Makefile
, plus a.desktop
file and an.xpm
icon. - Created a tarball from this folder named packagename-version.tar.gz.
With this preparatory work I have tried to follow two different guides:
-
The official Ubuntu packaging guide – it concludes successfully, but the final
.deb
file only includes thedoc
folder. -
A more detailed guide from xpressrazor – which fails when running
debuild
, with the following cryptic messages:make: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2
debuild: fatal error at line 1364:
dpkg-buildpackage -rfakeroot -D -us -uc failed
These and other guides out there invariably present simple examples where the programme to package is composed by a single source file (sometimes it is only a bash script). I suspect they are too simplistic for a proper programme with an elaborate GUI. In this case, what are the precise steps from dh_make
onwards?
Update I: I posted to PasteBin an anonymised version of the full debuild
output.
Update II: The debuild output, now with DH_VERBOSE=1
.
Best Answer
As it happens,
dh
can not possibly be used to package a Qt programme in the traditional way presented in most guides and tutorials out there. More specifically, therules
file must be informed of which snippets it must use to include in the finalMakefile
.One way of achieving this is using the
cdbs
package:sudo apt-get install cdbs
Then the
rules
file must be edited to include the snippets from this package:These should be the only contents in the
rules
file, any direct references todh
must be removed or commented out.At this time,
debuild
should be operational, it can be run like:debuild -S