• Linux build script

    From andrew clarke@3:633/267 to All on Sunday, May 29, 2016 09:59:56
    A while back I wrote a shell script to perform a CVS checkout of the more popular Husky modules then automatically start building them. It uses -rpath for the linker, avoiding the need for the user to modify LD_LIBRARY_PATH as suggested in huskymak.cfg. (You can read about why modifying LD_LIBRARY_PATH is
    bad at http://xahlee.info/UnixResource_dir/_/ldpath.html.)

    I've only tested this on Ubuntu but it should work on any Linux distro.

    HUSKYSRC is where the source code is copied to.

    PREFIX is the installation directory.

    MODULES are the Husky modules you want to build, in dependency order.

    CVSROOT is the location of the Husky CVS. You'll only need to change this if it
    ever moves away from SourceForge.


    #!/bin/sh -e

    HUSKYSRC=$HOME/src/husky
    PREFIX=$HOME/husky
    MODULES="huskylib smapi fidoconf nltools areafix hpt htick msged" CVSROOT=:pserver:anonymous@husky.cvs.sourceforge.net:/cvsroot/husky
    CC="gcc -Wl,-rpath,$PREFIX/lib"

    setup ()
    {
    mkdir -p $HUSKYSRC
    cd $HUSKYSRC
    cvs -d$CVSROOT co huskybse
    cp -p huskybse/huskymak.cfg $HUSKYSRC
    }

    checkout ()
    {
    cd $HUSKYSRC
    cvs -d$CVSROOT co $MODULES
    }

    build ()
    {
    cd $HUSKYSRC/$1
    make PREFIX=$PREFIX CC="$CC" LDCONFIG=
    make PREFIX=$PREFIX CC="$CC" LDCONFIG= install
    }

    setup
    checkout

    for module in $MODULES; do
    build $module
    done

    --- GoldED+/BSD 1.1.5-b20160201
    * Origin: Blizzard of Ozz, Melbourne, Victoria, Australia (3:633/267)