English Chinese (Traditional) (zh_TW)
Chapter 9. pkg-*
There are some tricks we have not mentioned yet about the [.filename]#pkg-*# files that come in handy sometimes.
To display a message when the package is installed, place the message in [.filename]#pkg-message#. This capability is often useful to display additional installation steps to be taken after a `pkg install` or `pkg upgrade`.
[.filename]#pkg-message# must contain only information that is _vital_ to setup and operation on FreeBSD, and that is unique to the port in question.
Setup information should only be shown on initial install. Upgrade instructions should be shown only when upgrading from the relevant version.
Do not surround the messages with either whitespace or lines of symbols (like `----------`, `**********`, or `==========`). Leave the formatting to man:pkg[8].
Committers have blanket approval to constrain existing messages to install or upgrade ranges using the UCL format specifications.
pkg-message supports two formats:
A regular plain text file. Its message is only displayed on install.
If the file starts with "`[`" then it is considered to be a UCL file. The UCL format is described on https://github.com/vstakhov/libucl[libucl's GitHub page].
Do not add an entry for [.filename]#pkg-message# in [.filename]#pkg-plist#.
UCL in pkg-message
The format is the following. It should be an array of objects. The objects themselves can have these keywords:
The actual message to be displayed. This keyword is mandatory.