Produces an installable package.
pkgmk [ -c ] [ -o ] [ -a Arch ] [ -b BaseDir ] [ -d Directory ] [ -f Prototype ] [ -l Limit ] [ -p PStamp ] [ -r RootPath ] [ -v Version ] [ Variable=Value ... ] [ PkgInst ]
pkgmk produces an installable package to be used as input to the pkgadd command. A package is a collection of related files and executables that can be independently installed. The package contents will be in directory structure format.
The pkgmk command uses the package prototype file as input and creates a pkgmap file. The contents for each entry in the prototype file is copied to the appropriate output location. Information concerning the contents (checksum, file size, modification date) is computed and stored in the pkgmap file, along with attribute information specified in the prototype file.
mkdir -p /home/myuser/example/pkgmk/sbin cp /usr/sbin/lsps /home/myuser/example/pkgmk/sbin cp /usr/sbin/lsuser /home/myuser/example/pkgmk/sbinThen, create the pkginfo file. In this example the pkginfo file is /home/myuser/example/pkgmk/pkginfo, which contains the following:
PKG="mypkgA" NAME="My Package A" ARCH="PPC" RELEASE="1.0" VERSION="2" CATEGORY="Application" PSTAMP="AIX 2001/02/05"Then, create the Prototype file, /home/myuser/example/pkgmk/prototype file which contains the following:
!search /home/myuser/example/pkgmk/sbin i pkginfo=/home/myuser/example/pkgmk/pkginfo d example /example 1777 bin bin d example /example/pkgmk 1777 bin bin d example /example/pkgmk/sbin 1777 bin bin f example /example/pkgmk/sbin/lsps 555 bin bin f example /example/pkgmk/sbin/lsuser 555 bin binThen, create the package with the above Prototype and pkginfo files using the pkgmk command:
pkgmk -d /tmp -f /home/myuser/example/pkgmk/prototypeThis produces the following output:
Building pkgmap from package prototype file ## Processing pkginfo file WARNING:parameter <CLASSES> set to "example" ## Attempting to volumize 5 entries in pkgmap Part 1 -- 218 blocks, 10 entries /tmp/mypkgA/pkgmap /tmp/mypkgA/pkginfo /tmp/mypkgA/root/example/pkgmk/sbin/lsps /tmp/mypkgA/root/example/pkgmk/sbin/lsuser ## Packaging completeThe newly created package named mypkgA now exists in /tmp/mypkgA.
0 | Successful completion of script. |
1 | Fatal error. Installation process is terminated at this point. |
99 | Internal error. |
/usr/sbin/pkgmk | Contains the pkgmk command. |
The installp command, pkgadd command, pkgask command, pkgchk command, pkginfo command, pkgparam command, pkgproto command, pkgrm command, pkgtrans command, tar command.
The pkginfo file format.
For information about preparing applications to be installed using the installp command, refer to Packaging Software for Installation in AIX 5L Version 5.2 General Programming Concepts: Writing and Debugging Programs.