Specifications

SHARP CORPORATION
Sharp SL-series Zaurus “Qtopia” Development Start-up Guide
Ver 1.11, February 28, 2003, 45/63
Once you’ve downloaded this tool (this tool is actually a command script), you should then extract this tool to the
directory where the PATH is enabled (such as /user/bin). The following is a basic usage of this tool. By executing
the above command, you will have the entire directory (
/home/(your user name)/(working directory)
)
included in the .ipk file:
$ cd /home/(your username)
$ ipkg-build (working directory the directories for ipk file are made)
3.1.6. ipkg Script
If needed, the package may include some scripts that will be involved by the package maintenance system. There
are four possible times a script will be run: just before the package is installed, just after the package is installed,
just before the package is removed, and just after the package is removed.
preinst
A script file that can be executed before ipk installation
postinst
A script file that can be executed after ipk installation
prerm
A script file that can be executed before ipk uninstallation
postrm
A script file that can be executed after ipk uninstallation
These scripts should be located in the CONTROL directory. The scripts should return 0 on success, (a non-zero
return value from preinst will prevent the package from being installed -- this can be useful in rare situations). The
scripts should not assume a tty is available so they may not prompt the user.
Each script file can be stated just like any other script file. The following is an example for a “
postinst
” file that
creates a “
data
” directory accessible by “user” privilege in
/home/
. This postinst file would be included in the
application ipk so that the directory would be created along with the application installation. Note that the variable
PKG_ROOT is set to the root of the package installation and can be used to refer to the packages contents in
their installed locations.
#!/bin/sh
mkdir /home/data
chmod +w /home/data