Installing config files

M. Brooks Clark brooks at clarksonline.net
Mon Dec 7 15:46:23 PST 2009


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