A magyar változatot itt találja

Building proper Ubuntu packages through the example of wxMaxima

András Somogyi
15. February, 2010

Creative Commons License
Building proper Ubuntu packages through the example of wxMaxima
by András Somogyi
is licensed under Creative Commons Attribution-Non-commercial-Share alike 2.5 Hungary.

Preface

This document will guide the reader through the process of building proper Ubuntu packages. It shows the basis of package building in some steps through the example of maxima computer algebra system and it's interface, wxMaxima. More detailed guides can be found in the related articles of Ubuntu Wiki. We do not give a full, complete description, because of the complexity of the task, but we will give a good base to start.

There are many solutions to build packages, however, this one provides more possibilities and leads to a complete result. Packages built with devscripts are fully configurable, but other easier solutions like checkinstall and epm do not result in proper packages. This solution requires more work and reading, but think about it as an investment. We will see how proper, official packages are built. There are some cases where easier methods are suitable, since we do not need to build proper packages all the time. If we plan to publish the packages, they have to be of good quality.

Devscripts is a script collection made by Debian developers, which helps building and checking packages. Checking is provided by Lintian, which is also a Debian product, so if it does not find any mistakes, it is a good sign.


Packaging of wxMaxima


  1. Preparation

  2. Obtaining the source

  3. Preparing the orig.tar.gz

  4. Obtaining Debian files

  5. New changelog entry

  6. Building the source package

  7. Building the binary package

Packaging Maxima


WxMaxima is a frontend for maxima. Our new wxMaxima package is newer than the official, so it is possible that the maxima package provided by the distribution isn't compatible with it. In the next steps we will build a fresh maxima package.
Maxima is an application written in lisp. There are many lisp implementations available to build the package. This how-to uses sbcl.
Since the base of our new package comes from the Ubuntu repository, which is built with gcl, we need to apply some changes in the rules file. This can be found in the debian directory in the source directory and it is technically a makefile. We have to alter this file to use the sbcl (or other lisp implementations) to build the source. Let's see...

  1. Obtaining the source code and the debian directory. Preparation.

  2. Preparing the orig.tar.gz

  3. Obtain the Ubuntu source package.

  4. Necessary changes

  5. Building the source package

  6. Building the binary package

Using Ubuntu PPA

In this section we talk about uploading into the Ubuntu PPA, which helps distributing packages. Using PPA is very useful in many ways. Users can add our repository's deb-line to the sources.list. They will be warned as soon as we put new a package into it, and the installation is also easier. Our job will also be easier, the uploaded source package will be compiled to three architectures: i386, amd64 and lpia. The packages will be built on the build-servers, so only a source package is need to be uploaded. PPA has a quite good documentation and it is a must to read for anybody who wants to use PPA. This is just a brief guide.
Some notes before we start.

  1. Preparation

  2. Versions

  3. Building the source package

  4. Uploading

  5. Using PPA, from the user's viewpoint


I would like to thank the Institute of Mathematics and Computer Science, College of Nyíregyháza for their support in writing this guide. I owe special gratitude to Istvan Blahota for testing, helpful propositions and corrections.