Subject: Re: how to handle dynamic config-file generation?
To: ghen@telenet.be, Geert Hendrickx <geert.hendrickx@ua.ac.be>
From: Julio M. Merino Vidal <jmmv84@gmail.com>
List: tech-pkg
Date: 08/07/2005 13:51:20
On 8/7/05, Geert Hendrickx <geert.hendrickx@ua.ac.be> wrote:
> I'm creating a package for a program which wants to auto-generate its
> config file after "make install".  It first checks whether the config fil=
e
> (in ${PKG_SYSCONFDIR}) exists, and if not, generates a quite generic (not
> at all host-specific) example config file.  How should I handle this in
> pkgsrc?

Make the package use ${PREFIX}/share/examples/<package>/ instead
of ${PKG_SYSCONFDIR}.  This way, the file will never exist and will always
be generated from scratch.

You can then use the install framework to copy the file into
${PKG_SYSCONFDIR} iff needed.  (See CONF_FILES.)

--=20
Julio M. Merino Vidal <jmmv84@gmail.com>
http://www.livejournal.com/users/jmmv/
The NetBSD Project - http://www.NetBSD.org/