From owner-freebsd-ports@FreeBSD.ORG Mon Apr 4 14:24:23 2011 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from apollo.emma.line.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id B8E001065670 for ; Mon, 4 Apr 2011 14:24:22 +0000 (UTC) (envelope-from mandree@FreeBSD.org) Received: from [IPv6:::1] (unknown [IPv6:::1]) by apollo.emma.line.org (Postfix) with ESMTP id 5DB7C25AD8A for ; Fri, 1 Apr 2011 11:51:58 +0200 (CEST) Message-ID: <4D95A03D.2030807@FreeBSD.org> Date: Fri, 01 Apr 2011 11:51:57 +0200 From: Matthias Andree User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110223 Mnenhy/0.8.3 Thunderbird/3.1.8 MIME-Version: 1.0 To: freebsd-ports@freebsd.org References: <4D952102.4020101@astart.com> In-Reply-To: <4D952102.4020101@astart.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: Automating Port Building- Setting options on the command line 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, 04 Apr 2011 14:24:23 -0000 Am 01.04.2011 02:49, schrieb Patrick Powell: > First, before you tell me to do it, I have already RTFM, done a google > search, > and even looked for examples. Here is what I am trying to do. > > I have to generate a set of packages for amd64 and i386 systems. > > I usually have a simple script that does: > > cd /usr/ports/XXX > make > make install > make package > cp /.../repository > > > This served my simple needs well, as most of the time I had gone through > the configuration process and set up the default options that I wanted. > > But this requires me to > a) run through this process once by hand > b) copy the /var/db/ports/* to a machine with another > architecture > c) pray that the port options are the same on the i386 and amd64 > versions. > > > What I would like to do is pass in a set of default options on the > command line > such as: > > cd /usr/ports/lang/php5-extensions > make configure THIS=yes THAT=no > make > make install > make package > > I just know that somebody out there is doing this better, slicker, > and with more savvy than I am doing this. > > OK. How do I do this? And just in case there are some others out there, > could you put this information, or a hint to it, in the ports(7) > document? Just wondering what's keeping you from passing a set of WITH_ and WITHOUT_ options on all the make (not just the configure) command line. The OPTIONS framework should cope with that, and standard knobs are documented in /usr/ports/KNOBS. Also note that just "make package WITH_this=yes WITHOUT_that=no" should suffice, no need to configure/"make"/install separately. Also, you can tell portmaster to package newly-built ports (and use -m to pass options on the make command line like you suggest), which means that the package you're building and also all its dependencies are built with the options in -m (or /etc/make.conf) and stored as regular packages under /usr/ports/packages/. HTH