Add contrib/build_SyncTERM.sh Linux build and .deb package creation script
Cross-platform BBS (ANSI) Terminal
Brought to you by:
deuce
It might be helpful for people to run an automated script to build and package syncterm, I would recommend to add a contrib/build_SyncTERM.sh script to do this. Here is what I use:
#!/bin/bash
# 06/23/24 - dranch - Added prompt to change installation path
# - Added a prompt to add package dependencies
# - Added check to avoid duplicate downloads
# - more pretty echo stagements
# 10/10/22 - dranch - first version
# hampacket3:/usr/src/archive/Retro/PC/Term-emulation$ less get_SyncTERM.sh
# based on https://www.erb.pw/how-to-install-syncterm-for-linux-from-source/
# To Install apps/libraries used to compile
echo -e "\nPreparing to install relevant libraries..."
sudo apt-get install wget libncurses5-dev libncursesw5-dev gcc libsdl1.2-dev build-essential
#Add in checkinstall for packaging
sudo apt install checkinstall
# To Pull source
if [ -f syncterm-src.tgz ]; then
TODAYDATE="`date +%b" "%d`"
CURVER="`ls -l syncterm-src.tgz | awk '{print $6" "$7}'`"
if [ "$CURVER" == "$TODAYDATE" ]; then
echo -e "\nA copy of syncterm-src.tgz was already downloaded today.. skipping"
else
echo -e "\nAn older copy of syncterm-src.tgz is present, renaming"
mv syncterm-src.tgz syncterm-src-`date +%b%d`.tgz
echo -e "\nDownloading syncterm sources"
wget http://syncterm.bbsdev.net/syncterm-src.tgz
fi
else
echo -e "Downloading syncterm sources"
wget http://syncterm.bbsdev.net/syncterm-src.tgz
fi
# To extract tgz file
echo -e "\nExtracting the source now..."
tar xvzf syncterm-src.tgz
# Change directory to
echo -e "\nChange into the 'make' folder"
cd syncterm-$(date +%Y%m%d)/src/syncterm
# To get full path src
echo -e "\nSet st_path variable for the SRC_ROOT path..."
st_path=$(pwd | sed 's/\/syncterm$//g')
echo -e "\nChange the destination prefix to NOT use /usr/local"
echo "Press any key to edit the Makefile"
read anykey
vim GNUmakefile
# dranch - never compile as root
# Time to compile!
echo -e "\nMake SRC_ROOT with path: $st_path"
#do NOT try to use -j4, the compile will fail
make SRC_ROOT=$st_path
RESULT="$?"
echo -e "\nResult of build: Needs to be 0: $RESULT"
# Install SyncTerm
echo -e "\nInstall SyncTERM..."
echo -e "For dependencies, pleae add: libncurses6, libncursesw6, libsdl1.2debian"
echo -e Though the specific package names might be different depending on distro"
echo -e "Press any key to edit the Makefile"
read anykey
#sudo make install
#Use checkinstall to create a .deb
sudo checkinstall
RESULT="$?"
echo -e "\nResult of checkinstall: Needs to be 0: $RESULT"
# Find out where Syncterm was installed
echo -e "\nFind out where SyncTERM installed"
which syncterm
Anonymous