[EMAIL PROTECTED] wrote:

Hi!

I am interested in this build script.

It's included. Please check into the script to adopt path
settings. Also you've to populate the src/Repository
directory manually by fetching the tools in question and you
need stow. My current layout is

   /opt/chess/src/
   /opt/chess/src/build_chess
   /opt/chess/src/Repository

Put sources into this Repository.

   /opt/chess/stow

gets populated by the script with something like

   /opt/chess/stow/crafty-22.1
   /opt/chess/stow/scid-3.6.26

and so on, ie. each program in it's own dir.

Finally, the binaries etc. live in

   /opt/chess/bin
   /opt/chess/lib
   /opt/chess/share

and so on, just the usual Unix structure, and this is
managed by stow.

Where the repository contains something like

   Fruit-2-3-1-Linux.zip
   Homer-201-linux.tar.gz
   Sjeng-Free-11.2.tar.gz
   TogaII1.2.1a.zip
   TogaII1.3.1.zip
   crafty-19.19.tar.gz
   crafty-20.13.zip
   crafty-20.14.zip
   crafty-21.6.zip
   crafty-22.1.zip
   dgtnix-1.9.1.tar.gz
   fruit_21.zip
   fruit_221_linux.tar.gz
   g2-epsilon5.zip
   glaurung121-src.tar.gz
   glaurung21.zip
   gnuchess-5.07.tar.gz
   phalanx-XXII.tar.gz
   polyglot-141.patch
   polyglot_14.zip
   scid-3.6.26.tar.bz2
   scid_3.6.1-2.diff.gz
   xboard-4.2.7.tar.gz
   xboard_4.2.7-2.patch
   xboard_4.2.7-2_DGT.patch

build_chess is a pretty straight forward hack that unpacks
an archive and runs the necessary build procedures. I add
them manually as they're different form tool to tool and
from version to version. In essence it is also my man page
for "how the ... does one build xyz!?" Usually I just
comment out old instructions, and for partial builds I just
comment the function calls at the end of the file.

An additional note applies to Scid. I do not like Pascals
"all in one package" philosophy. Therefore almost
everythings beyond the pure Scid is silently ignored when I
build Scid by this script. This is true for books and stuff,
but also for engines, especially Phalanx. As Scid needs an
adopted version of Phalanx please create this source tar.gz
out of Scids source tree. For the global files like books
etc. I use some /opt/chess/stow/Share/share/scid directory
which is then sorted in by stow to /opt/chess/share/scid
properly.

BTW: As you're not the only one interested, I'll also cc'd
it to the list. Though slightly off topic, I know. Sorry for
that.

--

Kind regards,                /                 War is Peace.
                            |            Freedom is Slavery.
Alexander Wagner            |         Ignorance is Strength.
                            |
                            | Theory     : G. Orwell, "1984"
                           /  In practice:   USA, since 2001
#!/bin/sh
REPOS=/opt/chess/src/Repository
STOW=/opt/chess/stow

topdir=`pwd`

