Packaging software

People who use your software generally don't need the hassle of compiling and installing it. What works on your machine might not work on theirs, for various reasons that you might not have thought of. You can overcome this and make your users' lives easier by distributing pre-compiled binaries. I've done this in two ways and found it pretty straightforward with great benefits to my codes.

Advantages of packaging

Things that are good about packaging your software and distributing it via package managements systems include:

Packaging for Ubuntu

I started off packaging my codes by creating a Personal Package Archive (PPA) at launchpad.net. There are many good guides to creating packages, and some of the ones I referred to are:

But what I found was that I kept getting errors which I did not understand. So here I will try to list some of those and how I solved them.

Common problems - building

The first thing to do before uploading a package to a PPA is to build it locally. debuild automates the build process; pdebuild additionally sets up a clean build environment. Read about that here. Some sources of problems at the build stage include:

Common problems - uploading

Once the package has been built you can upload it to the PPA with dput. Possible causes of failure here include:

Packaging for Debian

Packages in the main Ubuntu repositories are cloned from Debian, the distribution on which Ubuntu is based. Other distributions also clone the Debian repositories, so getting a package accepted into Debian is a good way to make it widely available. Doing this requires the following:

A message to the Debian Astro mailing list is a good way to request sponsorship for astronomy packages.