From owner-freebsd-ports@FreeBSD.ORG Mon Nov 26 02:58:49 2007 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 1423E16A420 for ; Mon, 26 Nov 2007 02:58:49 +0000 (UTC) (envelope-from stephen@math.missouri.edu) Received: from cauchy.math.missouri.edu (cauchy.math.missouri.edu [128.206.184.213]) by mx1.freebsd.org (Postfix) with ESMTP id BF2D013C46B for ; Mon, 26 Nov 2007 02:58:48 +0000 (UTC) (envelope-from stephen@math.missouri.edu) Received: from laptop2.gateway.2wire.net (cauchy.math.missouri.edu [128.206.184.213]) by cauchy.math.missouri.edu (8.14.2/8.14.1) with ESMTP id lAQ2wb8P008063; Sun, 25 Nov 2007 20:58:37 -0600 (CST) (envelope-from stephen@math.missouri.edu) Message-ID: <474A3663.5040908@math.missouri.edu> Date: Sun, 25 Nov 2007 20:58:43 -0600 From: Stephen Montgomery-Smith User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8.1.9) Gecko/20071118 SeaMonkey/1.1.6 MIME-Version: 1.0 To: Stephen Montgomery-Smith , freebsd-ports@freebsd.org References: <474262D5.3010603@highperformance.net> In-Reply-To: Content-Type: multipart/mixed; boundary="------------020506090808000505050209" Cc: Subject: Re: Package Building in the Large 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, 26 Nov 2007 02:58:49 -0000 This is a multi-part message in MIME format. --------------020506090808000505050209 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Doug Barton wrote: > On Mon, 19 Nov 2007, Jason C. Wells wrote: > >> What I am trying to do is to build 30 or so packages including the big >> ones like X, kde, gnome, plus all of their dependencies on a build >> host and then use pkg_add on various machines. I have had a variety >> of difficulties with all of the methods I have used thus far >> (portmaster, portupgrade, homegrown). What I do is this. After building the ports I want (and I admit that I use vanilla "cd the-port; make install clean", I run a little script I call "make-packages." And after I have updated the ports, I run a program called "make-packages-purge" to get rid of the old stuff. I enclose them as attachments. --------------020506090808000505050209 Content-Type: text/plain; name="make-packages" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="make-packages" #!/usr/bin/make -f PACKAGES?=/usr/home/stephen/packages-7 PKG_DBDIR?=/var/db/pkg PORTSDIR?=/usr/ports PKG_LIST!=ls ${PKG_DBDIR} all: ${PKG_LIST:C+(.*)+${PACKAGES}/All/\1.tbz+} .for target in ${PKG_LIST} ${PACKAGES}/All/${target}.tbz: ${PKG_DBDIR}/${target}/+CONTENTS @origin=${PORTSDIR}/`sed -n 's/@comment ORIGIN://p' \ ${PKG_DBDIR}/${target}/+CONTENTS`; \ if [ $$origin != ${PORTSDIR}/ ] && [ -e $$origin ] && (! [ -e $$origin/work ] || [ -e $$origin/work/.install_done* ]); then \ echo creating package ${target}; \ make -C $$origin PACKAGES=${PACKAGES} package-links; \ pkg_create -GjY -b ${target} $@ || (rm -f $@ && false); \ fi .endfor .BEGIN: @mkdir -p ${PACKAGES}/All --------------020506090808000505050209 Content-Type: text/plain; name="make-packages-purge" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="make-packages-purge" #!/bin/sh PACKAGES=/usr/home/stephen/packages-7 DB=/var/db/pkg for p in `ls $PACKAGES/All | sed s/\.tbz//`; do if ! [ -e ${DB}/$p ]; then rm -i $PACKAGES/All/$p.tbz fi done for l in `find $PACKAGES -type l`; do if ! stat -q -L $l > /dev/null; then rm -f $l fi done --------------020506090808000505050209--