#----------------------------------------------------------------------
# Build scid
#----------------------------------------------------------------------
buildscid() {
        ver=3.6.26
        sciddir=$STOW/scid-$ver
        tar -jxf $REPOS/scid-$ver.tar.bz2
        cd scid
        ./configure
        make
        make eco2pgn
        make eco2epd
        mkdir -p $sciddir/bin
        mkdir -p $sciddir/lib
        mkdir -p $sciddir/share/scid

        cp scid scidlet scidpgn spliteco pgnscid $sciddir/bin/
        cp scmerge tcscid tkscid pgnfix $sciddir/bin/
        cp sc_* $sciddir/bin/
        cp eco2* $sciddir/bin/
        chmod go+rx $sciddir/bin/
        cp -p *.so $sciddir/lib
        chmod go+rx $sciddir/lib/
        cp -r bases $sciddir/share/scid
        cp -r books $sciddir/share/scid
        chmod go+rw $sciddir/share/scid/books/*
        cp -r sounds $sciddir/share/scid
        cp -r *.ssp $sciddir/share/scid
        cp -r scid.eco $sciddir/share/scid
        cd $topdir
}


#----------------------------------------------------------------------
# Build crafty
#----------------------------------------------------------------------
buildcrafty () {
        ### ver=19.19
        ### craftydir=$STOW/crafty-$ver
        ### tar -zxf $REPOS/crafty-$ver.tar.gz
        ### cd crafty-$ver
        ### cd ..

        # ver=20.14
        # craftydir=$STOW/crafty-$ver
        # unzip $REPOS/crafty-$ver.zip
        # cd crafty-$ver
        # opt="-DDGT -DTRACE -DEPD"
        # make linux
        # mkdir -p $craftydir/bin
        # cp crafty $craftydir/bin/crafty-$ver
        # cp speak  $craftydir/bin/speak-$ver
        # cd $topdir

        # ver=21.6
        # craftydir=$STOW/crafty-$ver
        # unzip $REPOS/crafty-$ver.zip
        # cd crafty-$ver
        # opt="-DDGT -DTRACE -DEPD"
        # make linux
        # mkdir -p $craftydir/bin
        # cp crafty $craftydir/bin/crafty-$ver
        # cp speak  $craftydir/bin/speak-$ver
        # cd $topdir

        ver=22.1
        craftydir=$STOW/crafty-$ver
        unzip $REPOS/crafty-$ver.zip
        cd crafty-$ver
        opt="-DDGT -DTRACE -DEPD -DSKILL"
        make linux
        mkdir -p $craftydir/bin
        cp crafty $craftydir/bin/crafty-$ver
        cp speak  $craftydir/bin/speak-$ver
        cd $topdir
}

#----------------------------------------------------------------------
# Build fruit
#----------------------------------------------------------------------
buildfruit () {
        ver=2.1
        fruitdir=$STOW/fruit-$ver
        unzip $REPOS/fruit_21.zip
        cd fruit_21/src
        make
        mkdir -p $fruitdir/bin
        cp fruit $fruitdir/bin/fruit-$ver
        cd $topdir
}

#----------------------------------------------------------------------
# Build Toga II
#----------------------------------------------------------------------
buildtoga () {
        ver=1.2.1a
        togadir=$STOW/TogaII-$ver
        mkdir TogaII-$ver
        cd TogaII-$ver
        unzip $REPOS/TogaII$ver.zip
        cd src
        make
        mkdir -p $togadir/bin
        cp fruit $togadir/bin/togaII-$ver
        cd $topdir

        ver=1.3.1
        mkdir TogaII-$ver
        cd TogaII-$ver
        unzip $REPOS/TogaII$ver.zip
        cd src
        make
        mkdir -p $togadir/bin
        cp fruit $togadir/bin/togaII-$ver
        cd $topdir
}

#----------------------------------------------------------------------
# Build Glaurung
#----------------------------------------------------------------------
buildglaurung () {
        ver=121
        glaurungdir=$STOW/glaurung-$ver
        mkdir glaurung-$ver
        cd glaurung-$ver
        tar -zxvf $REPOS/glaurung$ver-src.tar.gz
        cd src
        make
        mkdir -p $glaurungdir/bin
        cp glaurung $glaurungdir/bin/glaurung-$ver
        cd $topdir


        ver=21
        glaurungdir=$STOW/glaurung-$ver
        unzip $REPOS/glaurung$ver.zip
        cd glaurung$ver/src
        make
        mkdir -p $glaurungdir/bin
        cp glaurung $glaurungdir/bin/glaurung-$ver
        cd $topdir
}

#----------------------------------------------------------------------
# Build Sjeng
#----------------------------------------------------------------------
buildsjeng () {
        ver=Free-11.2
        sjengdir=$STOW/Sjeng-$ver
        tar -zxf $REPOS/Sjeng-$ver.tar.gz
        cd Sjeng-$ver
        ./configure --prefix=$sjengdir
        make
        make install
        cd $topdir
}

#----------------------------------------------------------------------
# Build gnuchess (does not build)
#----------------------------------------------------------------------
buildgnuchess () {
        ver=5.07
        gnuchessdir=$STOW/gnuchess-$ver
        tar -zxf $REPOS/gnuchess-$ver.tar.gz
        cd gnuchess-$ver
        ./configure --prefix=$gnuchessdir
        make
        make install
        cd $topdir
}

#----------------------------------------------------------------------
# Build Phalanx XXII
#----------------------------------------------------------------------
buildphalanx () {
        ver=XXII
        phalanxdir=$STOW/phalanx-$ver
        tar -zxf $REPOS/phalanx-XXII.tar.gz
        cd Phalanx-XXII
        make
        mkdir -p $phalanxdir/bin
        cp phalanx $phalanxdir/bin/phalanxXXII
        cd $topdir
}

#----------------------------------------------------------------------
# Install Homer Chess engine (binary only :(
#----------------------------------------------------------------------
buildhomer() {
        ver=201
        homerdir=$STOW/homer-$ver
        mkdir -p $homerdir/bin
        mkdir -p $homerdir/share/homer
        cd $homerdir/bin
        tar -zxvf $REPOS/Homer-$ver-linux.tar.gz
        mv *.sty $homerdir/share/homer
        mv *.pdf $homerdir/share/homer
        mv *.ini $homerdir/share/homer
        mv *.dat $homerdir/share/homer
        mv homer homer-$ver
}

#----------------------------------------------------------------------
# Build xboard with DGT support
#----------------------------------------------------------------------
buildxboard () {
        ver=4.2.7
        xboarddir=$STOW/xboard-$ver
        tar -zxf $REPOS/xboard-$ver.tar.gz
        cd xboard-$ver
        patch -p1 < $REPOS/xboard_$ver-2.patch
        patch -p1 < $REPOS/xboard_$ver-2_DGT.patch
        ./configure --prefix=$STOW/xboard-$ver
        make
        make install
        cd $topdir
}

#----------------------------------------------------------------------
# Build polyglot
#----------------------------------------------------------------------
buildpolyglot () {
        ver=1.4.1
        polyglotdir=$STOW/polyglot-$ver
        mkdir polyglot-$ver
        cd polyglot-$ver
        unzip $REPOS/polyglot_14.zip
        cd polyglot_14/src
        patch -p1 < $REPOS/polyglot-141.patch
        make
        mkdir -p $polyglotdir/bin
        cp polyglot $polyglotdir/bin
        cd $topdir
}

#----------------------------------------------------------------------
# Build dgtnix
#----------------------------------------------------------------------
builddgtnix () {
        ver=1.9.1
        dgtnixdir=$STOW/dgtnix-$ver
        tar -zxf $REPOS/dgtnix-$ver.tar.gz
        cd dgtnix-$ver
        ./configure --prefix=$STOW/dgtnix-$ver
        make
        make install
        cd $topdir
}

#----------------------------------------------------------------------
# Build eboard
#----------------------------------------------------------------------
buildeboard() {
        ver=1.0.4
        eboarddir=$STOW/eboard-$ver
        tar -jxf $REPOS/eboard-$ver.tar.bz2
        cd eboard-$ver
        ./configure --prefix=$STOW/eboard-$ver
        make
        make install
        cd $topdir
}


#======================================================================
# Build /opt/chess :)
#======================================================================

buildscid
# buildcrafty 
# buildfruit 
# buildtoga 
# buildglaurung 
# buildsjeng 
# buildhomer
# ## buildgnuchess 
# buildphalanx 
# buildxboard 
# buildpolyglot 
# builddgtnix 
# buildeboard

cd $STOW
stow --restow -vv *
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Scid-users mailing list
Scid-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scid-users

Reply via email to