Dynamic values in files

In order to use variables like %%PREFIX%% (and get them expanded), use SUB_FILES and SUB_LIST in the port's Makefile.


SUB_LIST sets variables to be parsed, declared as VAR=VALUE:


Many variables are already set by default, including DATADIR, DOCSDIR, ETCDIR, EXAMPLESDIR, LOCALBASE, PREFIX and WWWDIR.


SUB_FILES specifies which files to be parsed.A typical example is pkg-message, which displays a message when the port/pkg is installed:

SUB_FILES=	pkg-message

Template files (input)

The templates must be placed in ${FILESDIR} (usually files/) and .in must be appended to the filenames.

Example: /usr/ports/dns/void-zones-tools/files/pkg-message.in:

To download the host lists and convert them to void zones,
run the following script:

To add your own white list/black list entries, to add over override
the bundled listings, edit %%PREFIX%%/etc/void-zones/my_void_hosts.txt.
Use the IP address for whitelisting, and for blacklisting.

Add the following line to your unbound.conf, prior to any forwarder directives:
include: /var/unbound/local-void.zones
Then restart Unbound.

For future updates, run void-zones-update.sh and restart Unbound.

For more information, see %%PREFIX%%/share/doc/void-zones-tools/README.md
or https://github.com/cyclaero/void-zones-tools

The resulting pkg-message will have %%PREFIX%% expanded to the actual prefix, which by default will be /usr/local.