I've grabbed the preinstall script from some other package, XBoard or so. It creates a directory structure for /usr/local on the memory you run the installer from. So if you run it from CF card, /usr/local will point to /media/cf/_local. This is done to overcome the iLiad's small internal memory and to have a central location for third party apps.

My simple receipe for creating ipk's: First I create the data.tar.gz holding the files, then I copy control.tar.gz and debian-control from some other project and adapt it for my needs , third I create the ipkg with ar (on Debian it's in the binutils package).