xserver-inst2.sh

Kurt Hindenburg <[email protected]>
Newsgroups gmane.comp.freedesktop.xserver
Message-ID <[email protected]>
I've re-arranged/cleanup the xserver-inst.sh somewhat.  It will now exit
upon any errors; also I added WANT_AUTO{CONF|MAKE} in case it is needed
to build fdo (I needed it).
  Kurt
xserver-inst2.sh (application/x-sh, 4.1 KB)
#!/bin/sh
#
# xserver-inst2.sh - A script to get the fdo CVS sources and 
#  build/install fdo.
#
# This is simply a re-arrangement/cleanup of the script on
#  http://www.freedesktop.org/Software/XserverInstallGuide
#
#
#  Kurt V. Hindenburg <[email protected]>
#   v0.1
#
# Location of local CVS destination
HOME=~/CVS/fdo
# Location to install binaries, etc
DIST=/opt/pkgs/fdo

# Is sudo required to 'make install' ?
SUDO="sudo "
SUDO=""

# Build the sources
BUILD=0
# Get the CVS sources
GETCVS=0

# What automake/autoconf do you need?
#export WANT_AUTOCONF=2.5
#export WANT_AUTOMAKE=1.7

usage() {
   echo "Usage: `basename $0` (cvs|build)"
   echo "  cvs       Get fdo CVS sources"
   echo "  build     Build and install the fdo sources"
   echo
   exit
}

if [ $# -ne 1 ]; then
   usage
fi

case $1 in
   cvs|--cvs)
      GETCVS=1
      ;;
   build|--build)
      BUILD=1
      ;;
   --help|*)
      usage
      ;;
esac

export PKG_CONFIG_PATH="${DIST}/lib/pkgconfig:$PKG_CONFIG_PATH"
cd ${HOME}

if [ "X${GETCVS}" ==  "X1" ]; then
   echo "^^^ Getting all the fdo source via CVS..."
   echo
   echo "   # PRESS [enter]"
   cvs -d :pserver:anoncvs-u7BhqnqprCWvj1b/[email protected]:/cvs login
   cvs -d :pserver:[email protected]:/cvs/xlibs co Xproto
   cvs -d :pserver:[email protected]:/cvs/xlibs co Xdmcp
   cvs -d :pserver:[email protected]:/cvs/xlibs co XExtensions
   cvs -d :pserver:[email protected]:/cvs/xlibs co xtrans
   cvs -d :pserver:[email protected]:/cvs/xlibs co Xau
   cvs -d :pserver:[email protected]:/cvs/xlibs co X11
   cvs -d :pserver:[email protected]:/cvs/xlibs co Xext
   cvs -d :pserver:[email protected]:/cvs/xlibs co Randr
   cvs -d :pserver:[email protected]:/cvs/xlibs co Render
   cvs -d :pserver:[email protected]:/cvs/xlibs co Xrender
   cvs -d :pserver:[email protected]:/cvs/xlibs co Xrandr
   cvs -d :pserver:[email protected]:/cvs/xlibs co FixesExt
   cvs -d :pserver:[email protected]:/cvs/xlibs co DamageExt
   cvs -d :pserver:[email protected]:/cvs/xlibs co Xfont
   cvs -d :pserver:[email protected]:/cvs/xlibs co ResourceExt
   cvs -d :pserver:[email protected]:/cvs/xlibs co CompositeExt
   cvs -d :pserver:anoncvs-u7BhqnqprCWvj1b/[email protected]:/cvs/xserver co xserver
   cvs -d :pserver:[email protected]:/cvs/xlibs co Xfixes
   cvs -d :pserver:[email protected]:/cvs/xlibs co Xcomposite
   cvs -d :pserver:[email protected]:/cvs/xlibs co Xdamage
   # http://freedesktop.org/cgi-bin/viewcvs.cgi/?cvsroot=xapps
   cvs -d :pserver:anoncvs-u7BhqnqprCWvj1b/[email protected]:/cvs/xapps co xcompmgr
fi

build_source()
{
   sdir=$1
   extra=$2
   if [ ! -x ${sdir} ]; then
      echo "Unable to cd to ${sdir}"
      exit
   fi
   pushd $sdir
   ./autogen.sh --prefix=$DIST $2 || exit
   make  || exit
   $SUDO make install || exit
   popd
}


if [ "X${BUILD}" ==  "X1" ]; then
   echo "^^^ Building all the fdo sources, installing into ${DIST}"

   # Format: build_source <directory> [extra parameters for ./autogen.sh]
   build_source "Xproto"
   build_source "Xdmcp"
   build_source "XExtensions"
   build_source "xtrans"
   build_source "Xau"
   build_source "X11"
   build_source "Xext"
   build_source "Randr"
   build_source "Render"
   build_source "Xrender"
   build_source "Xrandr"
   build_source "FixesExt"
   build_source "DamageExt"
   build_source "Xfont"
   build_source "ResourceExt"
   build_source "CompositeExt"
   build_source "xserver" "--enable-composite"
   build_source "Xfixes"
   build_source "Xcomposite"
   build_source "Xdamage"

   {
      pushd xcompmgr
      make  || exit
      $SUDO install xcompmgr $DIST/bin || exit
      popd
   }
fi

exit
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.