Date: Sun, 25 Nov 2007 20:58:43 -0600 From: Stephen Montgomery-Smith <stephen@math.missouri.edu> To: Stephen Montgomery-Smith <stephen@math.missouri.edu>, freebsd-ports@freebsd.org Subject: Re: Package Building in the Large Message-ID: <474A3663.5040908@math.missouri.edu> In-Reply-To: <alpine.BSF.0.99999.0711220037270.982@qbhto.arg> References: <474262D5.3010603@highperformance.net> <alpine.BSF.0.99999.0711220037270.982@qbhto.arg>
next in thread | previous in thread | raw e-mail | index | archive | help
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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?474A3663.5040908>