wiki:Howto get my application in the SHR feed

First Step: Setup Routine

As a first step you need to integrate a setup routine in your source code, e.g. autotools (C, C++) or distutils (python)

It's important, that this setup can be used for crosscompilation. So it has to recognize enviroment variables like $CC, $CFLAGS ...

Some information for beginners is avaliable at Developing your own applications

Second Step: Bitbake Recipe

The second step is to create a bitbake recipe for your application.

In the simplest case this are just 3 lines (in case of autotools as setup routine, for distutils replace autotools by distutils):

SRC_URI = "http://yourdomain.org/yourapp-${PV}.tar.gz"
DEPENDS = "your depencies as bitbake recipe names seperated by whitespaces"
inherit autotools

${PV} contains the version of the package, bitbake recives it from the filename of your bb file like that: app-name_version.bb, so everything after the _ and before the .bb is the version of your app.

A small guide for bitbake recipes can be found in the  openmoko wiki

 How-to: create good recipe

Third Step: Test The Recipe

After creating a recipe it has to be tested. For this you have to setup the SHR OpenEmbedded? enviroment like discribed in the first three steps of Building SHR As a short summary:

mkdir shr; cd shr
wget http://shr.bearstech.com/Makefile
make setup

Note: Don't move this folder after you have created it as this currently causes problems.

Now goto shr-unstable/openembedded/recipes directory and create a directory for your application (usally named like your application), or if you have just a small openmoko specific app put it into the openmoko-3rdparty directory. Now go back to the shr-unstable directory and do this to build your package:

. ./setup-env
bitbake yourapp

(yourapp is the part of the filename before the version part)

If the build process went through, copy the package to your Phone and install it. Look if everything works as expected and if all files are included.

Fourth Step: Send Recipe To SHR

Now you can send your recipe to the SHR-devs. The best way is to send a patch with  git-send-email to shr-devel [at] lists.shr-project.org.

Commits should follow policy defined here:  Commit policy  Commit log example

Don't forget to setup your name and email, before commits:

git config user.name "Your Name"
git config user.email "you@name"
git config sendemail.to "shr-devel@lists.shr-project.org"

To do so, follow these commands:

# Create your package in shr-unstable/openembedded/recipes/
$ ls -l openembedded/recipes/yourapp
-rw-r--r-- 1 user group 363 2009-11-20 08:31 yourapp.bb
drwxr--r-- 1 user group 171 2009-11-20 08:31 files
# Add the package to the git cache
$ git add openembedded/recipes/yourapp
# Commit the change
$ git commit -s openembedded/recipes/yourapp
# Create a diff
$ cd openembedded/
# If you have more than one change, use -2 or -3 or -however many changes
$ git format-patch -1 -M --find-copies-harder
# Now send the E-Mail, replace PATCHNAMES with actual filenames
$ git send-email PATCHNAMES

Getting Help

More documentation on  OpenEmbedded wiki

If you need help with one of those steps or if you can't do one of them then just ask at the shr-devel mailing list or in the #openmoko-cdevel IRC channel on freenode