If the port needs to execute commands when the binary
package is installed with pkg add
or
pkg install
, use
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.
本文及其他文件,可由此下載: ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/。
若有 FreeBSD 方面疑問,請先閱讀
FreeBSD 相關文件,如不能解決的話,再洽詢
<questions@FreeBSD.org>。
關於本文件的問題,請洽詢
<doc@FreeBSD.org>。