Adding a new program
From GeeXboX wiki
Adding a new program is really easy thanks to the use of our toolchain that do most of the hard stuff for you.
This way you don't even need to care about the compiler to use or compilation flags to be passed, neither about how to link against the uClibc library. Everything is done automatically.
Thus, simply follow the instructions from the Adding a new package page.
Here's an example for adding the nvtv program (yes, it already has been added ;-)
Build Rules
The following lines are taken from the build script of the nvtv package :
#!/bin/sh . config/options
It includes the GeeXboX toolchain configuration.
$SCRIPTS/build toolchain $SCRIPTS/build pciutils
Ensures that the toolchain and pciutils packages have been build before as they're required to build nvtv.
cd $BUILD/nvtv*
./configure --host=$TARGET_NAME \
--build=$HOST_NAME \
--without-x \
--without-gtk \
--with-wx-config=nowx \
--without-xbox \
--without-client-backend
make
Configure the build script and starts the compilation.
It is highly recommended that you add each configure option to a single line (appended with a trailing \ character) as it's a patch-friendly representation.
Note the use of the $TARGET_NAME and $HOST_NAME variables to be passed to configure.
It has to be done for each package to tell it that we want to build against the uClibc.
You can have a look at the config/path file for a complete list of exported variables that can be passed to compilation scripts.
Install Rules
The following lines are taken from the install script of the nvtv package :
#!/bin/sh . config/options
It includes the GeeXboX toolchain configuration.
cp $BUILD/nvtv*/src/nvtv $INSTALL/usr/bin
This is where the compiled binary is finally copied to the ISO.
As GeeXboX is a minimalistic distribution, only the really required files are copied to the ISO.
There's no place for documentation files or man pages.
Call for Install
Your package install script has to be called from somewhere in order to take place in the ISO when you'll finally do the overall make command.
Most of the times, the ./scripts/gentree' is the right place to add such packages install scripts calls.
This file contains for example :
$SCRIPTS/install linux modules $1 $SCRIPTS/install alsa $1 $SCRIPTS/install tvout $1 ...
But you can also call for an install from other install scripts.
In our example, the nvtv package installation is done by the tvout package install script :
$SCRIPTS/install atitvout $SCRIPTS/install nvtv $SCRIPTS/install s3switch $SCRIPTS/install i810tvout
which is a meta-package dedicated to TV-Out gathering all tvout related packages.
In conclusion, whatever the place you call from the install script of your package, it has to be done somewhere in order to have it included it the resulting ISO.

