From d6dae414a4b8e1aa2c334025d95f0df99716de18 Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Fri, 31 Oct 2008 05:25:28 +0000 Subject: [PATCH] Add jhbuild setup script and moduleset gnome-shell.modules: moduleset to build gnome-shell and dependencies gnome-shell-build-setup.sh: Script to set up a jhbuild for gnome-shell, modelled after and partially copied from gtk-osx-build-setup.sh jhbuildrc-gnome-shell: ~/.jhbuildrc for the build jhbuildrc-custom-example: Example ~/.jhbuildrc-custom svn path=/trunk/; revision=3 --- tools/build/gnome-shell-build-setup.sh | 51 +++++++++++++++++++++ tools/build/gnome-shell.modules | 61 ++++++++++++++++++++++++++ tools/build/jhbuildrc-custom-example | 13 ++++++ tools/build/jhbuildrc-gnome-shell | 50 +++++++++++++++++++++ 4 files changed, 175 insertions(+) create mode 100755 tools/build/gnome-shell-build-setup.sh create mode 100644 tools/build/gnome-shell.modules create mode 100644 tools/build/jhbuildrc-custom-example create mode 100644 tools/build/jhbuildrc-gnome-shell diff --git a/tools/build/gnome-shell-build-setup.sh b/tools/build/gnome-shell-build-setup.sh new file mode 100755 index 000000000..5132b7689 --- /dev/null +++ b/tools/build/gnome-shell-build-setup.sh @@ -0,0 +1,51 @@ +#!/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 + +if test "x`echo $PATH | grep $HOME/bin`" == x; then + echo "PATH does not contain $HOME/bin, it is recommended that you add that." + echo +fi + +echo "Done." + diff --git a/tools/build/gnome-shell.modules b/tools/build/gnome-shell.modules new file mode 100644 index 000000000..34e488488 --- /dev/null +++ b/tools/build/gnome-shell.modules @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tools/build/jhbuildrc-custom-example b/tools/build/jhbuildrc-custom-example new file mode 100644 index 000000000..ebcdf06f9 --- /dev/null +++ b/tools/build/jhbuildrc-custom-example @@ -0,0 +1,13 @@ +# -*- mode: python -*- + +# The username for repositories can be overridden. +# +#repos["svn.gnome.org"] = "svn+ssh://myusername@svn.gnome.org/svn/" + +# Directory where to check sources out +# +#checkoutroot = '/opt/gnome-shell/source' + +# Directory where to install +# +#prefix = '/opt/gnome-shell/install' diff --git a/tools/build/jhbuildrc-gnome-shell b/tools/build/jhbuildrc-gnome-shell new file mode 100644 index 000000000..f120b1d53 --- /dev/null +++ b/tools/build/jhbuildrc-gnome-shell @@ -0,0 +1,50 @@ +# -*- mode: python -*- +# +# jhbuildrc for building gnome-shell. Customizations shuld be done in +# ~/.jhbuildrc-custom +# +# Copyright (C) 2008 Red Hat, Inc. +# +# Some ideas and a bit of code taken from gtk-osx-build +# +# Copyright (C) 2006, 2007, 2008 Imendio AB +# +# Use .jhbuildrc-custom to override the moduleset, modules to build, +# the source checkout location, installation prefix, or svn usernames +# etc. +# +# JHBUILDRC_GNOME_SHELL - Do not edit this line (or anything else) + +# Only rebuild modules that have changed +build_policy = 'updated' + +moduleset = 'http://svn.gnome.org/svn/gnome-shell/trunk/tools/build/gnome-shell.modules' + +modules = [ 'gnome-shell' ] + +# what directory should the source be checked out to? +checkoutroot = os.path.expanduser('~/gnome-shell/source') + +# the prefix to configure/install modules to (must have write access) +prefix = os.path.expanduser('~/gnome-shell/install') + +# Use system libraries for the builds +addpath('PKG_CONFIG_PATH', os.path.join(os.sep, 'usr', 'lib', 'pkgconfig')) +addpath('PKG_CONFIG_PATH', os.path.join(os.sep, 'usr', 'share', 'pkgconfig')) + +# Look in /usr/share for icons, D-BUS service files, etc +addpath('XDG_DATA_DIRS', '/usr/share') +# Look in /etc/xdg for system-global autostart files +addpath('XDG_CONFIG_DIRS', '/etc/xdg') + +# Rebuild faster +os.environ['INSTALL'] = os.path.expanduser('~/bin/install-check') + +# Import optional user RC for further customization. You can override +# the prefix or default build setup for example, or CFLAGS or +# module_autogenargs, etc. +# +_userrc = os.path.join(os.environ['HOME'], '.jhbuildrc-custom') +if os.path.exists(_userrc): + execfile(_userrc) +