From owner-freebsd-ports@FreeBSD.ORG Mon Dec 22 20:12:31 2003 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B2B6916A4CE for ; Mon, 22 Dec 2003 20:12:31 -0800 (PST) Received: from mail.seekingfire.com (coyote.seekingfire.com [24.72.10.212]) by mx1.FreeBSD.org (Postfix) with ESMTP id E9EFE43D1F for ; Mon, 22 Dec 2003 20:12:29 -0800 (PST) (envelope-from tillman@seekingfire.com) Received: by mail.seekingfire.com (Postfix, from userid 500) id 4766727B; Mon, 22 Dec 2003 22:12:29 -0600 (CST) Date: Mon, 22 Dec 2003 22:12:29 -0600 From: Tillman Hodgson To: FreeBSD-Ports Message-ID: <20031223041229.GF74913@seekingfire.com> References: <20031222231159.GO42615@seekingfire.com> <20031223031757.6063D1778D@sirius.firepipe.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031223031757.6063D1778D@sirius.firepipe.net> X-Habeas-SWE-1: winter into spring X-Habeas-SWE-2: brightly anticipated X-Habeas-SWE-3: like Habeas SWE (tm) X-Habeas-SWE-4: Copyright 2002 Habeas (tm) X-Habeas-SWE-5: Sender Warranted Email (SWE) (tm). The sender of this X-Habeas-SWE-6: email in exchange for a license for this Habeas X-Habeas-SWE-7: warrant mark warrants that this is a Habeas Compliant X-Habeas-SWE-8: Message (HCM) and not spam. Please report use of this X-Habeas-SWE-9: mark in spam to . X-GPG-Key-ID: 828AFC7B X-GPG-Fingerprint: 5584 14BA C9EB 1524 0E68 F543 0F0A 7FBC 828A FC7B X-GPG-Key: http://www.seekingfire.com/gpg_key.asc X-Urban-Legend: There is lots of hidden information in headers User-Agent: Mutt/1.5.5.1i Subject: Re: What's the appropriate Makefile-fu to change someport.conf to someport.conf.sample? X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2003 04:12:31 -0000 On Mon, Dec 22, 2003 at 09:17:57PM -0600, Pete Fritchman wrote: > * Mon, 22 Dec 2003 17:11:59 CST - Tillman Hodgson: > | Is the following acceptable practice? > | > | pre-configure: > | @${CP} ${WRKSRC}/latd.conf ${WRKSRC}/latd.conf.sample > | @${SED} -i .dist -e 's/sysconf_DATA = latd.conf/sysconf_DATA = latd.con > | f.sample/' ${WRKSRC}/Makefile.in > > USE_REINPLACE= yes > [...] > post-patch: > @${REINPLACE_CMD} -e 's/foo/bar/' ${WRKSRC}/Makefile.in Thanks! This isn't documented in the Porter's Handbook and I wish it was - after reading up on it in bsd.ports.mk it looks exactly like I wanted. Would you mind pointing me to the right place? > This is a good start. But there's more to config file management; it'd > be good form to install both latd.conf + latd.conf.sample. Upon deinstall, > cmp latd.conf and latd.conf.sample -- if they're the same, remove latd.conf, > if not - leave the user's customizations. On install, check if latd.conf > exists (think a custom config from a previous install) -- if not, install > the .sample one. I agree, that's definitely the better way to go. On a somewhat related topic, are there any reasons why XFree86 clobbers the XDM configuration files? I would have thought that it was a high-profile enough port to have those sorts of things ironed out. I've been mildly curious about whether there were any technical reasons behind it for a while now. > Like I said, the editors/joe-devel port provides (what I think is) a good > example. I've dug through joe-devel and I think that it's approach is great. I also think that it's over-kill for a 1-line change that the original application author will be fixing in the next release :-) Thanks for your help, it's much appreciated. -T -- The supreme irony of life is that hardly anyone gets out alive. - Robert Heinlein