This is a guide to building ipkg for the Zaurus Sharp ROM and distributing them as a feed.
ipk
, but you can choose anythingCONTROL
opt
so create an opt
directoryopt
to all the files you wish to install, including the filesCONTROL
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 spacesAn 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 UserArchitecture: 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.
Packages
fileYou 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.