Unix typical software installation package PKG production

zhaozj2021-02-17  48

PKG is a typical software installation on UNIX Now introducing PKG Using the use of PKG to build the package description file, the prototype (package information file) is an example: proto # this file is example for prototype # file pkgproto. = / usr / local # s /foo/bar/etc/mount=../etc/mount !prejectdir=/usr/local !Search / usr / local / bind none / usr / local / hzh 0644 root bini pkginfo = xixiInfoi / usr / local / xixi / version = Versiond None / usr / local / bin 0755 root bin! Default 644 root Otherf src / usr / local / bin / readme = src / ready 0755 root bin # 是 注 注Symbol #! Start is a command param = valueprejectdir = / usr / local # indicating setting an environment variable prejectdir # search Represents the command to join the PATH Search path # default means that the owner, permission and other settings # include # Others do not bring! Described by the following format PART FTYPE CLASS PATHNAME [MAJOR Minor] [MAJOR Minor Group] Part section Description, a package can be divided into several parts, such as 1 Driver 2 Develop env, which can be omitted, omitted 1FTYPE file Description B block device file C Character Device File d Directory F Standard file i installation information file # Two important files are version version Version and package description files Pkginfo (note pkginfo is keyword, while # 等The INFO file name, will introduce the method of using the file later. # depend action request can, Request is the file you execute before installing the package # In Request, you can add some temporary access to information (such as customer information) I Pkginfo = XixiInfoi Version = Versioni Deprond = depe ND L Connection File P Named Pipes S Sword Connection Class Description The path of SRC EXEC ... Pathname is located If it is a symbol connection, there will be path 2, for example: s /foo/bar/etc/mount=../etc / mountmajor minor is the main auxiliary number of the device file Mode Owner Group is the permissions user and group when it is created.

All files in all your packages must be created in the above way. Of course, there is a way to quickly create the file using pkgproto. = / Usr / local where the directory path indicating your source file / USR / local is to install path of

The PKGINFO file is an example of a PkgInfo, which describes the display information, version information, etc. of the package: Note that I use Hzhinfo to correspond to PkgInfo in the proto file, the PKGInfo, Arch = I386 hardware information PSTAMP = "YYMMDDHMM" # 出品 时间 PKG = " Instructions for "Name =" package "Version =" 3 "# version vendor =" Seller Information "Hotline =" hotline "email =" email "vstock =" 0122c3f5566 "category =" system.run "istates =" s 2 "RSTATES =" s 2 "can also define the basedir = standard path category = Class class = level DESC = package description information MAXINST = Maximum installation How many packages ... It is ready to make the above files can be made Packaged First, packet pkgmk-d / tmp -f proto said-O represents the file name of the existing package-D path or device (/ DEF / FD0) -f proto, if ## packaging completion. Indicates package Successfully built, you can now use pkgadd -d / TMP to try it.

When the installation success can be officially released, you can use pkgtrans / tmp/xixi.pkg all to create the / tmp after Xixi.pkg you can take the Xixi.pkg to move smoothly on other machines.

转载请注明原文地址:https://www.9cbs.com/read-28700.html

New Post(0)