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
|
2009-02-05 18:23:18 -05:00
|
|
|
BASEURL=http://git.gnome.org/cgit/gnome-shell/plain/tools/build
|
2008-10-31 01:25:28 -04:00
|
|
|
|
2009-02-02 17:22:00 -05:00
|
|
|
if ! which curl > /dev/null 2>&1; then
|
|
|
|
cat <<EOF
|
|
|
|
This script requires the curl program to run
|
|
|
|
For Debian-based systems run:
|
|
|
|
apt-get install curl
|
|
|
|
|
|
|
|
For Red Hat-based systems run:
|
|
|
|
yum install curl
|
2009-02-08 07:34:26 -05:00
|
|
|
|
|
|
|
For SuSE-based systems run:
|
|
|
|
zypper install curl
|
|
|
|
|
2009-02-13 12:21:51 -05:00
|
|
|
For Mandriva-based systems run:
|
|
|
|
urpmi curl
|
|
|
|
|
2009-02-02 17:22:00 -05:00
|
|
|
EOF
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2008-10-31 01:25:28 -04:00
|
|
|
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
|
|
|
|
|
2009-01-27 11:55:39 -05:00
|
|
|
if which lsb_release > /dev/null 2>&1; then
|
|
|
|
system=`lsb_release -is`
|
|
|
|
elif [ -f /etc/fedora-release ] ; then
|
|
|
|
system=Fedora
|
2009-02-08 07:34:26 -05:00
|
|
|
elif [ -f /etc/SuSE-release ] ; then
|
|
|
|
system=SuSE
|
2009-02-13 12:21:51 -05:00
|
|
|
elif [ -f /etc/mandriva-release ]; then
|
|
|
|
system=MandrivaLinux
|
2009-01-27 11:55:39 -05:00
|
|
|
fi
|
|
|
|
|
2008-11-17 19:45:32 -05:00
|
|
|
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 \
|
2009-02-02 17:22:00 -05:00
|
|
|
libgstreamer-plugins-base0.10-dev python2.5-dev libwnck-dev libreadline5-dev librsvg2-dev libgnomeui-dev; do
|
2008-11-29 16:44:17 -05:00
|
|
|
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
|
|
|
|
|
2009-01-27 11:55:39 -05:00
|
|
|
if test x$system = xFedora ; then
|
|
|
|
reqd=""
|
|
|
|
for pkg in libffi-devel libXdamage-devel gnome-doc-utils xulrunner-devel \
|
|
|
|
librsvg2-devel libgnomeui-devel xterm xorg-x11-apps xorg-x11-server-Xephyr \
|
2009-02-02 17:22:00 -05:00
|
|
|
libwnck-devel GConf2-devel readline-devel; do
|
2009-01-27 11:55:39 -05:00
|
|
|
if ! rpm -q $pkg > /dev/null 2>&1; then
|
|
|
|
reqd="$pkg $reqd"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
if test ! "x$reqd" = x; then
|
|
|
|
gpk-install-package-name $reqd
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2009-02-08 07:34:26 -05:00
|
|
|
if test x$system = xSuSE ; then
|
|
|
|
reqd=""
|
2009-02-10 15:29:56 -05:00
|
|
|
for pkg in libffi-devel xorg-x11-devel gnome-doc-utils-devel librsvg-devel \
|
2009-02-08 07:34:26 -05:00
|
|
|
mozilla-xulrunner190-devel libgnomeui-devel xterm xorg-x11 xorg-x11-server-extra \
|
|
|
|
libwnck-devel gconf2-devel readline-devel flex bison; do
|
|
|
|
if ! rpm -q $pkg > /dev/null 2>&1; then
|
|
|
|
reqd="$pkg $reqd"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
if test ! "x$reqd" = x; then
|
|
|
|
echo "Please run 'su --command=\"zypper install $reqd\"' before building gnome-shell."
|
|
|
|
echo
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2009-02-13 12:21:51 -05:00
|
|
|
if test x$system = xMandrivaLinux ; then
|
|
|
|
reqd=""
|
2009-02-13 12:53:54 -05:00
|
|
|
for pkg in ffi5-devel libxdamage-devel gtk-doc gnome-common gnome-doc-utils libxulrunner-devel \
|
2009-02-13 12:21:51 -05:00
|
|
|
librsvg2-devel libgnomeui2-devel xterm x11-apps x11-server-xephyr \
|
2009-02-13 15:03:16 -05:00
|
|
|
libwnck-1-devel libGConf2-devel readline-devel flex bison GL-devel \
|
2009-02-13 15:12:25 -05:00
|
|
|
zenity intltool mesa-demos ; do
|
2009-02-13 12:21:51 -05:00
|
|
|
if ! rpm -q --whatprovides $pkg > /dev/null 2>&1; then
|
|
|
|
reqd="$pkg $reqd"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
if test ! "x$reqd" = x; then
|
2009-02-13 12:53:54 -05:00
|
|
|
gurpmi --auto $reqd
|
2009-02-13 12:21:51 -05:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2008-10-31 01:25:28 -04:00
|
|
|
echo "Done."
|
|
|
|
|