in

Create Your Own Ubuntu Packages with GiftWrap

- - 1 comment
Most applications that you want on your Linux desktop are available as ready-made binaries. Distributions like Ubuntu and Fedora have become popular enough that most package developers have started shipping their packages as rpms and debs. However, there's always that one package that you want to install on your computer that is only available as a source release. For advanced users, installing a source release of an application is not a big problem. But, for novices it can be quite a daunting task. Also if you need to install the app in question on several computers it is easier to use a deb or rpm release.

GiftWrap is a really cool tool that helps you create Ubuntu packages. Whether you are a system administrator or a package developer, you can use GiftWrap to make the installation of these apps easier for your users. Let's take a close look at how to install it on your computer, and then how to use it to create a Debian package.

The GiftWrap package is not available in the default Ubuntu 9.10 repositories so you will need to add a repository before you can proceed. Execute the following command in a terminal window and enter your user's password to complete the step. Once it's done you will need to update the apt-get database with the second command.

$ sudo add-apt-repository ppa:giftwrap/ppa

$ sudo apt-get update

Installation.

When these steps are completed successfully you can launch the Ubuntu package manager - Synaptic. Search for the package "giftwrap" and install it along with all the dependencies that Synaptic suggests. Voila, your installation should soon be complete and GiftWrap should be installed on your computer.

To give you an idea of how the GiftWrap cycle works I'll run you through the steps of creating a deb package from a source release. I'll use one my favorite application for this purpose - dstat. I downloaded the source release from the project's website - http://dag.wieers.com/home-made/dstat/. Now launch GiftWrap from the application menu.

Application menu.

You will see the wizard window when you first launch the application. Hit forward button to proceed.

Wizard.

In the next step pick the package from your file system. Extract the downloaded package, go into the parent directory, and check the "Select the top source folder" option. Hit the Forward button.

Select package location.

Now comes the tricky part. You need to enter the some information about the package and yourself. Enter you name and email address under the packager section, then enter a description for the package itself. GiftWrap is smart enough to be able to get the package name and version.

Enter package info.

You might get some dependency related error messages. Worry not. Read the message patiently and figure out which packages are missing. Download them using the Synaptic Package Manager.

Error message.

Once you are done you will have a Debian package ready for installation. The software certainly is in need of some polishing, but once you get a hang of it, it can be a great way to distribute your applications.


This article was written by Sukrit Dhandhania for Tech Source.

1 comment

  1. If it can also generate a debian source package set (perhaps debhelper 7 compatible, which also greatly simplifies the rules files) that can be uploaded to a ppa or handed out to a debian or ubuntu maintainer to further polish up and officially integrate into a repository, it could be a generally useful thing indeed. If it only builds binary deb's, that would actually be rather unfortunate, though I imagine still rather useful for the stated purpose, especially at a 0.1 release :)

    ReplyDelete