From owner-freebsd-ports@FreeBSD.ORG Thu Jun 8 21:57:03 2006 Return-Path: X-Original-To: freebsd-ports@freebsd.org 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 D31F116A4D5; Thu, 8 Jun 2006 21:57:03 +0000 (UTC) (envelope-from james@netinertia.co.uk) Received: from starbug.netinertia.co.uk (starbug.netinertia.co.uk [217.147.82.211]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5BF9143D45; Thu, 8 Jun 2006 21:57:03 +0000 (GMT) (envelope-from james@netinertia.co.uk) Received: from croydon.netinertia.co.uk ([82.69.247.45] helo=[10.1.0.83]) by starbug.netinertia.co.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.60 (FreeBSD)) (envelope-from ) id 1FoR7C-000Keg-Ax; Thu, 08 Jun 2006 21:28:28 +0100 Message-ID: <448887CE.1080307@netinertia.co.uk> Date: Thu, 08 Jun 2006 21:25:50 +0100 From: James O'Gorman User-Agent: Thunderbird 1.5.0.4 (Windows/20060516) MIME-Version: 1.0 To: Alex Dupre References: <4485DBF5.3070705@FreeBSD.org> <20060606211113.GA7845@xor.obsecurity.org> <20060607021330.GA11189@xor.obsecurity.org> <20060607022741.GA11522@xor.obsecurity.org> <44866E48.4000601@FreeBSD.org> <1149672527.851.2.camel@mayday.esat.net> <4486F811.3080207@FreeBSD.org> <448851C0.10902@netinertia.co.uk> <448881D2.1030001@FreeBSD.org> <44888697.3000701@netinertia.co.uk> In-Reply-To: <44888697.3000701@netinertia.co.uk> X-Enigmail-Version: 0.94.0.0 Content-Type: multipart/mixed; boundary="------------040106010102090801060408" X-NetI-Spam-Score: -1.4 (-) Cc: freebsd-ports@freebsd.org Subject: Re: portmaster 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: Thu, 08 Jun 2006 21:57:03 -0000 This is a multi-part message in MIME format. --------------040106010102090801060408 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit James O'Gorman wrote: > Alex Dupre wrote: >> James O'Gorman ha scritto: >>> Would it perhaps be possible for this to spam /etc/make.conf to add the >>> relevant entries, like the perl port does? >> Possible yes, easy no. Adding rows on install is simple, removing them >> on deinstall less (perl set only a couple of variables). If you have a >> working patch I'll be glad ti commit it. > > How's this? It's a technique I use in my Apache vhosts.conf maintainance > script. Sorry, there was a typo in that. I did echo instead of cat. James --------------040106010102090801060408 Content-Type: text/plain; name="portsconf.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="portsconf.diff" diff -urN portsconf.orig/pkg-deinstall portsconf/pkg-deinstall --- portsconf.orig/pkg-deinstall Thu Jan 1 01:00:00 1970 +++ portsconf/pkg-deinstall Thu Jun 8 20:22:13 2006 @@ -0,0 +1,6 @@ +#!/bin/sh + +echo -n "Cleaning up /etc/make.conf..." +sed -e "/# Begin portsconf configuration/,/# End portsconf configuration/ d" \ + -i.bak /etc/make.conf +echo " Done." diff -urN portsconf.orig/pkg-install portsconf/pkg-install --- portsconf.orig/pkg-install Thu Jan 1 01:00:00 1970 +++ portsconf/pkg-install Thu Jun 8 20:30:33 2006 @@ -0,0 +1,14 @@ +#!/bin/sh -x + +echo -n "Spamming /etc/make.conf..." +cat >> /etc/make.conf << EOF +# Begin portsconf configuration +.if !empty(.CURDIR:M/usr/ports*) +_PORTCONF!=%%PREFIX%%/sbin/portconf +.for i in \${_PORTCONF:S/|/ /g} +\${i:S/%/ /g} +.endfor +.endif +# End portsconf configuration +EOF +echo " Done." --------------040106010102090801060408--