This is a guide to building ipkg for the Zaurus Sharp ROM and distributing them as a feed.
An example ipkg directory structure:
/home/user/ipk
/home/user/ipk/CONTROL
/home/user/ipk/CONTROL/control
/home/user/ipk/opt
/home/user/ipk/opt/Qtopia
/home/user/ipk/opt/Qtopia/lib
/home/user/ipk/opt/Qtopia/lib/libexample.so.1.0
/home/user/ipk/opt/Qtopia/lib/libeg.so.1.0
The example control file:
Files: opt/Qtopia/lib/libexample.so.1.0 opt/Qtopia/lib/libeg.so.1.0
Package: libexample
Priority: optional
Maintainer: A User <auser@mydomain.com>
Architecture: arm
Section: libs
Version: 1.0
Description: Example libraries
In CONTROL you can also include pre and post installation scripts, post removal (uninstall) scripts. They should be called preinst, postinst, postrm. See ipkg-build.sh for more details. These are bash scripts that can do things like make symlinks for your library. Control scripts do not need to be listed in the Files manifest.
A postinst script for our example:
#!/bin/sh
# make symlinks for library
ln -sf /opt/Qtopia/lib/libexample.so.1.0 /opt/Qtopia/lib/libexample.so
ln -sf /opt/Qtopia/lib/libexample.so.1.0 /opt/Qtopia/lib/libexample.so.1
ln -sf /opt/Qtopia/lib/libeg.so.1.0 /opt/Qtopia/lib/libeg.so
ln -sf /opt/Qtopia/lib/libeg.so.1.0 /opt/Qtopia/lib/libeg.so.1
A postrm script for our example:
#!/bin/sh
# remove symlinks
rm /opt/Qtopia/lib/libexample.so
rm /opt/Qtopia/lib/libexample.so.1
rm /opt/Qtopia/lib/libeg.so
rm /opt/Qtopia/lib/libeg.so.1
Note that uninstalling the package will remove all the files listed in the manifest so there is no need to remove those files in the postrm script.
You can run the script on a local copy of the directory and upload the Packages file separately. Only include the latest version of each package.