Installing config files
Ryan Stonecipher-Fisher
rmsfisher at macports.org
Tue Dec 8 10:52:44 PST 2009
Brooks,
Lines 71-80 of the current mpd Portfile
<http://trac.macports.org/browser/trunk/dports/audio/mpd/Portfile> may
help solve your problem.
Post-destroot is a good phase for doing conditional installation of
example/default configuration files.
Cheers,
Ryan Stonecipher-Fisher
573.489.2848
---------- Forwarded message ----------
From: "M. Brooks Clark" <brooks at clarksonline.net>
To: MacPorts Development <macports-dev at lists.macosforge.org>
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
present?
Similar question for the database file(s) in /opt/local/var/wview?
What is the preferred/recommended practice?
Thanks,
Brooks
More information about the macports-dev
mailing list