Installing config files

Ryan Stonecipher-Fisher rmsfisher at
Tue Dec 8 10:52:44 PST 2009


Lines 71-80 of the current mpd Portfile
<> may
help solve your problem.
Post-destroot is a good phase for doing conditional installation of
example/default configuration files.


Ryan Stonecipher-Fisher

---------- Forwarded message ----------
From: "M. Brooks Clark" <brooks at>
To: MacPorts Development <macports-dev at>
Date: Mon, 7 Dec 2009 17:46:23 -0600
Subject: Installing config files
Due to some changes in the way the author is handling the installation
of the wview package, I'm looking for some strategies on how to best
handle this in MacPorts. Currently, wview installs configuration files
and html template files in /opt/local/etc/wview and
/opt/local/etc/wview/html (many files). It also installs a database
file in /opt/local/var/wview.

With recent changes to the build system, these files will now get
overwritten during an upgrade and will be removed during an uninstall.

Should I install /opt/local/etc/wview as something like
/opt/local/etc/wview.sample, then check if /opt/local/etc/wview is
present. If not, copy /opt/local/etc/wview.sample to
/opt/local/etc/wview in a post-activate step? Or do I need to do this
check for each individual file?

Alternatively, should I install the files in /opt/local/share/wview,
then copy the whole directory to /opt/local/etc/wview if it is not

Similar question for the database file(s) in /opt/local/var/wview?

What is the preferred/recommended practice?



More information about the macports-dev mailing list