Creating .deb packages with Checkinstall

Package

I am one of many who have had to compile a new version or some application which is not in your repositories, the problem with this is that when compiling in a directory application save your libraries and other files in the directory where you compiled it, and if we update the package looks like trash or if we delete the application folder it does not work anymore. "It is preferable to create a package and install it«, Yes, but not all of us are good with make, so I present to you checkinstall, which comes to facilitate the task.

Well, checkinstall it's nothing but a little wizard per terminal to create .deb packages. So we can compile and create packages to, for example, send them to our friends.

To start with, we have to install checkinstall. So we do (as root):

apt-get install checkinstall

And in an instant we will have it installed ... The next thing is to go to the binder in which we have the application code, and open a terminal. We execute the following commands, one by one:

./configure
make

With "./configure»The packages for our distribution are configured and a«makefile"(a file containing compilation instructions), and with "make»Compile the code and leave the binaries, libraries, etc. in the folder«src«. Now, before continuing, it is recommended not have installed the application from which the package will be made. If it is, do a:

sudo make uninstall

And then it's time to start with the important part, the use of checkinstall. In that same terminal, we write:

sudo checkinstall

And the «assistant"To checkinstall. In it we can modify information  which will have the package that we will create. The options that we can modify are:

  • maintainer- The main developer of the package.
  • Summary: a description of the package.
  • Name: name you want to give the package.
  • Version: package version.
  • Release: It is the main version of the package, we can leave it as it comes.
  • License: application license, it is preferable not to touch it.
  • GROUP: group for which it was created, we can leave it as is.
  • Brand: package processor architecture.
  • source location: name of the folder (only the folder, not the entire path) where the package code is.
  • Alternate source location: no need to modify it.
  • Requires: dependencies that must be installed for their correct operation.
  • provides: name of the package it provides, it is not necessary to modify it.
  • conflicts: packages with which it conflicts.
  • replaces: packages it replaces.
Creating a package with Checkinstall

Creating a .deb package with Checkinstall.

As you can see, we have a large number of options to modify. Each has a number on your left, so to edit it only we write your number and we press [Enter]. The ones that I usually modify are: maintainer, Summary, Name, Version, and maybe Requires.
Once we have modified what we want, we press [Enter] (without any previous number) and will start compile and install the package. When finished, in the directory where we compiled a .deb package application, ready to install 😉
Notes:
  • Make sure that in «Version", No. have letters. This usually prevents the package from being created.
  • It is possible that if you edit «Requires»Give them a failure, if it happens leave the space in white.
Well now you have no excuse not to create your own .deb packages. And tell me Do you usually create packages for your distro? How do you usually create packages in the distribution you use? I'm curious 😛

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   VisitnX said

    Just a small correction. Where it says that make is to create a Makefile is incorrect, said file is created by successfully executing ./configure, which checks our configuration as well as the dependencies required by the program to compile. Make takes this file and compiles leaving the binaries, libraries and others in the directories within the src. Make install is the one who sends it to the system and generates the links, for that reason make install must be executed as su.

    1.    auroszx said

      Thank you very much for clarifying, correcting the article.

  2.   Yoyo Fernandez said

    Perfect comes to me 🙂

    I have ever created a .deb for my Debian, as in the case of SMPlayer 0.8.0 which in the source package already comes with a script to do it so I did nothing, just run the xDD script

    I usually package software for Pardus because in PardusLife we ​​have our small repo of our community 😉

    I usually pack from a GUI program called PiSiDo, although lately I use the terminal a lot. Here I made a video-tutorial on how to pack with PiSiDo for Pardus 😉

    http://www.youtube.com/watch?v=sBYBSM7J3ec&hd=1

    regards

  3.   Windousian said

    I also use checkinstall, although I have tried some GUI tools that don't go bad at all (like Debreate).

  4.   Lithos523 said

    I always use checkinstall, more than anything, because when creating and installing the .deb, then it can be uninstalled with aptitude or with synaptic.
    In addition, you can always save the package in case you have to reinstall in the future or have to pass it on to a colleague.

  5.   Merlin The Debianite said

    Interesting although I have never had to compile in debian I will see if I do not get a deb lmms I will do it with secure checkinstall.

    Thanks for the post.

  6.   Speed ​​Cat said

    Very good article!
    I was not aware of CheckInstall. Thank you very much AurosZx. I don't know how I could have been without him so far.
    I just tested it with MovGrab, which I don't have on Debian and had compiled from source. Unfortunately it was too late to sudo make uninstall.
    From now on I will always use it.

  7.   Thunder said

    Sometimes the packages created with Checkinstall, when installed, do not create an entry in the menu, that is, you install some program.deb and then you go to look for the application in the menu and it does not appear, the solution to this is to create it manually.

    I use Checkinstall to package Photo, an image viewer made in Qt ^^

    Regards!!

    1.    auroszx said

      Conosco Photo is a very interesting project, which would look great with RazorQt 🙂

    2.    vicky said

      Probably limoo tmb, it is similar to photo. It is one of those who develop silicon empire

      http://getsilicon.org/limoo/

  8.   rogertux said

    What theme are you using?

    1.    auroszx said

      GTK (2 and 3): Zukitwo. Windows: elementary. Panel: Image that comes with Zukitwo theme 😛

  9.   molocize said

    Good contribution, congratulations

  10.   Achim said

    Great, I'll try this program, I used there to do the .deb that I needed.

    Greetings.

  11.   Oscar said

    Very interesting, I will take it into account, thanks for the contribution.

  12.   Stif said

    Thanks for the contribution, I want to start creating my own packages and this will be of great help to me. Thank you!

  13.   cr1ogen said

    I always create wine packages with checkinstall