diff --git a/en_US.ISO8859-1/books/porters-handbook/book.sgml b/en_US.ISO8859-1/books/porters-handbook/book.sgml
index 534775e5b9..e7927f7139 100644
--- a/en_US.ISO8859-1/books/porters-handbook/book.sgml
+++ b/en_US.ISO8859-1/books/porters-handbook/book.sgml
@@ -5511,57 +5511,55 @@ PLIST_SUB= OCTAVE_VERSION=${OCTAVE_VERSION}
Making use of SUB_FILES and
SUB_LIST
- In some cases, it may be necessary to modify port files,
- i.e.: files not included in the original distribution, to set
- values; the SUB_FILES and
- SUB_LIST variables are available.
+ The SUB_FILES and SUB_LIST
+ variables are useful for dynamic values in port files, such as the
+ installation PREFIX in
+ pkg-message.
The SUB_FILES variable specifies a list
of files to be automatically modified. Each
file in the
SUB_FILES list must have a corresponding
- file.in listed
- in FILESDIR. If you add some files, such as
- pkg-message, pkg-install,
- pkg-deinstall or pkg-reg,
- PKG-FILE associated
- variables will be set to
- WRKDIR/pkg-file.
+ file.in present
+ in FILESDIR. A modified version will
+ be created in WRKDIR. Files defined as a
+ value of USE_RC_SUBR and
+ USE_RCORDER are automatically added to
+ SUB_FILES. For the files
+ pkg-message,
+ pkg-install, pkg-deinstall
+ and pkg-reg, the corresponding Makefile variable
+ is automatically set to point to the processed version.
The SUB_LIST variable is a list of
- VAR=VALUE pairs. The modified version of
- each file will be created in
- WRKDIR. For each
- VAR=VALUE in SUB_LIST,
+ VAR=VALUE pairs. For each pair
%%VAR%% will get replaced
with VALUE in each file listed in
- SUB_FILES. Some usual pairs are
- automatically added to SUB_LIST,
- so you are not required to worry about them :
- PREFIX=${PREFIX}DOCSDIR=${DOCSDIR},
- etc. (see bsd.port.mk for the entire
- list).
-
- The substitution process is almost the same as the
- PLIST_SUB variable. Any line beginning with
- @comment after variable substitution will be
- deleted from resulting files.
-
- The following example should be enough for a port to
- display a custom pkg-message,
- using %%PREFIX%%,
- and to install an rcNG startup script using
- %%RC_SUBR%%.
-
- SUB_FILES= pkg-message myport.sh
-SUB_LIST= RC_SUBR=${RC_SUBR}
+ SUB_FILES. Several common pairs are
+ automatically defined: PREFIX,
+ LOCALBASE, X11BASE,
+ DATADIR, DOCSDIR,
+ EXAMPLESDIR. Any line beginning with
+ @comment will be deleted from resulting files
+ after a variable substitution.
-USE_RC_SUBR= yes
+ The following example will replace %%ARCH%%
+ with the system architecture
+ in a pkg-message:
+
+ SUB_FILES= pkg-message
+SUB_LIST= ARCH=${ARCH}
Note that for this example, the
- pkg-message.in and
- myport.sh.in files must exist in
+ pkg-message.in file must exist in
FILESDIR.
+
+ Example of a good pkg-message.in:
+
+ Now it's time to configure this package.
+Copy %%PREFIX%%/share/examples/putsy/%%ARCH%%.conf into your home directory
+as .putsy.conf and edit it.
+