[the-board] [build] Add scripts to automatically build The Board and its deps
- From: Lucas Rocha <lucasr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [the-board] [build] Add scripts to automatically build The Board and its deps
- Date: Wed, 8 Dec 2010 17:31:38 +0000 (UTC)
commit 084d7077e73d4ddde107e8a380a7d3428f6ff9e9
Author: Lucas Rocha <lucasr gnome org>
Date: Wed Dec 8 16:26:14 2010 +0000
[build] Add scripts to automatically build The Board and its deps
build/jhbuildrc-the-board | 50 ++++++++++
build/the-board-build-setup.sh | 193 ++++++++++++++++++++++++++++++++++++++++
build/the-board.modules | 54 +++++++++++
3 files changed, 297 insertions(+), 0 deletions(-)
---
diff --git a/build/jhbuildrc-the-board b/build/jhbuildrc-the-board
new file mode 100644
index 0000000..94fc536
--- /dev/null
+++ b/build/jhbuildrc-the-board
@@ -0,0 +1,50 @@
+# -*- mode: python -*-
+
+# Only rebuild modules that have changed
+build_policy = 'updated'
+
+repos['git.gnome.org'] = 'ssh://lucasr git gnome org/git/'
+
+moduleset = 'http://git.gnome.org/browse/the-board/plain/build/the-board.modules'
+
+# A list of the modules to build.
+modules = [ 'the-board' ]
+
+# what directory should the source be checked out to?
+checkoutroot = os.path.expanduser('~/Code/the-board/source/')
+
+# the prefix to configure/install modules to (must have write access)
+prefix = os.path.expanduser('~/Code/the-board/install/')
+
+skip = [ 'mozilla', 'gtk+', 'libxml2', 'expat', 'libgcrypt',
+ 'libxslt', 'gnome-common', 'intltool', 'gnome-doc-utils',
+ 'gtk-doc', 'libgpg-error' ]
+#
+# For Ubuntu Intrepid, libmozjs lives in /usr/lib/xulrunner-<version>
+# However, that path isn't in ld.so.conf, meaning that it's basically
+# impossible to use the xulrunner .pc files and libraries. Work around
+# this by deriving the path and adding it to LD_LIBRARY_PATH ourself.
+#
+import re
+import subprocess
+_pkgconfig = subprocess.Popen(['pkg-config', '--variable=sdkdir', 'mozilla-js'],
+ stdout=subprocess.PIPE)
+_sdkdir = _pkgconfig.communicate()[0].strip()
+_pkgconfig.wait()
+if _pkgconfig.returncode == 0:
+ _libdir = re.sub('-(sdk|devel)', '', _sdkdir)
+ if os.path.exists(_libdir + '/libmozjs.so'):
+ addpath('LD_LIBRARY_PATH', _libdir)
+
+# extra arguments to pass to all autogen.sh scripts
+# to speed up builds of gnome2, try '--disable-static --disable-gtk-doc'
+# it is also possible to set CFLAGS this way, 'CFLAGS="-g -O2"' for example
+#autogenargs=''
+
+# On SMP systems you may use something like this to improve compilation time:
+# be aware that not all modules compile correctly with make -j2
+# You can also use 'make V=0' if you want less output while compiling.
+#makeargs = '-j2'
+
+addpath('PKG_CONFIG_PATH', '/usr/lib/pkgconfig')
+addpath('PKG_CONFIG_PATH', '/usr/share/pkgconfig')
diff --git a/build/the-board-build-setup.sh b/build/the-board-build-setup.sh
new file mode 100644
index 0000000..16fd159
--- /dev/null
+++ b/build/the-board-build-setup.sh
@@ -0,0 +1,193 @@
+#!/bin/sh
+#
+# Script that sets up jhbuild to build the-board. Run this to
+# checkout jhbuild and the required configuration. This is heavily
+# based on gnome-shell's gnome-shell-build-setup.sh
+#
+# Copyright (C) 2008, Red Hat, Inc.
+# Copyright (C) 2010, Lucas Rocha
+#
+# Some ideas and code taken from gtk-osx-build
+#
+# Copyright (C) 2006, 2007, 2008 Imendio AB
+#
+
+# Pre-check on GNOME version
+
+gnome_version=`gnome-session --version 2>/dev/null | (read name version && echo $version)`
+have_gnome_26=false
+case $gnome_version in
+ 2.2[6789]*|2.[3456789]*|3.*)
+ have_gnome_26=true
+ ;;
+esac
+
+if $have_gnome_26 ; then : ; else
+ echo "GNOME 2.26 or newer is required to build The Board" 1>&2
+ exit 1
+fi
+
+############################################################
+
+release_file=
+
+if which lsb_release > /dev/null 2>&1; then
+ system=`lsb_release -is`
+ version=`lsb_release -rs`
+elif [ -f /etc/fedora-release ] ; then
+ system=Fedora
+ release_file=/etc/fedora-release
+elif [ -f /etc/SuSE-release ] ; then
+ system=SUSE
+ release_file=/etc/SuSE-release
+elif [ -f /etc/mandriva-release ]; then
+ system=MandrivaLinux
+ release_file=/etc/mandriva-release
+fi
+
+if [ x$release_file != x ] ; then
+ version=`sed 's/[^0-9\.]*\([0-9\.]\+\).*/\1/' < $release_file`
+fi
+
+# Required software:
+#
+# For this script:
+# binutils, curl, gcc, make, git
+#
+# General build stuff:
+# automake, bison, flex, gettext, git, gnome-common, gtk-doc, intltool,
+# libtool, pkgconfig
+#
+# Devel packages needed by the-board and its deps:
+# dbus-glib, expat, GL, gstreamer, libffi,
+# libjasper, libjpeg, libpng, libpulse, libtiff,
+# libxml2, python, readline, spidermonkey ({mozilla,firefox,xulrunner}-js),
+# libvorbis
+#
+# Non-devel packages needed by the-board and its deps:
+# glxinfo, gstreamer-plugins-base, gstreamer-plugins-good,
+
+if test "x$system" = xUbuntu -o "x$system" = xDebian -o "x$system" = xLinuxMint ; then
+ reqd="
+ build-essential curl automake bison flex gettext git-core gnome-common
+ gnome-doc-utils gtk-doc-tools libdbus-glib-1-dev libexpat-dev libffi-dev
+ libjasper-dev libjpeg-dev libpng-dev libtiff-dev libgl1-mesa-dev
+ liborbit2-dev libpulse-dev libreadline5-dev libxml2-dev mesa-common-dev
+ mesa-utils xulrunner-dev libvorbis-dev
+ "
+
+ if [ ! -x /usr/bin/dpkg-checkbuilddeps ]; then
+ echo "Please run 'sudo apt-get install dpkg-dev' and try again."
+ echo
+ exit 1
+ fi
+
+ for pkg in $reqd ; do
+ if ! dpkg-checkbuilddeps -d $pkg /dev/null 2> /dev/null; then
+ missing="$pkg $missing"
+ fi
+ done
+ if test ! "x$missing" = x; then
+ echo "Please run 'sudo apt-get install $missing' and try again."
+ echo
+ exit 1
+ fi
+fi
+
+if test "x$system" = xFedora ; then
+ reqd="
+ binutils curl gcc gcc-c++ make automake bison flex gettext git gnome-common
+ gnome-doc-utils intltool libtool pkgconfig dbus-glib-devel jasper-devel
+ libffi-devel libjpeg-devel libpng-devel libtiff-devel mesa-libGL-devel
+ pulseaudio-libs-devel readline-devel xulrunner-devel
+ libxml2-devel glx-utils expat-devel libtool-ltdl-devel libvorbis-devel
+ "
+
+ if expr $version \>= 14 > /dev/null ; then
+ reqd="$reqd gettext-autopoint"
+ fi
+
+ for pkg in $reqd ; do
+ if ! rpm -q $pkg > /dev/null 2>&1; then
+ missing="$pkg $missing"
+ fi
+ done
+ if test ! "x$missing" = x; then
+ gpk-install-package-name $missing
+ fi
+fi
+
+if test "x$system" = xSUSE -o "x$system" = "xSUSE LINUX" ; then
+ reqd=""
+ for pkg in \
+ curl bison flex gtk-doc gnome-common gnome-doc-utils-devel \
+ libpulse-devel libtiff-devel libffi-devel \
+ xorg-x11-proto-devel readline-devel \
+ mozilla-xulrunner191-devel \
+ xorg-x11-devel xorg-x11 xorg-x11-server-extra \
+ ; 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\"' and try again."
+ echo
+ exit 1
+ fi
+fi
+
+if test "x$system" = xMandrivaLinux ; then
+ reqd=""
+ for pkg in \
+ curl bison flex gnome-common gnome-doc-utils gtk-doc intltool \
+ ffi5-devel GL-devel readline-devel libxulrunner-devel \
+ libxdamage-devel mesa-demos \
+ ; do
+ if ! rpm -q --whatprovides $pkg > /dev/null 2>&1; then
+ reqd="$pkg $reqd"
+ fi
+ done
+ if test ! "x$reqd" = x; then
+ gurpmi --auto $reqd
+ fi
+fi
+
+SOURCE=$HOME/Code/the-board
+BASEURL=http://git.gnome.org/browse/the-board/plain/build
+
+if [ -d $SOURCE ] ; then : ; else
+ mkdir -p $SOURCE
+ echo "Created $SOURCE"
+fi
+
+if [ -d $SOURCE/jhbuild ] ; then
+ if [ -d $SOURCE/jhbuild/.git ] ; then
+ echo "Updating jhbuild ... "
+ ( cd $SOURCE/jhbuild && git pull --rebase > /dev/null ) || exit 1
+ echo "done"
+ else
+ echo "$SOURCE/jhbuild is not a git repository"
+ echo "You should remove it and rerun this script"
+ exit 1
+ fi
+else
+ echo "Checking out jhbuild into $SOURCE/jhbuild ... "
+ cd $SOURCE
+ git clone git://git.gnome.org/jhbuild > /dev/null || exit 1
+ echo "done"
+fi
+
+echo "Installing jhbuild..."
+(cd $SOURCE/jhbuild && make -f Makefile.plain DISABLE_GETTEXT=1 bindir=$HOME/.bin install >/dev/null)
+
+echo -n "Writing ~/.jhbuildrc-the-board ... "
+curl -L -s -o $HOME/.jhbuildrc-the-board $BASEURL/jhbuildrc-the-board
+echo "done"
+
+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/build/the-board.modules b/build/the-board.modules
new file mode 100644
index 0000000..8d7634b
--- /dev/null
+++ b/build/the-board.modules
@@ -0,0 +1,54 @@
+<?xml version="1.0"?><!--*- mode: nxml; indent-tabs-mode: nil -*-->
+<!DOCTYPE moduleset SYSTEM "moduleset.dtd">
+<?xml-stylesheet type="text/xsl" href="moduleset.xsl"?>
+<!-- vim:set ts=2 expandtab: -->
+<moduleset>
+ <repository type="git" name="git.clutter-project.org"
+ href="git://git.clutter-project.org/"/>
+ <repository type="git" name="git.gnome.org"
+ href="git://git.gnome.org/"/>
+ <repository type="tarball" name="cairo.org"
+ href="http://cairographics.org/"/>
+ <repository type="tarball" name="0pointer.de"
+ href="http://0pointer.de/lennart/projects/"/>
+
+ <include href="~/Code/the-board/jhbuild/modulesets/gnome-suites-core-3.0.modules"/>
+
+ <autotools id="clutter-gtk">
+ <branch repo="git.clutter-project.org" module="clutter-gtk"/>
+ <dependencies>
+ <dep package="clutter"/>
+ <dep package="gtk+-3"/>
+ </dependencies>
+ </autotools>
+
+ <autotools id="clutter-gst">
+ <branch repo="git.clutter-project.org" module="clutter-gst"/>
+ <dependencies>
+ <dep package="gstreamer"/>
+ <dep package="gst-plugins-base"/>
+ <dep package="gst-plugins-good"/>
+ <dep package="glib"/>
+ </dependencies>
+ </autotools>
+
+ <autotools id="mx" autogenargs="--disable-gtk-widgets --with-clutter-gesture=no --without-clutter-imcontext">
+ <branch repo="git.clutter-project.org" module="mx"/>
+ <dependencies>
+ <dep package="clutter"/>
+ </dependencies>
+ </autotools>
+
+ <autotools id="the-board">
+ <branch repo="git.gnome.org" module="the-board"/>
+ <dependencies>
+ <dep package="gtk+-3"/>
+ <dep package="gjs"/>
+ <dep package="mx"/>
+ <dep package="clutter"/>
+ <dep package="clutter-gtk"/>
+ <dep package="clutter-gst"/>
+ </dependencies>
+ </autotools>
+
+</moduleset>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]