

Where directory is the directory you have created. 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. The scripts can assume a tty is available so they may prompt the user. The scripts should return 0 on success, (a non-zero return value from preinst will prevent your package from being installed - this can be useful in rare situations). These scripts are named preinst, postinst, prerm, and postrm and should be located in the CONTROL directory. There are four possible times a script will be run: just before your package is installed, just after your package is installed, just before the package is removed, and just after the package is removed. If needed your package may include some scripts that will be invoked by the package maintenance system. This will prevent the package management system from automatically overwriting configuration changes when the user upgrades the package. If your package has any configuration files, then create a file CONTROL/conffiles which lists the absolute path of each configuration file, (as it will appear on the installed system), one per line. The meaning of each of the fields will be given later in this document. Required fields are Package, Version, Architecture, Maintainer, Section, Priority and Description. Inside CONTROL create a file named "control" with lines of the form "Field: value". Here's a short and incomplete guide to building packages for the Ipkg package management system:Ĭreate the directory structure and files as you want them appear on the installed system.Ĭreate a directory named CONTROL at the top-level of this directory structure.
