How to create a .deb package for maemo without Scratchbox

The officially recommended way to create .deb packages for the maemo platform is to use dpkg-buildpackage within Scratchbox. For me, Scratchbox is a pain to install for two main reasons. First, there is no RPM package of the scratchbox environment, so apparently I need to run some scripts as root, let my system get a little messier, which I am not willing to do. Second, the docs advise to turn off SELinux in order to get the Scratchbox environment to work, which again I am not keen to do.

If you are using Debian or Ubuntu, there is probably a cleaner approach, but I am currently using Fedora, so I just rolled my own method using the command line. Copy the following files to your project directory:

Then rename deb_hand_example.mak to Makefile, and adjust the variables in this file to match your project.

Setup the required files (referenced in these makefiles) for packaging. There some pointers on this in the Python Maemo howto in the packaging section.

Note the ${PACKAGE_DIR}/data: ${SOURCE_DIR} target in the makefile. This must be modified to layout all files as you wish them to be installed on the target system. The example makefile rule should be a reasonable guide.

Then once you are ready, do ‘make PACKAGE_DIR= deb’ and if all goes well a shiny new deb package should be sitting in release_dir. If not, fix your settings in the Makefile, run ‘make clobber’ and then try again.

Filed under: maemo,N800 — twegener @ 14:40


  1. Hi, if you want we can aggregate your blog in planet maemo. Just send me your maemo.org userID

    Comment by Quim Gil — 2007-08-16 @ 19:03

  2. indeed the fact that the maemo sdk install is deb-only and requires root is really a pain in the [], and I hope that Nokia will realize for future versions that a generic installer that works on most (if not all) linux distros is better than a deb-only solution that doesn’t work at the majority of linux systems (at least not without pain)

    Comment by maemo_rookie — 2009-06-06 @ 19:10

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress