5.5. scripts/*

This directory contains any files that are necessary for configuration of your software, etc. If a script with any of the following names is present, it will be executed at the appropriate time during the build process:

  pre-fetch          post-fetch
  pre-extract        post-extract
  pre-patch          post-patch
  pre-configure      post-configure     configure
  pre-build          post-build
  pre-install        post-install
  pre-package        post-package
  

Note that you should not define a pre-* or post-* target in the Makefile which executes the matching scripts/{pre|post{-* script. bsd.pkg.mk runs any existing Makefile target first, then searches for scripts/* and runs it using sh(1). Running the script from the Makefile would cause it to be run twice.

See The build process for a description of the build process.