Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Jan 2008 12:26:17 +0100
From:      Alexander Leidinger <Alexander@Leidinger.net>
To:        freebsd-ports@freebsd.org
Subject:   Re: Ports that have multiple configuration files
Message-ID:  <20080106122617.2da9e5a3@deskjail>
In-Reply-To: <478074A1.7020409@cyberbotx.com>
References:  <478068A6.7040408@cyberbotx.com> <47807231.6000202@FreeBSD.org> <478074A1.7020409@cyberbotx.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Quoting Naram Qashat <cyberbotx@cyberbotx.com> (Sun, 06 Jan 2008 01:26:41 -0500):

> Doug Barton wrote:
> > Naram Qashat wrote:
> >> I had a question regarding what to do in a port Makefile when the port
> >> has multiple configuration files to install into PREFIX/etc.  I read in
> >> the Porters Handbook about having to add entries into the Makefile and
> >> pkg-plist, but that seems to only be good for ports with a very small
> >> amount of configuration files.  Is there an easy way to take a large
> >> collection of configuration files, change their extensions all to
> >> .conf.sample instead of .conf, set up all of them to be copied to .conf
> >> when they don't exist, and remove them all when they match the
> >> .conf.sample?  
> > 
> > Ummm ... use a loop? Take a look at mail/alpine for examples of using
> > shell commands vs. make commands for glob patterns.
> 
> I can see how the loop would work within the Makefile.  But I don't see how I 
> would handle @unexec and @exec commands in pkg-plist for so many configuration 
> files.  I ask because there are 34 separate configuration files within the port 
> I am trying to create.

Write a loop in the @(un)exec part, or write a script which outputs a
@(un)exec line for each config file.

Bye,
Alexander.

-- 
BOFH excuse #97:

Small animal kamikaze attack on power supplies
http://www.Leidinger.net  Alexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org     netchild @ FreeBSD.org  : PGP ID = 72077137



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080106122617.2da9e5a3>