All pastes #973647 Raw Edit

Mine

public text v1 · immutable
·published 2008-04-06 06:49 UTC
rendered paste body
# Contributor: Fyda <solinde@gmail.com>
# This script compiles the cairo-dock plugins from SVN.
# Cairo-dock can be found at:
# http://developer.berlios.de/projects/cairo-dock/
# Cairo-dock is released under the GPL.

# NOTE! You'll need at least the following to build this
# successfully:
# libxxf86vm vte subversion autoconf automake intltool pkgconfig libtool perlxml

# This script sets /usr/local as the prefix (not /usr).
# It also does a `sudo make install' for each item, so you might need to
# stick around and type in the password when it brings up a prompt for that.
_svnmod="plug-ins"
_svntrunk="http://svn.berlios.de/svnroot/repos/cairo-dock/trunk"

  if [ -d $_svnmod ] ; then
    cd $_svnmod
    svn update || return 1
    echo "Files are up to date."
  else
    svn checkout $_svntrunk/$_svnmod || return 1
    cd $_svnmod
  fi
  echo "SVN checkout done."

  echo "Starting make..."

# get directory listing, remove "template" because it shouldn't be compiled
_itemstocompile="$(echo */ | sed s/template// | sed s/\\///g)"

# create lists of items that failed at 1) autoreconf, 2) configure, and 3) make
_failedarc=""
_failedconf=""
_failedmake=""
# and a list of successfully built items
_successfulitems=""

  for a in $_itemstocompile ; do
    echo "Making $a..."
    cd $a
    cd ../$a
    autoreconf -isvf
    if [ $? -ne 0 ]; then
      _failedarc="$_failedarc $a"
      echo "WARNING: $a failed during autoreconf!"
    else
      CFLAGS="$CFLAGS -Wno-error" CXXFLAGS="$CXXFLAGS -Wno-error" ./configure --prefix=/usr/local
      if [ $? -ne 0 ]; then
        _failedconf="$_failedconf $a"
        echo "WARNING: $a did not pass pre-build checks! You are probably missing some build dependencies."
      else
        make
        if [ $? -ne 0 ]; then
          _failedmake="$_failedmake $a"
          echo "WARNING: $a failed to build!"
        else
          sudo make install || return 1
          _successfulitems="$_successfulitems $a"
          echo "Successfully made and installed $a."
        fi
      fi
    fi
  done

if [ ! -z "$_failedarc" ]; then
  echo "** The following plug-ins failed during autoreconf:"
  echo "$_failedarc"
fi

if [ ! -z "$_failedconf" ]; then
  echo "** The following plug-ins failed during configure (probably missing build dependencies):"
  echo "$_failedconf"
fi

if [ ! -z "$_failedmake" ]; then
  echo "** The following plug-ins failed to build:"
  echo "$_failedmake"
fi

if [ ! -z "$_successfulitems" ]; then
  echo "** The following plug-ins were successfully built:"
  echo "$_successfulitems"
fi