| [Index] [About] |
| |||||||
|
||||||||
Whilst it looks complex from the outside, build-pkg is relatively simple to use in day-to-day usage.
For example to create a package for gcc and friends (i.e. g++, g77, etc) under Solaris 8 all I did was to:
Type the following command:
% simple-proj
Whilst not an essential command, this will prepare an InstallPackage directory and place a number of package script files within it. Currently these are postinstall and postremove scripts which will re-build the manual page windex in the /usr/local/man manual tree where manual pages will be installed.
Doing this will ensure that any manual pages installed by the package will be available immediately after package installation.
Type the following command:
% build-pkg -c gnu -p GNUgcc -F gmake install
In the top level directory of gcc. After answering questions relating to the contents of the pkginfo file, build-pkg goes away and builds the package for me.
The use of the -c option to add "gnu" to the package category and -p to make the package name default to "GNUgcc" are due to specific settings in my $HOME/.build-pkg file. However even if you do not have a .build-pkg file it can be useful to specify these on the command line
Note that the -F option to build-pkg is to ensure that all of the files installed by gcc have the correct permissions; there are a number of include files installed by gcc which end up with a file mode of 0600 even when a file creation mask (aka the umask) of 022 is used.
Become root and typed in:
# pkgadd -d InstallPackage/GNUgcc-v3.0.3-i386.pkg GNUgcc
And watched whilst the package was installed.