package building failure irritation
Stephen Montgomery-Smith
stephen at missouri.edu
Fri Feb 26 22:22:24 UTC 2010
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
More information about the freebsd-hackers
mailing list