wiki:Howto get my application in the SHR feed

Version 6 (modified by Heinervdm, 8 years ago) (diff)

files should be included in subdirectory files or ${PN}

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 recognice enviroment variables like $CC, $CFLAGS ...

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

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:

wget http://shr.bearstech.com/Makefile
make setup

Now goto shr-unstable/openembedded/recipe 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. To do so, follow these commands:

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

Getting Help

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