|
|
@ -1,4 +1,4 @@
|
|
|
|
#!/bin/bash
|
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
|
|
|
|
set -e
|
|
|
|
set -e
|
|
|
|
|
|
|
|
|
|
|
@ -8,33 +8,55 @@ release=raring
|
|
|
|
|
|
|
|
|
|
|
|
[ "$(dpkg --print-architecture)" = "amd64" ] || exit 1
|
|
|
|
[ "$(dpkg --print-architecture)" = "amd64" ] || exit 1
|
|
|
|
|
|
|
|
|
|
|
|
# enable universe in the build chroot
|
|
|
|
# set up a build chroot
|
|
|
|
grep -q universe /etc/apt/sources.list || echo "deb http://ftpmaster.internal/ubuntu $release universe" >>/etc/apt/sources.list
|
|
|
|
case $(hostname --fqdn) in
|
|
|
|
|
|
|
|
*.buildd)
|
|
|
|
# set up multiarch
|
|
|
|
MIRROR=http://ftpmaster.internal/ubuntu
|
|
|
|
dpkg --print-foreign-architectures | grep -q i386 || dpkg --add-architecture i386
|
|
|
|
;;
|
|
|
|
apt-get update
|
|
|
|
*)
|
|
|
|
|
|
|
|
MIRROR=http://archive.ubuntu.com/ubuntu
|
|
|
|
|
|
|
|
;;
|
|
|
|
|
|
|
|
esac
|
|
|
|
|
|
|
|
debootstrap --omponents=ain,universe $release $builddir $MIRROR
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mount -t devpts devpts-$builddir $builddir/dev/pts
|
|
|
|
|
|
|
|
chroot mount -t proc proc-$builddir /proc
|
|
|
|
|
|
|
|
chroot mount -t sysfs sys-$builddir /sys
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# set up multiarch inside the chroot
|
|
|
|
|
|
|
|
chroot $builddir dpkg --add-architecture i386
|
|
|
|
|
|
|
|
chroot $builddir apt-get update
|
|
|
|
|
|
|
|
|
|
|
|
# add cross build env including the needed i386 packages
|
|
|
|
# add cross build env including the needed i386 packages
|
|
|
|
apt-get -y install git gnupg flex bison gperf build-essential \
|
|
|
|
chroot $builddir apt-get -y install git gnupg flex bison gperf build-essential \
|
|
|
|
zip bzr curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
|
|
|
|
zip bzr curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
|
|
|
|
libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
|
|
|
|
libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
|
|
|
|
libgl1-mesa-dev g++-multilib mingw32 tofrodos phablet-tools \
|
|
|
|
libgl1-mesa-dev g++-multilib mingw32 tofrodos phablet-tools \
|
|
|
|
python-markdown libxml2-utils xsltproc zlib1g-dev:i386 schedtool \
|
|
|
|
python-markdown libxml2-utils xsltproc zlib1g-dev:i386 schedtool \
|
|
|
|
openjdk-6-jdk
|
|
|
|
openjdk-6-jdk
|
|
|
|
|
|
|
|
|
|
|
|
# get the git tree
|
|
|
|
# create an in chroot script to get the git tree and build it
|
|
|
|
phablet-dev-bootstrap -v $codename $builddir
|
|
|
|
cat << 'EOF' > $builddir/build-android.sh
|
|
|
|
|
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
phablet-dev-bootstrap -v $codename $builddir
|
|
|
|
cd $builddir
|
|
|
|
cd $builddir
|
|
|
|
repo sync
|
|
|
|
repo sync
|
|
|
|
|
|
|
|
|
|
|
|
. build/envsetup.sh
|
|
|
|
. build/envsetup.sh
|
|
|
|
brunch $codename
|
|
|
|
brunch $codename
|
|
|
|
|
|
|
|
EOF
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
chmod +x $builddir/build-android.sh
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
chroot $builddir /build-android.sh
|
|
|
|
|
|
|
|
|
|
|
|
cd -
|
|
|
|
cp $builddir/$builddir/out/target/product/$codename/*-$codename.zip ./livecd.ubuntu-touch-$codename.zip
|
|
|
|
cp $builddir/out/target/product/$codename/*-$codename.zip ./livecd.ubuntu-touch-$codename.zip
|
|
|
|
|
|
|
|
for image in system recovery boot; do
|
|
|
|
for image in system recovery boot; do
|
|
|
|
cp $builddir/out/target/product/$codename/$image.img ./livecd.ubuntu-touch-$codename.$image.img
|
|
|
|
cp $builddir/$builddir/out/target/product/$codename/$image.img ./livecd.ubuntu-touch-$codename.$image.img
|
|
|
|
done
|
|
|
|
done
|
|
|
|
rm -rf $buildir
|
|
|
|
|
|
|
|
|
|
|
|
umount $builddir/sys
|
|
|
|
|
|
|
|
umount $builddir/proc
|
|
|
|
|
|
|
|
umount $builddir/dev/pts
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
rm -rf $builddir
|
|
|
|