diff --git a/image/insidesetup.sh b/image/insidesetup.sh index f84877e..847050e 100755 --- a/image/insidesetup.sh +++ b/image/insidesetup.sh @@ -1,54 +1,53 @@ #! /bin/bash set -e unset LANG #remove? or just install locales... source /etc/environment dpkg --add-architecture armhf echo "\ deb [arch=armhf] http://ports.ubuntu.com/ vivid main universe restricted deb-src [arch=armhf] http://ports.ubuntu.com/ vivid main universe restricted deb [arch=armhf] http://ports.ubuntu.com/ vivid-updates main universe restricted deb-src [arch=armhf] http://ports.ubuntu.com/ vivid-updates main universe restricted deb [arch=i386,amd64] http://archive.ubuntu.com/ubuntu vivid main universe restricted deb-src [arch=i386,amd64] http://archive.ubuntu.com/ubuntu vivid main universe restricted deb [arch=i386,amd64] http://archive.ubuntu.com/ubuntu vivid-updates main universe restricted deb-src [arch=i386,amd64] http://archive.ubuntu.com/ubuntu vivid-updates main universe restricted deb [arch=armhf,amd64] http://mobile.kci.pangea.pub vivid main deb-src [arch=armhf,amd64] http://mobile.kci.pangea.pub vivid main " > /etc/apt/sources.list apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A12B6139432062D1 apt update apt-get install crossbuild-essential-armhf adduser dh-exec vim zsh git htop python sudo -y adduser plasmamobile --gecos "" --disabled-password -mkdir -p /home/plasmamobile/src su - plasmamobile -c "git clone https://github.com/plasma-mobile/xutils.git /home/plasmamobile/xutils" echo "plasmamobile ALL=NOPASSWD:ALL" >> /etc/sudoers cat << EOF > /home/plasmamobile/.gitconfig [url "git://anongit.kde.org/"] insteadOf = kde: [url "ssh://git@git.kde.org/"] pushInsteadOf = kde: EOF tee --append /home/plasmamobile/.zshrc /home/plasmamobile/.bashrc >/dev/null << EOF export \`cat /etc/environment\` unset LANG CC=/usr/bin/arm-linux-gnueabihf-gcc VARS=\`dpkg-architecture -A amd64 -a armhf -l\` export \$VARS export PATH=/home/plasmamobile/xutils:\$PATH export QMAKESPEC=ubuntu-arm-gnueabihf-g++ EOF apt-get build-dep -a armhf kwin -y --force-yes #--host-architecture=armhf # force-yes is needed because "WARNING: The packages cannot be authenticated!" diff --git a/setup.sh b/setup.sh index bda239c..abb2fd4 100755 --- a/setup.sh +++ b/setup.sh @@ -1,26 +1,28 @@ #!/bin/bash CHROOT_PATH=`pwd`/plasma-mobile-sdk XBUILDER_DIR=$(readlink -f $(dirname -- "$0")) set -e ./chreatechroot $XBUILDER_DIR sed -e "s#@CHROOT_PATH@#$CHROOT_PATH#" \ -e "s#@SRC_PATH@#$1#" \ -e "s#@SHELL@#$SHELL#" \ $XBUILDER_DIR/go-mobile.in > $XBUILDER_DIR/go-mobile chmod a+x $XBUILDER_DIR/go-mobile mount |grep $CHROOT_PATH/sys 2>&1 >> /dev/null || mount --bind /sys $CHROOT_PATH/sys mount |grep $CHROOT_PATH/dev 2>&1 >> /dev/null || mount --bind /dev $CHROOT_PATH/dev mount |grep $CHROOT_PATH/proc 2>&1 >> /dev/null || mount --bind /proc $CHROOT_PATH/proc # Note: This script may fail in the end, since it installs cross-compile dependencies # which are often broken, so run this last chroot $CHROOT_PATH /root/insidesetup.sh sudo umount $CHROOT_PATH/sys sudo umount $CHROOT_PATH/dev sudo umount $CHROOT_PATH/proc + +sudo mkdir -p $CHROOT_PATH/home/plasmamobile/src