/[gentoo-x86]/scripts/autobuildimgppc.sh
Gentoo

Contents of /scripts/autobuildimgppc.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download) (as text)
Mon Sep 27 20:07:36 2004 UTC (15 years ago) by vapier
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +0 -0 lines
File MIME type: text/x-sh
FILE REMOVED
old stuff; use catalyst

1 #!/bin/bash
2
3 #I'm not sure who wrote the original autobuildimg.sh script, but thanks for
4 #the framework.
5
6 cleanup() {
7 cp /etc/make.conf.build /etc/make.conf
8 exit $1
9 }
10
11 export USE="-* build bootstrap"
12 export CFLAGS=" -O2 -mpowerpc -pipe "
13 export CXXFLAGS="${CFLAGS}"
14 export CHOST="powerpc-unknown-linux-gnu"
15 #export ORIGUSE="`$PYTHON -c 'import portage; print portage.settings["USE"];'`"
16 export CONFIG_PROTECT=""
17 #export GENTOO_MIRRORS="`$PYTHON -c 'import portage; print portage.settings["GENTOO_MIRRORS"];'`"
18 export ROOT=/mnt/build-img
19 cp /etc/make.conf /etc/make.conf.build
20 #export STEPS="clean unpack compile install qmerge clean"
21
22 TODAY=`date '+%Y%m%d'`
23
24 [ -z "${PORTDIR}" ] && PORTDIR=/usr/portage
25 cp ${PORTDIR}/profiles/default-ppc-1.0/make.conf.buildimg /etc/make.conf
26 [ -z "${BUILDTARBALL}" ] && BUILDTARBALL="build-${TODAY}.tbz2"
27 #[ -z "${BUILD_PACKAGES}" ] && BUILD_PACKAGES=`ls -1 ${PORTDIR}/files/build-*.packages | sort | tail -1`
28 mkdir -p ${PORTDIR}/distribution
29
30 echo ">>> Cleaning up ${ROOT}..."
31 rm -rf "${ROOT}"
32 mkdir -p "${ROOT}"
33
34 #scripts/autocompile.sh "${BUILD_PACKAGES}"
35 emerge baselayout || cleanup 1
36 emerge glibc || cleanup 1
37 emerge portage || cleanup 1
38 emerge `cat /etc/make.profile/packages.build` || cleanup 1
39 rm -rf "${ROOT}/tmp"
40 mkdir -p ${ROOT}/tmp
41 mkdir -p ${ROOT}/proc
42 chown root.root ${ROOT}/proc
43 chown root.root ${ROOT}/tmp
44 chmod 1777 ${ROOT}/tmp
45 mv ${ROOT}/var/db/pkg ${ROOT}/var/db/pkg.build
46
47 echo ">>> Creating ${BUILDTARBALL}..."
48 cd ${ROOT}
49 tar -cj --numeric-owner -p -f "${PORTDIR}/distribution/${BUILDTARBALL}" .
50
51 rm -rf ${ROOT}
52 cleanup 0

  ViewVC Help
Powered by ViewVC 1.1.20