Every share package is in a subdirectory of the directory pkg which
itself is a subdirectory of a GAP root directory
(see GAP Root Directory). This directory is
called the home directory of the share package. The name of this
directory is the name of the share package.
The home directory of the share package must contain a file
init.g. This file contains the necessary GAP code to set up all
that the share package needs. Section The Init File of a Share Package explains how such an init file must look. If declaration
and implementation are separated (see Declaration and Implementation Part) or if completion (see Package Completion) is used
there also will be a second file read.g which reads in
further files.)
In addition, the home directory can contain other files and subdirectories. It is usually a good idea to follow the general example of the subdirectory structure of the GAP root directory. Although this is not strictly necessary, it makes it easier to look through a share package and some administrative functions for share packages rely on it.
Typically there are at least two subdirectories called lib and
doc. The first contains files with GAP code and corresponds to
the GAP library directory. The second contains the manual and
documentation of the share package.
If the share package has stand-alone programs, it should have a
subdirectory called bin that contains the executables. This
directory is subdivided into several others. Refer to section
Standalone Programs in a Share Package on stand-alone programs for a
more detailed explanation. In this case there might also be a
directory called src containing the source code of the stand-alone
programs and instructions for their compilation.
GAP 4 manual