From owner-freebsd-questions@FreeBSD.ORG Sat Nov 28 09:26:59 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E1BD106568B for ; Sat, 28 Nov 2009 09:26:59 +0000 (UTC) (envelope-from sonicy@otenet.gr) Received: from aiolos.otenet.gr (aiolos.otenet.gr [83.235.67.30]) by mx1.freebsd.org (Postfix) with ESMTP id 7C6418FC15 for ; Sat, 28 Nov 2009 09:26:58 +0000 (UTC) Received: from pulstar.local (athedsl-4464738.home.otenet.gr [94.71.96.82]) by aiolos.otenet.gr (8.13.8/8.13.8/Debian-3) with ESMTP id nAS9QtWg008044; Sat, 28 Nov 2009 11:26:56 +0200 Message-ID: <4B10ECDF.5010509@otenet.gr> Date: Sat, 28 Nov 2009 11:26:55 +0200 From: Manolis Kiagias User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) MIME-Version: 1.0 To: Gary Kline References: <20091128090544.GA80636@thought.org> In-Reply-To: <20091128090544.GA80636@thought.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: FreeBSD Mailing List Subject: Re: how do i automate building packages? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Nov 2009 09:26:59 -0000 Gary Kline wrote: > How do I build tarballs of packages that usually wind up in > /usr/ports/packages? > > I thought I had something in /etc/make.conf, but nope. My > build of OOo [311] recently finished on my new to-be server. > Since both the new Dell and this older Dell are running 7.2, I > figure I can do any builds and move the packages across. > > I thought I had seen foo.tgz in /usr/ports/bar/foo/; but this > time, no expected tarball. --??-- A man ports isn't very > clear. I usually type make install clean when I build > anything. If I have to start over from scratch with > openoffice would I type > > # make install package clean? Or what? > > anybody? > > Now that you got it installed, you may use pkg_create: pkg_create -Rb openoffice.org-3.1.1 (You can get the exact package name using pkg_info -Ix openoffice) The -R flag will also build all dependencies of openoffice. Something along the lines of the following script: #! /usr/bin/env bash mkdir -p /usr/ports/packages cd /usr/ports/packages rm -rf *.tbz echo "Package creation starting `date`" IFS=$'\n' for i in `pkg_info -Ea` do echo "Creating $i" pkg_create -b $i done echo "Finished, `date`" will create a package for every single port installed on your system and place it in /usr/ports/packages. You can then move these and install them on another system. Notice the script does not use -R as it is already building all packages :)