The pkg-* Files
+ pkg-*
- There are some tricks we have not mentioned yet about the
- pkg-* files that
+ There are some tricks we have not mentioned yet about
+ pkg-* that
come in handy sometimes.pkg-message
- If you need to display a message to the installer, you may
+ To display a message to the user installing the package,
place the message in pkg-message. This
capability is often useful to display additional installation
steps to be taken after a pkg install or to
display licensing information.When some lines about the build-time knobs or warnings
- have to be displayed, use ECHO_MSG. The
- pkg-message file is only for
+ have to be displayed, use ECHO_MSG.
+ pkg-message is only for
post-installation steps. Likewise, the distinction between
- ECHO_MSG and ECHO_CMD
- should be kept in mind. The former is for printing
- informational text to the screen, while the latter is for
+ ECHO_MSG is for printing
+ informational text to the screen and ECHO_CMD
+ is for
command pipelining:update-etc-shells:
@@ -41,7 +41,7 @@
@${RM} /etc/shells.bak
- The pkg-message file does not need
+ pkg-message does not need
to be added to pkg-plist.
@@ -49,10 +49,10 @@
pkg-install
- If your port needs to execute commands when the binary
+ If the port needs to execute commands when the binary
package is installed with pkg add or
- pkg install you can do this via the
- pkg-install script. This script will
+ pkg install use
+ pkg-install. This script will
automatically be added to the package, and will be run twice by
pkg the first time as ${SH}
pkg-install ${PKGNAME} PRE-INSTALL before the
@@ -84,19 +84,18 @@
Changing the Names of
- pkg-*
- Files
+ pkg-*All the names of
- pkg-* files are
- defined using variables so you can change them in your
+ pkg-* are
+ defined using variables that can be changed in the
Makefile if need be. This is especially
- useful when you are sharing the same
- pkg-* files
+ useful when sharing the same
+ pkg-*
among several ports or have to write to one of the above files
(see writing to places other than
WRKDIR for why it is a bad idea to
- write directly into the
+ write directly into
pkg-*
subdirectory).
@@ -147,15 +146,15 @@
Making Use of SUB_FILES and
SUB_LIST
- The SUB_FILES and
- SUB_LIST variables are useful for dynamic
+ SUB_FILES and
+ SUB_LIST are useful for dynamic
values in port files, such as the installation
PREFIX in
pkg-message.
- The SUB_FILES variable specifies a list
+ SUB_FILES specifies a list
of files to be automatically modified. Each
- file in the
+ file in
SUB_FILES list must have a corresponding
file.in present
in FILESDIR. A modified version will be
@@ -163,14 +162,14 @@
${WRKDIR}/file.
Files defined as a value of USE_RC_SUBR (or
the deprecated USE_RCORDER) are automatically
- added to the SUB_FILES. For the files
+ added to SUB_FILES. For the files
pkg-message,
pkg-install, and
pkg-deinstall, the corresponding Makefile
variable is automatically set to point to the processed
version.
- The SUB_LIST variable is a list of
+ SUB_LIST is a list of
VAR=VALUE pairs. For each pair
%%VAR%% will get replaced with
VALUE in each file listed in
@@ -182,15 +181,15 @@
line beginning with @comment will be deleted
from resulting files after a variable substitution.
- The following example will replace
+ This example will replace
%%ARCH%% with the system architecture in a
pkg-message:SUB_FILES= pkg-message
SUB_LIST= ARCH=${ARCH}
- Note that for this example, the
- pkg-message.in file must exist in
+ Note that for this example,
+ pkg-message.in must exist in
FILESDIR.Example of a good