FreeBSD Porter's Handbook
前一頁 | 章 8. The `pkg-`*`` files | 下一頁

# 8.4. `pkg-req`

If your port needs to determine if it should install or not, you can create a `pkg-req` ``requirements'' script. It will be invoked automatically at installation/de-installation time to determine whether or not installation/de-installation should proceed.

The script will be run at installation time by pkg_add(1) as `pkg-req ${PKGNAME} INSTALL`. At de-installation time it will be run by pkg_delete(1) as `pkg-req ${PKGNAME} DEINSTALL`.

前一頁 | 內容 | 下一頁
`pkg-deinstall` | 上一層 | Changing the names of `pkg-`*`` files

For questions about the FreeBSD ports system, e-mail <ports@FreeBSD.org>.
For questions about this documentation, e-mail <doc@FreeBSD.org>.