2008-10-31 01:25:28 -04:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Script that sets up jhbuild to build gnome-shell. Run this to
|
|
|
|
# checkout jhbuild and the required configuration.
|
|
|
|
#
|
|
|
|
# Copyright (C) 2008, Red Hat, Inc.
|
|
|
|
#
|
|
|
|
# Some ideas and code taken from gtk-osx-build
|
|
|
|
#
|
|
|
|
# Copyright (C) 2006, 2007, 2008 Imendio AB
|
|
|
|
#
|
|
|
|
SOURCE=$HOME/Source
|
|
|
|
BASEURL=http://svn.gnome.org/svn/gnome-shell/trunk/tools/build
|
|
|
|
|
|
|
|
if [ -d $SOURCE ] ; then : ; else
|
|
|
|
mkdir $SOURCE
|
|
|
|
echo "Created $SOURCE"
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo -n "Checking out jhbuild into $SOURCE/jhbuild ... "
|
|
|
|
cd $SOURCE
|
|
|
|
svn co http://svn.gnome.org/svn/jhbuild/trunk jhbuild > /dev/null
|
|
|
|
echo "done"
|
|
|
|
|
|
|
|
echo "Installing jhbuild..."
|
|
|
|
(cd $SOURCE/jhbuild && make -f Makefile.plain DISABLE_GETTEXT=1 install >/dev/null)
|
|
|
|
|
|
|
|
if [ -e $HOME/.jhbuildrc ] ; then
|
|
|
|
if grep JHBUILDRC_GNOME_SHELL $HOME/.jhbuildrc > /dev/null ; then : ; else
|
|
|
|
mv $HOME/.jhbuildrc $HOME/.jhbuildrc.bak
|
|
|
|
echo "Saved ~/.jhbuildrc as ~/.jhbuildrc.bak"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo -n "Writing ~/.jhbuildrc ... "
|
|
|
|
curl -s -o $HOME/.jhbuildrc $BASEURL/jhbuildrc-gnome-shell
|
|
|
|
echo "done"
|
|
|
|
|
|
|
|
if [ ! -f $HOME/.jhbuildrc-custom ]; then
|
|
|
|
echo -n "Writing example ~/.jhbuildrc-custom ... "
|
|
|
|
curl -s -o $HOME/.jhbuildrc-custom $BASEURL/jhbuildrc-custom-example
|
|
|
|
echo "done"
|
|
|
|
fi
|
|
|
|
|
2008-11-04 13:07:07 -05:00
|
|
|
if test "x`echo $PATH | grep $HOME/bin`" = x; then
|
2008-10-31 01:25:28 -04:00
|
|
|
echo "PATH does not contain $HOME/bin, it is recommended that you add that."
|
|
|
|
echo
|
|
|
|
fi
|
|
|
|
|
2008-11-17 19:45:32 -05:00
|
|
|
system=`lsb_release -is`
|
|
|
|
if test x$system = xUbuntu -o x$system = xDebian ; then
|
2008-11-28 15:35:32 -05:00
|
|
|
reqd=""
|
2008-11-29 16:44:17 -05:00
|
|
|
for pkg in build-essential automake gnome-common flex bison curl \
|
|
|
|
git-core subversion gtk-doc-tools mesa-common-dev xulrunner-1.9-dev \
|
|
|
|
libdbus-glib-1-dev libffi-dev libgconf2-dev libgtk2.0-dev libgl1-mesa-dev \
|
|
|
|
libgstreamer-plugins-base0.10-dev python2.5-dev; do
|
|
|
|
if ! dpkg --status $pkg > /dev/null 2>&1; then
|
2008-11-28 15:35:32 -05:00
|
|
|
reqd="$pkg $reqd"
|
|
|
|
fi
|
|
|
|
done
|
2008-11-29 16:44:17 -05:00
|
|
|
if test ! "x$reqd" = x; then
|
|
|
|
echo "Please run 'sudo apt-get install $reqd' before building gnome-shell."
|
2008-11-28 15:35:32 -05:00
|
|
|
echo
|
|
|
|
fi
|
2008-11-17 19:45:32 -05:00
|
|
|
fi
|
|
|
|
|
2008-10-31 01:25:28 -04:00
|
|
|
echo "Done."
|
|
|
|
|