diff options
author | Amit Pundir <amit.pundir@linaro.org> | 2013-05-17 16:28:07 +0530 |
---|---|---|
committer | Amit Pundir <amit.pundir@linaro.org> | 2013-05-17 16:28:07 +0530 |
commit | 2f339f6d3f90ad636f3e1e51995df4a85d8c7945 (patch) | |
tree | 2aca9f3c1bfe1e0f75a57cb82941c072c8597881 /build-scripts | |
parent | d398cbf2343379783f20bab3ffbdd62910e2a9de (diff) |
create-user-build-script: rework on broken dependencies and support 13.04 host build machine
Diffstat (limited to 'build-scripts')
-rwxr-xr-x | build-scripts/create-user-build-script | 68 |
1 files changed, 55 insertions, 13 deletions
diff --git a/build-scripts/create-user-build-script b/build-scripts/create-user-build-script index 2fa80ba..60ec4a9 100755 --- a/build-scripts/create-user-build-script +++ b/build-scripts/create-user-build-script @@ -64,34 +64,76 @@ done UBUNTU=\`cat /etc/issue.net | cut -d' ' -f2\` HOST_ARCH=\`uname -m\` if [ \${HOST_ARCH} == "x86_64" ] ; then - PKGS='git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev libc6-dev lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z1-dev libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc uboot-mkimage openjdk-6-jdk openjdk-6-jre vim-common' + PKGS='gnupg flex bison gperf build-essential zip curl zlib1g-dev libc6-dev lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z1-dev libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc uboot-mkimage openjdk-6-jdk openjdk-6-jre vim-common python-parted python-yaml wget' else echo "ERROR: Only 64bit Host(Build) machines are supported at the moment." exit 1 fi -if [[ \${UBUNTU} =~ "12." ]]; then - PKGS+=' lib32readline-gplv2-dev' -elif [[ \${UBUNTU} =~ "10.04" ]] ; then - PKGS+=' ia32-libs lib32readline5-dev' +echo +if [[ \${UBUNTU} =~ "13." || \${UBUNTU} =~ "12.10" ]]; then + if [ \`dpkg-query -W -f='\${Status}\n' software-properties-common 2>&1 | grep -i 'No packages found matching' | wc -l\` -gt 0 ] ; then + echo "Installing missing base dependency .." + sudo apt-get install software-properties-common + fi + sudo dpkg --add-architecture i386 + echo + echo "Checking missing dependencies if any .. .." + PKGS+=' libstdc++6:i386 git-core' + MISSING=\`dpkg-query -W -f='\${Status}\n' \${PKGS} 2>&1 | grep -i 'No packages found matching' | cut -d' ' -f6\` + if [ -n "\$MISSING" ] ; then + echo -n "Missing required packages: " + for m in \$MISSING ; do + echo -n "\${m} " + done + fi +elif [[ \${UBUNTU} =~ "12.04" || \${UBUNTU} =~ "10.04" ]] ; then + if [ \`dpkg-query -W -f='\${Status}\n' python-software-properties 2>&1 | grep -i 'No packages found matching' | wc -l\` -gt 0 ] ; then + echo "Installing missing base dependency .." + sudo apt-get install python-software-properties + fi + echo "Checking missing dependencies if any .. .." + if [[ \${UBUNTU} =~ "12.04" ]]; then + PKGS+=' libstdc++6:i386 git-core' + else + PKGS+=' ia32-libs libssl-dev libcurl4-gnutls-dev libexpat1-dev gettext' + fi + MISSING=\`dpkg-query -W -f='\${Status}\n' \${PKGS} 2>&1 | grep -i 'No packages found matching' | cut -d' ' -f5\` + if [ -n "\$MISSING" ] ; then + echo -n "Missing required packages: " + for m in \$MISSING ; do + echo -n "\${m%?} " + done + fi else echo - echo "ERROR: Only Ubuntu 10.04, 12.04 and 12.10 versions are supported." + echo "ERROR: Only Ubuntu 10.04*, 12.* and 13.04 versions are supported." exit 1 fi -echo "Checking and installing missing dependencies if any .. .." -MISSING=\`dpkg-query -W -f='\${Status}\n' \${PKGS} 2>&1 | grep -i 'No packages found matching' | cut -d' ' -f6\` if [ -n "\$MISSING" ] ; then - echo -n "Missing required packages: " - for m in \$MISSING ; do - echo -n "\${m%?} " - done echo + echo "Setting up Ubuntu software repositories .." sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu \$(lsb_release -sc) main universe restricted multiverse" sudo apt-get update echo - sudo apt-get install \${MISSING} + echo "Installing missing dependencies .. .." + sudo apt-get install \`echo \${MISSING} | sed 's/\.//g'\` gnupg flex bison build-essential libc6-dev g++-multilib + # Obsolete git version 1.7.04 in lucid official repositories + # repo need at least git v1.7.2 + if [[ \${UBUNTU} =~ "10.04" ]]; then + echo + echo "repo tool complains of obsolete git version 1.7.04 in lucid official repositories" + echo "Building git for lucid from precise sources .." + wget http://archive.ubuntu.com/ubuntu/pool/main/g/git/git_1.7.9.5.orig.tar.gz + tar xzf git_1.7.9.5.orig.tar.gz + cd git-1.7.9.5/ + make prefix=/usr + sudo make prefix=/usr install + fi +else + echo "No missing package dependencies. Good to Go! " fi +echo EOF if [ -n "$SOURCE_OVERLAY" ]; then |