#!/bin/sh # usage: $0 arch branch buildid # Don't want to pick up host customizations export INDEX_PRISTINE=1 # Don't give luser advice if it fails export INDEX_QUIET=1 # Concurrency of index build #export INDEX_JOBS=6 # XXX MCL 20110716 this is the only way I can get index to build, now export INDEX_JOBS=1 # For debugging purposes only #export INDEX_VERBOSE=1 pbc=${PORTBUILD_CHECKOUT:-/a/portbuild} pbd=${PORTBUILD_DATA:-/a/portbuild} usage () { echo "usage: makeindex arch branch buildid [target]" exit 1 } if [ $# -lt 3 ]; then usage fi arch=$1 branch=$2 buildid=$3 target=$4 builddir=${pbd}/${arch}/${branch}/builds/${buildid} . ${pbc}/conf/server.conf . ${pbc}/conf/common.conf . ${pbd}/${arch}/portbuild.conf if [ -f ${pbd}/${arch}/${branch}/builds/${buildid}/portbuild.conf ]; then . ${pbd}/${arch}/${branch}/builds/${buildid}/portbuild.conf fi . ${pbc}/scripts/buildenv # Set up the build env variables buildenv ${pbd} ${arch} ${branch} ${builddir} unset DISPLAY # Don't pick up installed packages from the host export LOCALBASE=/nonexistentlocal INDEX_PORTS=. if [ -n "$target" ]; then if [ -f "$target" ]; then INDEX_PORTS=$(grep -v "^#" $target | tr '\n' ' ') else echo "File $target doesn't exist. Exiting." exit 1 fi fi cd ${PORTSDIR} make index INDEX_PORTS="${INDEX_PORTS}" if [ ! -e ${INDEXFILE} ]; then echo "makeindex: failed to make ${INDEXFILE}" exit 1 fi # remove extra spaces in dependency list -- this causes problems # Also transform the dummy paths to their canonical locations sed -i '' -e 's/ */ /g' -e 's/| */|/g' -e 's/ *|/|/g' -e "s,${LOCALBASE},/usr/local," ${INDEXFILE}