archie/build.sh

270 lines
10 KiB
Bash
Raw Normal View History

2024-05-27 16:13:40 +02:00
#!/usr/tgcware/bin/bash
2024-05-28 16:48:29 +02:00
ARCHIE_VER=3.5
2024-05-28 19:25:49 +02:00
INSTALL=ginstall
OWNER=archie
GROUP=archie
2024-05-28 16:48:29 +02:00
2024-05-27 16:13:40 +02:00
WORLD_ROOT=${PWD}
ARCHIE_ROOT="${WORLD_ROOT}/archie"
PROSPERO_ROOT="${WORLD_ROOT}/prospero"
BERKDB_ROOT="${WORLD_ROOT}/berkdb"
2024-05-27 16:40:40 +02:00
TCL_ROOT="${WORLD_ROOT}/tcl7.6"
2024-05-27 16:54:25 +02:00
TCLDP_ROOT="${WORLD_ROOT}/tcl-dp"
2024-05-27 16:40:40 +02:00
TK_ROOT="${WORLD_ROOT}/tk4.2"
2024-05-27 16:13:40 +02:00
SOLOS=$(uname -s)
SOLVER=$(uname -r)
SYSTYPE="${SOLOS}-${SOLVER}"
2024-05-28 19:25:49 +02:00
SOLMACHINE=$(uname -m)
2024-05-27 16:13:40 +02:00
2024-05-27 21:24:26 +02:00
DEST_DIR="${WORLD_ROOT}/dist"
2024-05-28 19:25:49 +02:00
RELEASE_DIR="${WORLD_ROOT}/release"
2024-05-27 16:13:40 +02:00
2024-05-27 16:20:51 +02:00
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}
2024-05-27 21:24:26 +02:00
export DEST_DIR=${DEST_DIR}
export PATH=${DEST_DIR}/bin:${PATH}
2024-05-27 16:13:40 +02:00
2024-05-27 21:24:26 +02:00
mkdir -p ${DEST_DIR}/{bin,pfs}
2024-05-27 16:13:40 +02:00
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}"
2024-05-27 21:24:26 +02:00
echo " Dist Dir : ${DEST_DIR}"
2024-05-27 16:13:40 +02:00
2024-05-27 16:40:40 +02:00
echo ""
echo "===================================================================="
echo " Building ${TCL_ROOT}/unix"
echo "===================================================================="
echo ""
cd ${TCL_ROOT}/unix
2024-05-28 14:12:16 +02:00
CC="gcc" ./configure --prefix=${DEST_DIR}
2024-05-27 16:58:07 +02:00
make
2024-05-27 16:13:40 +02:00
make install
2024-05-27 16:18:20 +02:00
cd ${WORLD_ROOT}
2024-05-27 16:40:40 +02:00
echo ""
echo "===================================================================="
echo " Building ${TK_ROOT}/unix"
echo "===================================================================="
echo ""
cd ${TK_ROOT}/unix
2024-05-28 14:12:16 +02:00
CC="gcc" ./configure --prefix=${DEST_DIR}
2024-05-27 16:58:07 +02:00
make
2024-05-27 16:18:20 +02:00
make install
cd ${WORLD_ROOT}
2024-05-27 16:23:06 +02:00
2024-05-27 16:40:40 +02:00
echo ""
echo "===================================================================="
2024-05-27 16:54:25 +02:00
echo " Building ${TCLDP_ROOT}/unix"
2024-05-27 16:40:40 +02:00
echo "===================================================================="
echo ""
2024-05-27 16:54:25 +02:00
cd ${TCLDP_ROOT}/unix
2024-05-28 14:12:16 +02:00
CC="gcc" ./configure --prefix=${DEST_DIR}
2024-05-27 16:58:07 +02:00
make
2024-05-27 16:23:06 +02:00
cd ${WORLD_ROOT}
2024-05-27 16:40:40 +02:00
echo ""
echo "===================================================================="
echo " Building ${BERKDB_ROOT}/PORT/${SYSTYPE}"
echo "===================================================================="
echo ""
cd ${BERKDB_ROOT}/PORT/${SYSTYPE}
2024-05-27 16:50:06 +02:00
CC="gcc" make
2024-05-27 16:40:40 +02:00
cd ${WORLD_ROOT}
2024-05-27 17:35:34 +02:00
echo ""
echo "===================================================================="
echo " Prepare ${ARCHIE_ROOT}"
echo "===================================================================="
echo ""
cd ${ARCHIE_ROOT}
cp Makefile.in Makefile
make all_depend
cd ${WORLD_ROOT}
2024-05-27 19:10:32 +02:00
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
2024-05-27 18:01:02 +02:00
cp Makefile.in Makefile
make all_depend
2024-05-27 17:47:03 +02:00
make all
cd ${WORLD_ROOT}
2024-05-27 23:03:08 +02:00
echo ""
echo "===================================================================="
echo " Building ${ARCHIE_ROOT}"
echo "===================================================================="
echo ""
cd ${ARCHIE_ROOT}
make all_depend
make all
cd ${WORLD_ROOT}
2024-05-28 19:25:49 +02:00
echo ""
echo "===================================================================="
echo " Installing ${PROSPERO_ROOT}"
echo "===================================================================="
echo ""
2024-05-28 19:39:12 +02:00
BINS="als archie gen_vfsetup list_acl newvs p__vcd p__vfsetup padmin pfs psession pstatus set_acl set_atr vget vln vls vmkdir vrm"
for i in ${BINS}
do
2024-05-28 19:56:23 +02:00
${INSTALL} -c -v -m 755 -o ${OWNER} -g ${GROUP} ${PROSPERO_ROOT}/user/${i} ${RELEASE_DIR}/B/pfs/bin
2024-05-28 19:25:49 +02:00
done
2024-05-28 19:56:23 +02:00
${INSTALL} -c -v -m 755 -o ${OWNER} -g ${GROUP} ${PROSPERO_ROOT}/user/menu/menu ${RELEASE_DIR}/B/pfs/bin
${INSTALL} -c -v -m 755 -o ${OWNER} -g ${GROUP} ${PROSPERO_ROOT}/server/dirsrv ${RELEASE_DIR}/B/pfs/bin
${INSTALL} -c -v -m 755 -o ${OWNER} -g ${GROUP} ${PROSPERO_ROOT}/server/pstart ${RELEASE_DIR}/B/pfs/bin
2024-05-28 19:25:49 +02:00
echo ""
echo "===================================================================="
echo " Installing ${ARCHIE_ROOT}"
echo "===================================================================="
echo ""
2024-05-28 19:39:12 +02:00
BINS="parse_anonftp parse_anonftp_novell parse_anonftp_unix_bsd parse_anonftp_vms_std"
for i in ${BINS}
do
2024-05-28 19:56:23 +02:00
${INSTALL} -c -v -m 755 -o ${OWNER} -g ${GROUP} ${ARCHIE_ROOT}/anonftp/parse/${SYSTYPE}/${i} ${RELEASE_DIR}/A/bin
2024-05-28 19:25:49 +02:00
done
2024-05-28 19:56:23 +02:00
${INSTALL} -c -v -m 755 -o ${OWNER} -g ${GROUP} ${ARCHIE_ROOT}/anonftp/retrieve/${SYSTYPE}/retrieve_anonftp ${RELEASE_DIR}/A/bin
2024-05-28 19:39:12 +02:00
BINS="check_anonftp delete_anonftp insert_anonftp net_anonftp update_anonftp"
for i in ${BINS}
do
2024-05-28 19:56:23 +02:00
${INSTALL} -c -v -m 755 -o ${OWNER} -g ${GROUP} ${ARCHIE_ROOT}/anonftp/update/${SYSTYPE}/${i} ${RELEASE_DIR}/A/bin
2024-05-28 19:25:49 +02:00
done
2024-05-28 19:56:23 +02:00
${INSTALL} -c -v -m 755 -o ${OWNER} -g ${GROUP} ${ARCHIE_ROOT}/clients/email/${SYSTYPE}/email-client ${RELEASE_DIR}/A/bin
${INSTALL} -c -v -m 755 -o ${OWNER} -g ${GROUP} ${ARCHIE_ROOT}/clients/mail_back_end/${SYSTYPE}/split_file ${RELEASE_DIR}/A/bin
${INSTALL} -c -v -m 755 -o ${OWNER} -g ${GROUP} ${ARCHIE_ROOT}/clients/telnet/${SYSTYPE}/telnet-client ${RELEASE_DIR}/A/bin
${INSTALL} -c -v -m 755 -o ${OWNER} -g ${GROUP} ${ARCHIE_ROOT}/control/${SYSTYPE}/arcontrol ${RELEASE_DIR}/A/bin
${INSTALL} -c -v -m 755 -o ${OWNER} -g ${GROUP} ${ARCHIE_ROOT}/exchange/${SYSTYPE}/arserver ${RELEASE_DIR}/A/bin
${INSTALL} -c -v -m 755 -o ${OWNER} -g ${GROUP} ${ARCHIE_ROOT}/less/${SYSTYPE}/less ${RELEASE_DIR}/A/bin
${INSTALL} -c -v -m 755 -o ${OWNER} -g ${GROUP} ${ARCHIE_ROOT}/ppc/ferretd/${SYSTYPE}/ferretd ${RELEASE_DIR}/A/bin
${INSTALL} -c -v -m 755 -o ${OWNER} -g ${GROUP} ${ARCHIE_ROOT}/ppc/weaseld/${SYSTYPE}/weaseld ${RELEASE_DIR}/A/bin
2024-05-28 19:39:12 +02:00
BINS="ardomains convert_hostdb db_build db_check db_dump db_reorder db_siteidx db_stats dump_hostdb dump_hostdb_ndbm fix_start_db host_manage restore_hostdb"
for i in ${BINS}
do
2024-05-28 19:56:23 +02:00
${INSTALL} -c -v -m 755 -o ${OWNER} -g ${GROUP} ${ARCHIE_ROOT}/tools/${SYSTYPE}/${i} ${RELEASE_DIR}/A/bin
2024-05-28 19:25:49 +02:00
done
2024-05-28 19:56:23 +02:00
${INSTALL} -c -v -m 755 -o ${OWNER} -g ${GROUP} ${ARCHIE_ROOT}/webindex/parse/${SYSTYPE}/parse_webindex ${RELEASE_DIR}/A/bin
${INSTALL} -c -v -m 755 -o ${OWNER} -g ${GROUP} ${ARCHIE_ROOT}/webindex/partial/${SYSTYPE}/partial_webindex ${RELEASE_DIR}/A/bin
${INSTALL} -c -v -m 755 -o ${OWNER} -g ${GROUP} ${ARCHIE_ROOT}/webindex/retrieve/${SYSTYPE}/retrieve_webindex ${RELEASE_DIR}/A/bin
${INSTALL} -c -v -m 755 -o ${OWNER} -g ${GROUP} ${ARCHIE_ROOT}/webindex/retrieve/${SYSTYPE}/retrieve_webindex ${RELEASE_DIR}/A/bin
${INSTALL} -c -v -m 755 -o ${OWNER} -g ${GROUP} ${ARCHIE_ROOT}/webindex/tools/${SYSTYPE}/extern_urls ${RELEASE_DIR}/A/bin
${INSTALL} -c -v -m 755 -o ${OWNER} -g ${GROUP} ${ARCHIE_ROOT}/webindex/tools/${SYSTYPE}/extern_urls_ndbm ${RELEASE_DIR}/A/bin
${INSTALL} -c -v -m 755 -o ${OWNER} -g ${GROUP} ${ARCHIE_ROOT}/webindex/tools/${SYSTYPE}/extern_urls_ndbm ${RELEASE_DIR}/A/bin
2024-05-28 19:39:12 +02:00
BINS="check_webindex delete_webindex insert_webindex net_webindex"
for i in ${BINS}
do
2024-05-28 19:56:23 +02:00
${INSTALL} -c -v -m 755 -o ${OWNER} -g ${GROUP} ${ARCHIE_ROOT}/webindex/update/${SYSTYPE}/${i} ${RELEASE_DIR}/A/bin
2024-05-28 19:25:49 +02:00
done
2024-05-28 19:56:23 +02:00
${INSTALL} -c -v -m 755 -o ${OWNER} -g ${GROUP} ${ARCHIE_ROOT}/clients/cgi/${SYSTYPE}/cgi-client ${RELEASE_DIR}/base/cgi/bin
2024-05-28 19:25:49 +02:00
echo ""
echo "===================================================================="
echo " Creating archie-${ARCHIE_VER}-${SYSTYPE}-${SOLMACHINE}-A.tgz"
echo "===================================================================="
echo ""
cd ${RELEASE_DIR}/A
2024-05-28 19:39:12 +02:00
rm -f ${RELEASE_DIR}/archie-${ARCHIE_VER}-${SYSTYPE}-${SOLMACHINE}-A.tgz
tar cfvz ${RELEASE_DIR}/archie-${ARCHIE_VER}-${SYSTYPE}-${SOLMACHINE}-A.tgz .
2024-05-28 19:25:49 +02:00
cd ${WORLD_ROOT}
echo ""
echo "===================================================================="
2024-05-29 07:23:42 +02:00
echo " Creating archie-${ARCHIE_VER}-${SYSTYPE}-${SOLMACHINE}-B.tgz"
2024-05-28 19:25:49 +02:00
echo "===================================================================="
echo ""
cd ${RELEASE_DIR}/B
2024-05-28 19:39:12 +02:00
rm -f ${RELEASE_DIR}/archie-${ARCHIE_VER}-${SYSTYPE}-${SOLMACHINE}-B.tgz
tar cfvz ${RELEASE_DIR}/archie-${ARCHIE_VER}-${SYSTYPE}-${SOLMACHINE}-B.tgz .
2024-05-28 19:25:49 +02:00
cd ${WORLD_ROOT}
echo ""
echo "===================================================================="
echo " Creating archie-${ARCHIE_VER}-${SYSTYPE}-${SOLMACHINE}-base.tgz"
echo "===================================================================="
echo ""
cd ${RELEASE_DIR}/base
2024-05-28 19:39:12 +02:00
rm -f ${RELEASE_DIR}/archie-${ARCHIE_VER}-${SYSTYPE}-${SOLMACHINE}-base.tgz
tar cfvz ${RELEASE_DIR}/archie-${ARCHIE_VER}-${SYSTYPE}-${SOLMACHINE}-base.tgz .
2024-05-28 19:25:49 +02:00
cd ${WORLD_ROOT}
echo ""
echo "===================================================================="
echo " Creating archie-${ARCHIE_VER}-install.tar"
echo "===================================================================="
echo ""
cd ${RELEASE_DIR}/install
rm -f ${RELEASE_DIR}/archie-${ARCHIE_VER}-install.tar
tar cvf ${RELEASE_DIR}/archie-${ARCHIE_VER}-install.tar .
cd ${WORLD_ROOT}
2024-05-28 19:25:49 +02:00
echo ""
echo "===================================================================="
echo " Developer Output"
echo "===================================================================="
echo ""
echo "export ARCHIE_ROOT=${ARCHIE_ROOT}"
echo "export PROSPERO_ROOT=${PROSPERO_ROOT}"
echo "export BERKDB_ROOT=${BERKDB_ROOT}"
echo "export TCL_ROOT=${TCL_ROOT}"
echo "export TCLDP_ROOT=${TCLDP_ROOT}"
echo "export TK_ROOT=${TK_ROOT}"
echo "export SYSTYPE=${SYSTYPE}"
echo "export DEST_DIR=${DEST_DIR}"
echo "export PATH=${DEST_DIR}/bin:${PATH}"
2024-05-28 19:25:49 +02:00
echo ""
echo "===================================================================="
echo " Everything build"
echo "===================================================================="
echo ""
echo "The Final packages are in the ${RELEASE_DIR}"
echo "${RELEASE_DIR}/archie-${ARCHIE_VER}-${SYSTYPE}-${SOLMACHINE}-A.tgz"
echo "${RELEASE_DIR}/archie-${ARCHIE_VER}-${SYSTYPE}-${SOLMACHINE}-B.tgz"
echo "${RELEASE_DIR}/archie-${ARCHIE_VER}-${SYSTYPE}-${SOLMACHINE}-base.tgz"
echo "${RELEASE_DIR}/archie-${ARCHIE_VER}-install.tar"
echo ""
echo "===================================================================="
echo " Everything build"
echo "===================================================================="
echo ""
2024-05-28 19:25:49 +02:00