# GSI Debian Sarge 3.1 Add-ons
# ----------------------------------------
# gcc 3.4 settings
[ "debian3.1" == "${GSI_OS_FLAVOR}${GSI_OS_VERSION}" ] && export %EPICS_GCC_VERSION_GSI_NAME%=3.4
# GNU make 3.81
%IF_CMD% [ "debian3.1" == "${GSI_OS_FLAVOR}${GSI_OS_VERSION}" ];
%THEN_CMD%
# Create Directories
%TEST_CMD% ! -z %GNUMAKE_DOWNLOADPATH% && %MKDIR_CMD% %GNUMAKE_DOWNLOADPATH% || %DIE_CMD%
# Download source
%CD_CMD% %GNUMAKE_DOWNLOADPATH% &&
%WGET_CMD% %GNUMAKE_DIRECTDOWNLOADADRESS%/%GNUMAKE_TARFILENAME% || %DIE_CMD%
# Check and change file permissions [ and group settings (if you are in ==%UNIXGROUP%) ]
%CD_CMD% %GNUMAKE_DOWNLOADPATH% && %CHECK_GROUPSSETTING% %UNIXGROUP% && %CHANGEGRP_CMD% %UNIXGROUP% %GNUMAKE_DOWNLOADPATH%
%CHANGEMOD_FIND_CMD_BEGIN% %GNUMAKE_DOWNLOADPATH% %CHANGEMOD_FIND_CMD_END%
# Extract code and create bin directory
%CD_CMD% %GNUMAKE_DOWNLOADPATH%
&& %UNTAR_CMD% %GNUMAKE_DOWNLOADPATH%/%GNUMAKE_TARFILENAME% || %DIE_CMD%
%TEST_CMD% ! -z %GNUMAKE_BINDIR% && %MKDIR_CMD% %GNUMAKE_BINDIR% || %DIE_CMD%
# configure / make / make install
%CD_CMD% %GNUMAKE_DOWNLOADPATH% &&
./configure --prefix %GNUMAKE_INSTALLDIR% --bindir=%GNUMAKE_BINDIR% &&
%MAKE_CMD% &&
%MAKE_CMD% check &&
%MAKE_CMD% install || %DIE_CMD%
%FI_CMD%