From owner-freebsd-ports@FreeBSD.ORG Mon Mar 2 17:58:59 2009 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 0474F1065680 for ; Mon, 2 Mar 2009 17:58:59 +0000 (UTC) (envelope-from tingox@gmail.com) Received: from mail-fx0-f158.google.com (mail-fx0-f158.google.com [209.85.220.158]) by mx1.freebsd.org (Postfix) with ESMTP id 6209A8FC2D for ; Mon, 2 Mar 2009 17:58:58 +0000 (UTC) (envelope-from tingox@gmail.com) Received: by fxm2 with SMTP id 2so2052053fxm.43 for ; Mon, 02 Mar 2009 09:58:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=Opi8aICj78SyrrrXIGHS1tpkbeU6AbhRNq70Vj54HzY=; b=pN+nPQTUTwPFdjz+kv7mS4Qau5QXPXHk2mXjMSHStWT/IDGzoG998UUtT7Vno3ABA8 NIc6gqCLHE2pgWC5swM2I0QqS3BLh0d6GW4LrxhpAGotfXbfKR+6jywTHsT/DH//RXVX 2Rayi9gqwEr+C4Nv159ZYgJsyl5xIvqRcx2sE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=m4gvN75TgH7GN385Li+/cBAPeulWDGABJOmM6st3gJwy7ZpiPNTpPnllZllwzA2tIE aiRI0hnF0juxmFJP2oNdxRkkvl2F/q/t0HHOAeCMV2r/06GZCt20S5ghBOKYQh3//o+Q nv+QAjhqWS6TCvEKglmnxEG/6jE7vRBgTfz+U= MIME-Version: 1.0 Received: by 10.223.114.68 with SMTP id d4mr6178984faq.86.1236016737357; Mon, 02 Mar 2009 09:58:57 -0800 (PST) In-Reply-To: <20090302090221.7948106f@scorpio> References: <20090302090221.7948106f@scorpio> Date: Mon, 2 Mar 2009 18:58:57 +0100 Message-ID: From: Torfinn Ingolfsen To: freebsd-ports@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: Installing 'config' file with port 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: Mon, 02 Mar 2009 17:58:59 -0000 Hello, On Mon, Mar 2, 2009 at 3:02 PM, Jerry wrote: > I am creating a port that will install a 'config' file in the > "/usr/local/etc" directory. Reading through the 'Porters Handbook", I > cam across this example. > > post-install: > =A0 =A0@if [ ! -f ${PREFIX}/etc/orbit.conf ]; then \ > =A0 =A0 =A0 =A0${CP} -p ${PREFIX}/etc/orbit.conf.sample ${PREFIX}/etc/orb= it.conf ; \ > =A0 =A0fi This is done so that the config file is not overwritten if it is already there (think port upgrade). If the config file exists already, just copy the *.conf.sample file without renaming it. > First, when I write the 'config' file, do I place it under the ports > 'files' directory and give it a ".in". Yes, the files directory is a good place. Why not simply call it 'application.conf' (if that is the name it will have) or 'application.conf.sample'? > Second, what do I have to do to get the file installed in the config > directory? copy it in the post-install target? > The program does not come with a config file by default. If that should > change, how would I go about using it instead of the one I created? Change the port when you know the location and name of the file, perhaps? However, if you think that distributing a config file with this application wold be useful, perhaps you should talk to the upstream developers and get them to include a config file? HTH --=20 Regards, Torfinn Ingolfsen