Maemo packaging quick start guide

(Initial version of simplified packaging guide - perhaps a duplicate.)
(Merge with Packaging page)
Line 1: Line 1:
-
 
+
#REDIRECT [[Packaging]]
-
''Note: The main goal of this page is to provide someone with a very quick way to get from source code to distributed package, and to aggregate links to more in-depth information. Please keep things simple here.''
+
-
 
+
-
== Prerequisites ==
+
-
 
+
-
We assume here that you have a software package which you have developped, and which can be installed from source using a standard <pre>./configure; make; sudo make install</pre> process.
+
-
 
+
-
For the purposes of our article, we will be packaging a simple command-lie utility called "rot13", which will perform a simple [http://en.wikipedia.org/wiki/ROT13 rot13] cipher on all text input from stdin.
+
-
 
+
-
== Packaging a .deb ==
+
-
 
+
-
The easiest way to package a .deb file is to use Debian's build helpers.
+
-
 
+
-
Package your application as you would distribute it in a .tar.gz (when using autotools, this is done with "make distcheck"). In our example, we uncompress rot13-0.1.tar.gz, and change the current directory to rot13-0.1.
+
-
 
+
-
$ tar xfz rot13-0.1.tar.gz
+
-
$ cd rot13-0.1
+
-
 
+
-
Then we run dh_make, which initialises the Debian package management file structure (among other things):
+
-
$ dh_make -e <my email address> -f ../rot13-0.1.tar.gz -c GPL
+
-
 
+
-
You can of course choose a different licence for your package.
+
-
 
+
-
Answer the resulting questions - in this case, we are packaging a single binary.
+
-
 
+
-
We can now edit the files in the debian/ directory which has been created to their desired values, before packaging the software. In fact, we can delete many of these files. All of the files ending in ".ex" or ".EX" and example files, intended to help you package different types of software.
+
-
 
+
-
If you use a standard configure script, you do not need to moduify any files in here at all.
+
-
 
+
-
Before creating a .deb, you should set a changelog entry. .deb changelogs follow a special format, so rather than editing the files by hand, use the dch helper application. This will allow you to add what new features went into this application, give credit, and so on. On saving, a syntax check is performed which ensures that the resulting file is OK. The file format is completely documented in the [http://www.debian.org/doc/maint-guide/ Debian packaging guide].
+
-
 
+
-
Finally, we generate a .deb from the source code using the command
+
-
dpkg-buildpackage -sa -rfakeroot -k<my email address>
+
-
 
+
-
You should now have several files created in the parent directory to where you unpacked the source code. I have;
+
-
 
+
-
rot13_0.1.orig.tar.gz
+
-
rot13_0.1-1_i386.deb
+
-
rot13_0.1-1.diff.gz
+
-
rot13_0.1-1.dsc
+
-
rot13_0.1-1_i386.changes
+
-
 
+
-
Now change the target architecture to ARMEL and rebuild it, to generate rot13_0.1-1_arm.deb
+
-
 
+
-
== Uploading to extras ==
+
-
 
+
-
TODO.
+
-
 
+
-
 
+
-
See also [[Documentation/Maemo 5 Developer Guide/Packaging, Deploying and Distributing | Deploying and distributing software on Maemo 5]] and [http://www.forum.nokia.com/Tools_Docs_and_Code/Documentation/Maemo.xhtml Forum Nokia developer documentation].
+
-
 
+
-
 
+
-
[[Category:Development]]
+

Revision as of 16:30, 26 January 2010

  1. REDIRECT Packaging