diff options
Diffstat (limited to 'build/install-build-deps.sh')
-rw-r--r-- | build/install-build-deps.sh | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/build/install-build-deps.sh b/build/install-build-deps.sh new file mode 100644 index 0000000..8cbd58e --- /dev/null +++ b/build/install-build-deps.sh @@ -0,0 +1,85 @@ +#!/bin/sh +# Script to install everything needed to build chromium (well, ideally, anyway) + +download() { + dir=$1 + file=$2 + if ! test -f $file + then + wget $MIRROR/$dir/$file + fi +} + +unpack_deb() { + file=$1 + 7z x $file + tar -xzvf data.tar.gz + rm -f data.tar.gz control.tar.gz +} + +download_deb() { + download $1 $2 + unpack_deb $2 +} + +install_hardy() { + sudo apt-get install g++ libnss3-dev libgtk2.0-dev git-svn bison gperf flex libnspr4 libsqlite3 +} + +install_hardy_64() { + sudo apt-get install g++ libnss3-dev libgtk2.0-dev git-svn bison gperf flex + + # The packages libnspr4, libnss3, and libsqlite don't have 32 + # bit compabibility versions on 64 bit ubuntu hardy, + # so install them packages the hard way + # See https://bugs.launchpad.net/ubuntu/+source/ia32-libs/+bug/246911 + # TODO: There is no bug report yet for 32 bit sqlite runtime + + mkdir -p workdir-hardy64 + cd workdir-hardy64 + rm -rf usr + + MIRROR=http://mirrors.kernel.org/ubuntu + download_deb pool/main/n/nspr libnspr4-0d_4.7.1~beta2-0ubuntu1_i386.deb + download_deb pool/main/n/nss libnss3-1d_3.12.0~beta3-0ubuntu1_i386.deb + download_deb pool/main/s/sqlite3 libsqlite3-0_3.4.2-2_i386.deb + + sudo mv usr/lib/* /usr/lib32/ + sudo ldconfig + + # Make missing symlinks as described by + # https://bugs.launchpad.net/ubuntu/+source/ia32-libs/+bug/277772 + # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=492453 + # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=497087 + cd /usr/lib32 + for lib in gdk-x11-2.0 atk-1.0 gdk_pixbuf-2.0 pangocairo-1.0 pango-1.0 \ + gobject-2.0 gmodule-2.0 glib-2.0 gtk-x11-2.0 + do + sudo ln -s -f lib$lib.so.0 lib$lib.so + done + for lib in cairo + do + sudo ln -s -f lib$lib.so.2 lib$lib.so + done + for lib in plds4 plc4 nspr4 + do + sudo ln -s -f /usr/lib32/lib$lib.so.0d /usr/lib32/lib$lib.so + done + + for lib in nss3 nssutil3 smime3 ssl3 + do + sudo ln -s -f /usr/lib32/lib$lib.so.1d /usr/lib32/lib$lib.so + done +} + +if grep -q "Ubuntu 8.04" /etc/issue && test `uname -m` = i386 +then + install_hardy +elsif grep -q "Ubuntu 8.04" /etc/issue && test `uname -m` = x86_64 +then + install_hardy_64 +else + echo "Unsupported system" + exit 1 +fi + |