Subject: Re: how to handle dynamic config-file generation?
To: Julio M. Merino Vidal <>
From: Geert Hendrickx <>
List: tech-pkg
Date: 08/07/2005 14:08:56
On Sun, Aug 07, 2005 at 01:51:20PM +0200, Julio M. Merino Vidal wrote:
> On 8/7/05, Geert Hendrickx <> 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 file
> > (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.)

I thought about that, but the package wants to create the file in the same
location it expects to find it (PKG_SYSCONFDIR).  

Maybe I could just leave it without config file, as the config-generating
feature is documented (cfr. fetchmail).