Building .deb package
The last step of our packaging course is building .deb package. Go to folder which we created on desktop and run following command:
This command will create all files which are needed for uploading our package to Launchpad. When prompted input your gpg password. As soon this process is finished you should have following files:debuild -S -sa
- hello_1.2.orig.tar.gz
- hello_1.2-ubuntu1.diff.gz
- hello_1.2-ubuntu1.dsc
- hello_1.2-ubuntu1_source.build
- hello1.2-ubuntu1_source.changes
Our package is ready for uploading on Launchpad, but we will make .deb file as well.
To create .deb file run following command:
sudo pbuilder build hello_1.2-ubuntu1.dscThis process is longer then previous processes so be patient. After it's done go to /var/cache/pbuilder/result and you'll see our .deb package.
We are done with our tutorial. Now you can upload your application running this command dput ppa:your_ppa <source.changes> and you are done.
I hope this tutorial was helpful, if you have any questions write down a comment and I'll answer you as soon as I can. Cheers.
Thanks for this nice and easy tutorial. I followed all the steps in this tutorial. But when I create a debian package or upload it to ppa, it does not contain binaries of my Qt application. Was it in your case too?
ReplyDeleteThanks.
If you successfully created Debian package then it must contain binary packages. To test your package simply run it and install your app. You should find Debian package in /var/cache/pbuilder/result/. I hope I helped.
ReplyDeleteHi Alen,
ReplyDeleteThanks for the reply. I did install .deb package. In my case I have configured the .pro file to install the binary in the /usr/local/bin directory, but after the installation, nothing is found there. I have uploaded it to ppa and the upload was successful. But upon installing nothing happens. You can also try:
My ppa repository: ppa:afaquejam/packaging
application name: packaging
Can you share your source package with the debian folder, on which I can try building the .deb package using pbuilder.
Thanks :)
Sorry, I made this tutorial 5 months ago so I deleted this source package which I used to write this tutorial. But I saved control file which I use whenever I need to package application, maybe you are missing some dependencies so you can use my control file: http://ubuntuone.com/1VFyysgeS5uI3CgM6KukRj. I will check your ppa later on.
ReplyDeleteHi Alen,
ReplyDeleteI figured out the problem. I was trying to install the binary to /usr/local/bin. That was causing the whole problem. When I changed it to /usr/bin everything worked as a breeze. Thanks :)
Cheers,
Afaque.
I'm glad you fixed your problem :)
ReplyDelete