From 552d7a4a066734960d2cedc6fcc8610d919810bd Mon Sep 17 00:00:00 2001 From: CyberLeo Date: Sun, 20 Feb 2011 16:07:54 -0600 Subject: [PATCH] script/makepkg: build in targets instead of worlds --- script/makepkg | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/script/makepkg b/script/makepkg index 12442f5..0502ce2 100755 --- a/script/makepkg +++ b/script/makepkg @@ -480,19 +480,33 @@ chport() { # ######## -TARGET="${TARGET:-i386}" -CONFIG="${CONFIG:-GENERIC}" +ARCH="${ARCH:-i386}" +CONF="${CONF:-GENERIC}" -ROOT="$(realpath "$(dirname "${0}")/../worlds")" +# Root directory of makepkg +ROOT="$(realpath "$(dirname "${0}")/..")" -# Base directory for everything -base_dir="${ROOT}/${TARGET}/${CONFIG}" +# Location of targets +TARGETS="${ROOT}/targets" + +# Base directory for selected target +base_dir="${TARGETS}/${ARCH}/${CONF}" + +# Link to appropriate world +world_dir="${base_dir}/world" + +# Verify that world points to a proper world +if [ ! -d "${world_dir}" ] +then + omg "World link is not appropriate; defaulting to ${ARCH}/GENERIC" + world_dir="${ROOT}/worlds/${ARCH}/GENERIC" +fi # Directory holding configuration conf_dir="${base_dir}/config" # Root tree for chroot seeding -seed_dir="${base_dir}/root" +seed_dir="${world_dir}/root" # Directory where distfiles will be stored between builds (common to all configs) dist_dir="${ROOT}/seed/distfiles" @@ -530,8 +544,8 @@ help() { cat <