#!/bin/sh if [ `whoami` != "root" ] ; then echo "$0: You must be root to run this script" exit 1 fi apt-get -q -y install lsb UVERSION=$(lsb_release -sc) echo echo "Running Icetray setup for Ubuntu '$UVERSION'" echo COMMON_PKGS="ubuntu-minimal aptitude autoconf automake bzip2 cmake curl dpkg-dev freebsd-buildutils g++ gcc gfortran libhtml-parser-perl libbsd-dev libbz2-dev libfreetype6-dev libmysqlclient15-dev libgl1-mesa-dev libpcre3-dev libssl-dev libx11-dev libxft-dev libxi-dev libxmu-dev libxpm-dev libxt-dev libxml2-dev m4 make libncurses5-dev patch python-dev python-software-properties rsync subversion tcl-dev texinfo wget python-urwid " hardy_PKGS="libglut3-dev" intrepid_PKGS="cmake-gui libglut3-dev" jaunty_PKGS="cmake-gui libglut3-dev" karmic_PKGS="cmake-curses-gui libglut3-dev" lucid_PKGS="cmake-curses-gui libglut3-dev" oneiric_PKGS="cmake-curses-gui freeglut3-dev" precise_PKGS="cmake-curses-gui freeglut3-dev" MORE_PKGS=$(eval echo \$${UVERSION}_PKGS) if [ ${UVERSION} = "lucid" ]; then add-apt-repository "deb http://archive.canonical.com/ lucid partner" fi echo -n "Updating apt... " apt-get -qq update if [ $? -ne 0 ] ; then cat Ubuntu.log printf %s " Please report this problem (with full output above) to dataclass@icecube.wisc.edu or icetray-dev@icecube.umd.edu Exiting in order to avoid further problems... " exit 1 fi echo "okay." echo echo -n "Installing packages... " echo > Ubuntu.log if [ $? != 0 ] ; then echo "$0: Unable to create log file 'Ubuntu.log'. Please run in writable directory." exit 1 fi apt-get install -y $COMMON_PKGS >Ubuntu.log 2>&1 if [ $? -ne 0 ] ; then cat Ubuntu.log printf %s " Please report this problem (with full output above) to dataclass@icecube.wisc.edu or icetray-dev@icecube.umd.edu Exiting in order to avoid further problems... " exit 1 fi echo "okay." echo echo -n "Installing extra packages... " apt-get install -y $COMMON_PKGS $MORE_PKGS >Ubuntu.log 2>&1 if [ $? -ne 0 ] ; then cat Ubuntu.log printf %s " Please report this problem (with full output above) to dataclass@icecube.wisc.edu or icetray-dev@icecube.umd.edu Exiting in order to avoid further problems... " exit 1 fi echo "okay." echo printf %s "\ We no longer install Java for you. If you wish to use Java you have to install Oracle's JDK or OpenJDK yourself. " echo echo "Done. You can now build ports."