From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 26 22:22:24 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 583CA106564A for ; Fri, 26 Feb 2010 22:22:24 +0000 (UTC) (envelope-from stephen@missouri.edu) Received: from cauchy.math.missouri.edu (cauchy.math.missouri.edu [128.206.184.213]) by mx1.freebsd.org (Postfix) with ESMTP id 1E1FD8FC1E for ; Fri, 26 Feb 2010 22:22:23 +0000 (UTC) Received: from laptop3.gateway.2wire.net (cauchy.math.missouri.edu [128.206.184.213]) by cauchy.math.missouri.edu (8.14.3/8.14.3) with ESMTP id o1QMMLr2003975; Fri, 26 Feb 2010 16:22:22 -0600 (CST) (envelope-from stephen@missouri.edu) Message-ID: <4B88499D.1010604@missouri.edu> Date: Fri, 26 Feb 2010 16:22:21 -0600 From: Stephen Montgomery-Smith User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.8) Gecko/20100218 Firefox MIME-Version: 1.0 To: "xorquewasp@googlemail.com" References: <20100226163227.GA15162@logik.internal.network> <4B88074E.7050007@FreeBSD.org> <20100226181511.GC15162@logik.internal.network> In-Reply-To: <20100226181511.GC15162@logik.internal.network> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "freebsd-hackers@FreeBSD.org" Subject: Re: package building failure irritation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Feb 2010 22:22:24 -0000 I also build my ports in a "jail" environment (only its not a really a jail, just a chroot). After I have built the ports I want, I create the packages using the following little script. (My mail client will have mangled the script, so take care when you copy and paste it, e.g. it needs to be tabs not spaces and the beginning of lines.) #!/usr/bin/make -f PACKAGES?=/usr/home/stephen/packages-8-amd 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