diff options
Diffstat (limited to 'scripts/poky-autobuild-moblin')
-rwxr-xr-x | scripts/poky-autobuild-moblin | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/scripts/poky-autobuild-moblin b/scripts/poky-autobuild-moblin new file mode 100755 index 0000000000..4c4e6a058e --- /dev/null +++ b/scripts/poky-autobuild-moblin | |||
@@ -0,0 +1,98 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | # Poky Automated Build Server Enviroment Setup Script | ||
4 | # | ||
5 | # Copyright (C) 2006-2007 OpenedHand Ltd. | ||
6 | # | ||
7 | # This program is free software; you can redistribute it and/or modify | ||
8 | # it under the terms of the GNU General Public License as published by | ||
9 | # the Free Software Foundation; either version 2 of the License, or | ||
10 | # (at your option) any later version. | ||
11 | # | ||
12 | # This program is distributed in the hope that it will be useful, | ||
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | # GNU General Public License for more details. | ||
16 | # | ||
17 | # You should have received a copy of the GNU General Public License | ||
18 | # along with this program; if not, write to the Free Software | ||
19 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | |||
21 | SRVWORKDIR=/home/buildbot | ||
22 | TARGETDIR=$SRVWORKDIR/autobuild-output | ||
23 | CURRDIR=`pwd` | ||
24 | if [ "$CURRDIR" = "$SRVWORKDIR/poky/full-shihtzu/build" ]; then | ||
25 | ABTARGET="poky" | ||
26 | elif [ "$CURRDIR" = "$SRVWORKDIR/poky/full-bleeding-shihtzu/build" ]; then | ||
27 | ABTARGET="poky-bleeding" | ||
28 | elif [ "$CURRDIR" = "$SRVWORKDIR/poky/toolchain-shihtzu/build" ]; then | ||
29 | ABTARGET="toolchain" | ||
30 | elif [ "$CURRDIR" = "$SRVWORKDIR/pokky/incremental-shihtzu/build" ]; then | ||
31 | ABTARGET="incremental" | ||
32 | elif [ "$CURRDIR" = "$SRVWORKDIR/poky/full-darwin-shihtzu/build" ]; then | ||
33 | ABTARGET="darwin" | ||
34 | if [ ! -d "$CURRDIR/meta-darwin" ]; then | ||
35 | svn co http://svn.o-hand.com/repos/poky/branches/experimental/meta-darwin $CURRDIR/meta-darwin | ||
36 | else | ||
37 | cd $CURRDIR/meta-darwin | ||
38 | svn up | ||
39 | cd $CURRDIR | ||
40 | fi | ||
41 | fi | ||
42 | |||
43 | if [ "xpreamble" = "x$1" ]; then | ||
44 | mkdir -p ./build/tmp/deploy/images | ||
45 | rm -f ./build/tmp/deploy/images/images-complete | ||
46 | svn info > ./build/tmp/deploy/images/svninfo | ||
47 | exit 0 | ||
48 | fi | ||
49 | |||
50 | BDIR="build" | ||
51 | . ./scripts/poky-env-internal | ||
52 | POSTPROCESS=`which poky-autobuild-postprocess-moblin` | ||
53 | |||
54 | if [ "xcomplete" = "x$1" ]; then | ||
55 | touch ./tmp/deploy/images/images-complete | ||
56 | chmod a+w ./tmp/deploy/images/images-complete | ||
57 | if [ "x$POSTPROCESS" != "x" ]; then | ||
58 | cd .. | ||
59 | $POSTPROCESS $ABTARGET $TARGETDIR | ||
60 | fi | ||
61 | exit 0 | ||
62 | fi | ||
63 | |||
64 | CONFFILE="./conf/auto.conf" | ||
65 | |||
66 | if [ ! -e "$CONFFILE" ]; then | ||
67 | if [ ! -d "./conf" ]; then | ||
68 | mkdir -p "./conf" | ||
69 | fi | ||
70 | echo 'PACKAGE_CLASSES = "package_ipk package_deb"' > "$CONFFILE" | ||
71 | echo 'BB_NUMBER_THREADS = "6"' >> "$CONFFILE" | ||
72 | echo 'PARALLEL_MAKE = "-j 6"' >> "$CONFFILE" | ||
73 | echo 'DL_DIR = "$SRVWORKDIR/sources"' >> "$CONFFILE" | ||
74 | echo 'INHERIT += "poky-autobuild-notifier"' >> "$CONFFILE" | ||
75 | if [ "$ABTARGET" = "darwin" ]; then | ||
76 | echo 'PACKAGE_CLASSES += "package_tar"' >> "$CONFFILE" | ||
77 | echo "BBFILES += \"$CURRDIR/meta-darwin/packages/*/*.bb\"" >> "./conf/local.conf" | ||
78 | echo 'POKYMODE = "darwin"' >> "$CONFFILE" | ||
79 | echo 'DARWINFILES = "file:///srv/poky/sources/"' >> "$CONFFILE" | ||
80 | echo 'INHERIT_INSANE = ""' >> "$CONFFILE" | ||
81 | echo "FILESPATH_append = \":$CURRDIR/meta-darwin/files\"" >> "$CONFFILE" | ||
82 | fi | ||
83 | fi | ||
84 | |||
85 | if [ "$ABTARGET" = "darwin" ]; then | ||
86 | BBPATH=$CURRDIR/meta-darwin:$BBPATH | ||
87 | fi | ||
88 | |||
89 | bitbake $@ | ||
90 | |||
91 | retval=$? | ||
92 | |||
93 | if [ "x$POSTPROCESS" != "x" ]; then | ||
94 | cd .. | ||
95 | $POSTPROCESS $ABTARGET $TARGETDIR | ||
96 | fi | ||
97 | |||
98 | exit $retval | ||