Solaris
mkpkg tools
The way to build solaris pkg is as follows.
- build binaries of the software, and install it to the empty temporary directory.
- create a pkginfo file, which has package informations such as pacakge name, application name, version and so on.
http://docs.sun.com/app/docs/doc/816-5174/6mbb98uic?a=view
- create a prototype file, which include file list of the package,
- create package by pkgmk command
- (option) create one package file by pkgtrans command.
- (option) compress it by gzip or bzip2
It is a little difficult, so I made shell scripts, mkpkg tools, to support to build solaris pkgs. I feel that it does not need licenses, but if needs,
this is under meta licensing, CDDL or GPL(V2 or later) :-)
- mkpkg.zip
last updated 01/17/2008 : added initialization of GROUP variable into mkproto. thanks, J.J.
mkpkg.zip includes 3 files, mkpkg, mkpinfo, mkproto .
These commands uses only a minimum parameters, so if you want to build customized solaris pkgs, you should not use this commands.
If you want to build solaris pkg easily, the way to build solaris pkg by mkpkg command is as follows.
- build binaries of the software, and install it to the empty temporary directory. (e.g. /tmp/work)
- change directory to the installation directory (e.g. # cd /tmp/work)
- run mkpkg command
The way to build a solaris pkg of lg3d is as follows.
# mkdir /tmp/work
# cd /tmp/work
# gunzip -c lg3d-fcs-rel-0-8-0-solaris-i86pc-0605121113.tar.gz | tar xvf -
#
# mkpkg lg3d-0.8.0-x86-pkg -p LG3D -n "Project Looking Glass" -v "0.8.0" -a "i86pc" -b "/opt" -vd "lg3d-core team" -g
The following messages are usage of these commands.
mkpkg : command to make a Solaris pkg
Usage of mkpkg
> mkpkg output [-g] [-user <username>] [-group <group>]
-p <pkg> -n <name> -v <version> -a <arch> [-c <category>]
[-b <basedir>] [-d <description>] [-vd <vendor>] [-o <flag>...]
output : output file name
[Details of Option]
-g : create gzipped package
-p <pkg> : package name (ex. SUNWgcc)
-n <name> : application name (ex. gcc)
-v <version> : application version (ex. 4.2.0)
-a <arch> : architecuture, i86pc,sun4u...
-c <category> : category of the application (ex. system, application, GNOME2)
(default = appilcation)
-b <basedir> : base directory of the application (default = /)
-d <description> : package description
-vd <vendor> : vendor name (default = unknown)
-o <flag> : if you want to add other flags, please use it
(ex. -o "SUMW_PRODNAME=SunOS" -o "SUNW_PRODVERS=5.10"
mkpinfo : command to make a pkginfo file
Usage of mkpinfo
> mkpinfo -p <pkg> -n <name> -v <version> -a <arch> [-c <category>]
[-b <basedir>] [-d <description>] [-vd <vendor>] [-o <flag>...]
[Details of Option]
-p <pkg> : package name (ex. SUNWgcc)
-n <name> : application name (ex. gcc)
-v <version> : application version (ex. 4.2.0)
-a <arch> : architecuture, i86pc,sun4u...
-c <category> : category of the application (ex. system, application, GNOME2)
(default = appilcation)
-b <basedir> : base directory of the application (default = /)
-d <description> : package description
-vd <vendor> : vendor name (default = unknown)
-o <flag> : if you want to add other flags, please use it
(ex. -o "SUMW_PRODNAME=SunOS" -o "SUNW_PRODVERS=5.10"
mkproto : command to make a prototype file
Usage of mkproto
> mkproto [Option]
[Details of Option]
Default : User = root, Group = other
-u <user> : set user
-g <group> : set group