summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryon Roche <kain@gentoo.org>2002-05-08 04:58:55 +0000
committerBryon Roche <kain@gentoo.org>2002-05-08 04:58:55 +0000
commit403d96b740f501575cd274c069dcd650efe38c3c (patch)
tree7c9bfe5bb4d044adf7a36b5560aa9bb81376f79f /scripts
parentmoved app-misc/{babel,netcdf} and dev-lang/{iverilog,octave} into app-sci (diff)
downloadhistorical-403d96b740f501575cd274c069dcd650efe38c3c.tar.gz
historical-403d96b740f501575cd274c069dcd650efe38c3c.tar.bz2
historical-403d96b740f501575cd274c069dcd650efe38c3c.zip
Kain's autobuilder script for making a PPC stage1 *may work for other archs too*
Diffstat (limited to 'scripts')
-rw-r--r--scripts/autobuildimgppc.sh47
1 files changed, 47 insertions, 0 deletions
diff --git a/scripts/autobuildimgppc.sh b/scripts/autobuildimgppc.sh
new file mode 100644
index 000000000000..07f866350604
--- /dev/null
+++ b/scripts/autobuildimgppc.sh
@@ -0,0 +1,47 @@
+#!/bin/bash
+
+cleanup() {
+ cp /etc/make.conf.build /etc/make.conf
+ exit $1
+}
+
+export USE="-* build bootstrap"
+export CFLAGS=" -O2 -mpowerpc -pipe "
+export CXXFLAGS="${CFLAGS}"
+export CHOST="powerpc-unknown-linux-gnu"
+#export ORIGUSE="`$PYTHON -c 'import portage; print portage.settings["USE"];'`"
+export CONFIG_PROTECT=""
+#export GENTOO_MIRRORS="`$PYTHON -c 'import portage; print portage.settings["GENTOO_MIRRORS"];'`"
+export ROOT=/mnt/build-img
+cp /etc/make.conf /etc/make.conf.build
+#export STEPS="clean unpack compile install qmerge clean"
+
+TODAY=`date '+%Y%m%d'`
+
+[ -z "${PORTDIR}" ] && PORTDIR=/usr/portage
+cp ${PORTDIR}/profiles/default-ppc-1.0/make.conf.buildimg /etc/make.conf
+[ -z "${BUILDTARBALL}" ] && BUILDTARBALL="build-${TODAY}.tbz2"
+#[ -z "${BUILD_PACKAGES}" ] && BUILD_PACKAGES=`ls -1 ${PORTDIR}/files/build-*.packages | sort | tail -1`
+mkdir -p ${PORTDIR}/distribution
+
+echo ">>> Cleaning up ${ROOT}..."
+rm -rf "${ROOT}"
+mkdir -p "${ROOT}"
+
+#scripts/autocompile.sh "${BUILD_PACKAGES}"
+emerge baselayout || cleanup 1
+emerge glibc || cleanup 1
+emerge portage || cleanup 1
+emerge `cat /etc/make.profile/packages.build` || cleanup 1
+rm -rf "${ROOT}/tmp"
+mkdir -p ${ROOT}/tmp
+chown root.root ${ROOT}/tmp
+chmod 1777 ${ROOT}/tmp
+mv ${ROOT}/var/db/pkg ${ROOT}/var/db/pkg.build
+
+echo ">>> Creating ${BUILDTARBALL}..."
+cd ${ROOT}
+tar -cj --numeric-owner -p -f "${PORTDIR}/distribution/${BUILDTARBALL}" .
+
+rm -rf ${ROOT}
+cleanup 0