English Chinese (Traditional) (zh_TW)
A regular plain text file. Its message is only displayed on install.
All the names of [.filename]#pkg-\*# are defined using variables that can be changed in the [.filename]#Makefile# if needed. This is especially useful when sharing the same [.filename]#pkg-*# files among several ports or when it is necessary to write to one of these files. See <<porting-wrkdir,writing to places other than `WRKDIR`>> for why it is a bad idea to write directly into the directory containing the [.filename]#pkg-*# files.
Changing the Names of [.filename]#pkg-*#
Chapter 9. pkg-*
Committers have blanket approval to constrain existing messages to install or upgrade ranges using the UCL format specifications.
Display a Message on Install/Deinstall
Display a Message on Upgrade
Do not add an entry for [.filename]#pkg-message# in [.filename]#pkg-plist#.
Do not surround the messages with either whitespace or lines of symbols (like `----------`, `**********`, or `==========`). Leave the formatting to man:pkg[8].
Example of a good [.filename]#pkg-message.in#:
Here is a list of variable names and their default values. (`PKGDIR` defaults to `${MASTERDIR}`.)
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].
If the port needs to execute commands when the binary package is installed with `pkg add` or `pkg install`, use [.filename]#pkg-install#. This script will automatically be added to the package. It will be run twice by `pkg`, the first time as `${SH} pkg-install ${PKGNAME} PRE-INSTALL` before the package is installed, and the second time as `${SH} pkg-install ${PKGNAME} POST-INSTALL` after it has been installed. `$2` can be tested to determine which mode the script is being run in. The `PKG_PREFIX` environmental variable will be set to the package installation directory.
Making Use of `SUB_FILES` and `SUB_LIST`
Multiline strings use the standard here document notation. The multiline delimiter _must_ start just after `<<` symbols without any whitespace and it _must_ consist of capital letters only. To finish a multiline string, add the delimiter string on a line of its own without any whitespace. The message from <<porting-message-ucl-short-ex>> can be written as:
Note that for this example, [.filename]#pkg-message.in# must exist in `FILESDIR`.
Now it is time to configure this package.
Copy %%PREFIX%%/shared/examples/putsy/%%ARCH%%.conf into your home directory
as .putsy.conf and edit it.
Only if `type` is `upgrade`. Display if upgrading from a version stictly greater than the version specified.
Only if `type` is `upgrade`. Display if upgrading from a version strictly lower than the version specified.
SUB_FILES= pkg-message