From owner-freebsd-ports@FreeBSD.ORG Thu Aug 5 12:50:28 2004 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 C14FA16A4DD for ; Thu, 5 Aug 2004 12:50:28 +0000 (GMT) Received: from enzo.xbsd.net (enzo.xbsd.net [217.157.24.29]) by mx1.FreeBSD.org (Postfix) with ESMTP id E6BEA43D5A for ; Thu, 5 Aug 2004 12:50:27 +0000 (GMT) (envelope-from esbjerg@xbsd.net) Received: by enzo.xbsd.net (Postfix, from userid 1000) id 4F30017072; Thu, 5 Aug 2004 14:48:22 +0200 (CEST) Date: Thu, 5 Aug 2004 14:48:22 +0200 From: Sven Esbjerg To: ports@FreeBSD.ORG Message-ID: <20040805124822.GE82359@esbjerg.name> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.4.2.1i Subject: changing a Makefile based on user input 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: Thu, 05 Aug 2004 12:50:28 -0000 I'm trying to port RTFM (http://bestpractical.com/rtfm/) since we use it at work. It's my first port and I'm unsure of how the following should be done. Intalling RTFM is simple. Untar the tarball. Edit the Makefile and run make install. However the Makefile needs to be changed according to the postgresql installation - it needs a username for tampering with the database and a password if that is required. It also needs to know where rt lives. I would like to provide the user with defaults (pgsql user and /usr/local/rt3 as installation directory) but I would also like the user to be able to specify these options. I guess my question is: can I run some kind of script just after extracting but before installing? Is it advisable to create a sed script that does the actual mangling of the Makefile or? Sven Esbjerg -- http://www.usenet.dk/netikette - på forhånd tak.