Hack 31 Create Your Own Klik Recipe 
Klik might be of interest
to you even if the application you need is not on the Knoppix CD.
Originally, klik
stood for "KDE-based Live Installer for
Knoppix," but it is not really limited to KDE or to
Knoppix. Currently, though, klik links work only
in native KDE applications such as Konqueror.
The klik server tells a
klik client where to download software from and
how to install it using klik recipes. A
klik recipe is required to install software
using klik, and is essentially a shell script
that tells the client where to obtain packages and what to do with
them. So, to install your own software using
klik, you must write your own recipe.
The best way to start writing klik recipes is to
learn from existing recipes. You can view sample
klik recipes in the point-and-klik software
store at http://klik.sf.net. Test
your shell script locally, and if it works, please contribute it to
klik.
Most Linux software is designed to look for files in places such as
/usr, /var,
/bin, /etc, and so on. In
order to make programs run in nonstandard locations,
klik has to run the software using a wrapper
script inside each application directory. Each
klik recipe has to create its own wrapper
script. Sometimes, application binaries even contain hardcoded paths.
In these cases, the software must be patched by
klik in order to change paths to point to the
local application directory. Luckily, KDE applications generally do
not use hardcoded paths.
Writing klik recipes by hand for every
application is a bit tedious; there should be a better way to manage
live-CD software installation. The idea behind
klik's
serverside-apt project is to automatically
generate klik recipes for all software in the
Debian distribution on the fly. There is a working development
version you can try by pressing Alt-F2 and entering:
klik://packagename
Replace packagename with the name of any
Debian package, such as bidwatcher (which is
known to work). If you are a programmer interested in advancing
serverside-apt, please contact the
klik development team.
—Simon Peter
|