From owner-freebsd-ports@FreeBSD.ORG Sun Jan 6 11:27:26 2008 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3F73916A417 for ; Sun, 6 Jan 2008 11:27:26 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from redbull.bpaserver.net (redbullneu.bpaserver.net [213.198.78.217]) by mx1.freebsd.org (Postfix) with ESMTP id EB59C13C458 for ; Sun, 6 Jan 2008 11:27:25 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from outgoing.leidinger.net (p54A5467E.dip.t-dialin.net [84.165.70.126]) by redbull.bpaserver.net (Postfix) with ESMTP id 2E7732E34A for ; Sun, 6 Jan 2008 12:26:22 +0100 (CET) Received: from deskjail (deskjail.Leidinger.net [192.168.1.109]) by outgoing.leidinger.net (Postfix) with ESMTP id 47A7C86D77 for ; Sun, 6 Jan 2008 12:26:18 +0100 (CET) Date: Sun, 6 Jan 2008 12:26:17 +0100 From: Alexander Leidinger To: freebsd-ports@freebsd.org 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> X-Mailer: Claws Mail 3.0.2 (GTK+ 2.12.3; i686-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BPAnet-MailScanner-Information: Please contact the ISP for more information X-BPAnet-MailScanner: Found to be clean X-BPAnet-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-14.9, required 6, BAYES_00 -15.00, RDNS_DYNAMIC 0.10) X-BPAnet-MailScanner-From: alexander@leidinger.net X-Spam-Status: No Subject: Re: Ports that have multiple configuration files X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jan 2008 11:27:26 -0000 Quoting Naram Qashat (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