Subject: Re: Problems with etc outside /usr/pkg
To: None <tech-pkg@netbsd.org>
From: Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
List: tech-pkg
Date: 05/22/2002 16:41:26
On Wed, May 22, 2002 at 04:33:28PM +0200, Julio Merino wrote:
> Well, the other problem is the following. Suppose I compile a program
> and I specify that its configuration files should go in some "temporary"
> directory, say share (--sysconfdir=${PREFIX}/share/examples/package_name).
> Then, even if I use CONF_FILES, the package will keep looking in
> share, instead of what CONF_FILES say, because the path has been hardcoded
> into the code... Am I right?

Unsure about the first part, so I'll only reply to the second:
You should configure the package so that it looks for it's files in
PKG_SYSCONFDIR, but make sure the files get installed somewhere in
share/examples (by hacking the Makefiles, if necessary); then
bsd.pkg.install.mk will take care of copying the files from
share/examples to etc (if you set all the variables correctly).

There are already some packages using these functions, look e.g. in
sysutils/ups-nut (or grep for others :).

Bye,
 Thomas

-- 
Thomas Klausner - wiz@danbala.tuwien.ac.at
When all other means of communication fail, try words.