archie/build.sh
2024-05-27 21:03:18 +02:00

126 lines
3.3 KiB
Bash
Executable File

#!/usr/tgcware/bin/bash
WORLD_ROOT=${PWD}
ARCHIE_ROOT="${WORLD_ROOT}/archie"
PROSPERO_ROOT="${WORLD_ROOT}/prospero"
BERKDB_ROOT="${WORLD_ROOT}/berkdb"
TCL_ROOT="${WORLD_ROOT}/tcl7.6"
TCLDP_ROOT="${WORLD_ROOT}/tcl-dp"
TK_ROOT="${WORLD_ROOT}/tk4.2"
SOLOS=$(uname -s)
SOLVER=$(uname -r)
SYSTYPE="${SOLOS}-${SOLVER}"
DISTDIR="${WORLD_ROOT}/dist"
export ARCHIE_ROOT=${ARCHIE_ROOT}
export PROSPERO_ROOT=${PROSPERO_ROOT}
export BERKDB_ROOT=${BERKDB_ROOT}
export TCL_ROOT=${TCL_ROOT}
export TCLDP_ROOT=${TCLDP_ROOT}
export TK_ROOT=${TK_ROOT}
export SYSTYPE=${SYSTYPE}
export DISTDIR=${DISTDIR}
export PATH=${DISTDIR}/bin:${PATH}
mkdir -p ${DISTDIR}/{bin,pfs}
echo " Build Root : ${WORLD_ROOT}"
echo " Archie Root : ${ARCHIE_ROOT}"
echo " Prospero Root : ${PROSPERO_ROOT}"
echo " Berkeley DB Root: ${BERKDB_ROOT}"
echo " Tcl Root : ${TCL_ROOT}"
echo " Tcl DP Root : ${TCLDP_ROOT}"
echo " Tk Root : ${TK_ROOT}"
echo " System Type : ${SYSTYPE}"
echo " Dist Dir : ${DISTDIR}"
echo ""
echo "===================================================================="
echo " Building ${TCL_ROOT}/unix"
echo "===================================================================="
echo ""
cd ${TCL_ROOT}/unix
./configure --prefix=${DISTDIR}
make
make install
cd ${WORLD_ROOT}
echo ""
echo "===================================================================="
echo " Building ${TK_ROOT}/unix"
echo "===================================================================="
echo ""
cd ${TK_ROOT}/unix
./configure --prefix=${DISTDIR}
make
make install
cd ${WORLD_ROOT}
echo ""
echo "===================================================================="
echo " Building ${TCLDP_ROOT}/unix"
echo "===================================================================="
echo ""
cd ${TCLDP_ROOT}/unix
./configure --prefix=${DISTDIR}
make
cd ${WORLD_ROOT}
echo ""
echo "===================================================================="
echo " Building ${BERKDB_ROOT}/PORT/${SYSTYPE}"
echo "===================================================================="
echo ""
cd ${BERKDB_ROOT}/PORT/${SYSTYPE}
CC="gcc" make
cd ${WORLD_ROOT}
echo ""
echo "===================================================================="
echo " Prepare ${ARCHIE_ROOT}"
echo "===================================================================="
echo ""
cd ${ARCHIE_ROOT}
cp Makefile.in Makefile
make all_depend
cd ${WORLD_ROOT}
echo ""
echo "===================================================================="
echo " Build Archie libs for Prospero ${ARCHIE_ROOT}"
echo "===================================================================="
echo ""
cd ${ARCHIE_ROOT}/lib/libpsarchie/${SYSTYPE}
make
cd ${ARCHIE_ROOT}/lib/libparchie/${SYSTYPE}
make
cd ${ARCHIE_ROOT}/lib/startdb/${SYSTYPE}
make
cd ${ARCHIE_ROOT}/lib/archsearch/${SYSTYPE}
make
cd ${ARCHIE_ROOT}/lib/libarchie/${SYSTYPE}
make
cd ${ARCHIE_ROOT}/lib/archstridx/${SYSTYPE}
make
cd ${ARCHIE_ROOT}/lib/patrie/${SYSTYPE}
make
cd ${ARCHIE_ROOT}/webindex/lib/${SYSTYPE}
make
cd ${WORLD_ROOT}
echo ""
echo "===================================================================="
echo " Building ${PROSPERO_ROOT}"
echo "===================================================================="
echo ""
cd ${PROSPERO_ROOT}
ln -sf Makefile.config.${SYSTYPE} Makefile.config
cp Makefile.in Makefile
make all_depend
make all
make install
cd ${WORLD_ROOT}