This is a guide to building ipkg for the Zaurus Sharp ROM and distributing them as a feed.

Building a Package

  1. Create a directory somewhere on your drive, let's call it ipk, but you can choose anything
  2. Inside the directory create a directory called CONTROL
  3. On the Sharp ROM, everything gets installed in opt so create an opt directory
  4. Now create the paths on opt to all the files you wish to install, including the files
  5. Inside CONTROL create a text file called control, an example of which is given below. All the files you wish to install must be listed in control on the files line, separated by spaces
  6. Run the script with the target directory as the only argument
  7. Your ipkg file should be built

An example ipkg directory structure:


The example control file:

Files: opt/Qtopia/lib/ opt/Qtopia/lib/
Package: libexample
Priority: optional
Maintainer: A User 
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 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:

# make symlinks for library
ln -sf /opt/Qtopia/lib/ /opt/Qtopia/lib/
ln -sf /opt/Qtopia/lib/ /opt/Qtopia/lib/
ln -sf /opt/Qtopia/lib/ /opt/Qtopia/lib/
ln -sf /opt/Qtopia/lib/ /opt/Qtopia/lib/

A postrm script for our example:

# remove symlinks
rm /opt/Qtopia/lib/
rm /opt/Qtopia/lib/
rm /opt/Qtopia/lib/
rm /opt/Qtopia/lib/

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.

Building a Feed

  1. Create a directory on your webserver
  2. Upload all your ipks to the directory
  3. Run the script on the directory to create the Packages file

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.