mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
Remove dependency on distro supplied hamlib library. Add support for Debian 11 and Ubunto 22.04
This commit is contained in:
parent
7bbf9db71d
commit
036a0ef5a1
2 changed files with 95 additions and 8 deletions
|
@ -1,13 +1,36 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# Simple script to install FreeDATA in Linux
|
# Simple script to install FreeDATA in Linux
|
||||||
# Dj Merrill - 25 Apr 2024
|
# Dj Merrill - N1JOV
|
||||||
#
|
#
|
||||||
# Currently supports Debian [11,12], Ubuntu [24.04]
|
# Currently supports Debian [11, 12], Ubuntu [22.04, 24.04]
|
||||||
#
|
#
|
||||||
|
# Run this script by typing "bash install-freedata-linux.sh" in the terminal
|
||||||
|
#
|
||||||
# args: nothing or "main" (use main branch of FreeDATA)
|
# args: nothing or "main" (use main branch of FreeDATA)
|
||||||
# "develop" (use develop branch of FreeDATA)
|
# "develop" (use develop branch of FreeDATA)
|
||||||
#
|
#
|
||||||
|
# This script creates three subdirectories in the directory it is run
|
||||||
|
# FreeDATA: Contains the FreeDATA software
|
||||||
|
# FreeDATA-venv: Contains the Python virtual environment
|
||||||
|
# FreeDATA-hamlib: Contains the hamlib libraries
|
||||||
|
#
|
||||||
|
# Changelog:
|
||||||
|
# 1.3: 02 May 2024
|
||||||
|
# Remove dependency on distro supplied hamlib library which can be old
|
||||||
|
# Download and install hamlib 4.5.5 into ./FreeDATA-hamlib
|
||||||
|
# Add support for Debian 11 and Ubuntu 22.04
|
||||||
|
#
|
||||||
|
# 1.2: 30 Apr 2024
|
||||||
|
# Remove dependency on distro supplied nodejs which can be too old
|
||||||
|
# Install nodejs version 20 into ~/.nvm
|
||||||
|
#
|
||||||
|
# 1.1: 26 Apr 2024
|
||||||
|
# Add support for installing from FreeDATA develop branch
|
||||||
|
# Add support for Ubuntu 24.04
|
||||||
|
#
|
||||||
|
# 1.0: Initial release 25 Apr 2024 supporting Debian 12
|
||||||
|
#
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
"" | "main")
|
"" | "main")
|
||||||
|
@ -29,13 +52,14 @@ echo "Running on" $osname "version" $osversion
|
||||||
|
|
||||||
echo "*************************************************************************"
|
echo "*************************************************************************"
|
||||||
echo "Installing software prerequisites"
|
echo "Installing software prerequisites"
|
||||||
|
echo "If prompted, enter your password to run the sudo command"
|
||||||
echo "*************************************************************************"
|
echo "*************************************************************************"
|
||||||
|
|
||||||
case $osname in
|
case $osname in
|
||||||
"Debian GNU/Linux")
|
"Debian GNU/Linux")
|
||||||
case $osversion in
|
case $osversion in
|
||||||
"11 (bullseye)" | "12 (bookworm)")
|
"11 (bullseye)" | "12 (bookworm)")
|
||||||
sudo apt install --upgrade -y libhamlib-utils libhamlib-dev libhamlib4 fonts-noto-color-emoji git build-essential cmake python3 portaudio19-dev python3-pyaudio python3-pip python3-colorama python3-venv wget
|
sudo apt install --upgrade -y fonts-noto-color-emoji git build-essential cmake python3 portaudio19-dev python3-pyaudio python3-pip python3-colorama python3-venv wget
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
|
@ -52,8 +76,8 @@ case $osname in
|
||||||
|
|
||||||
"Ubuntu")
|
"Ubuntu")
|
||||||
case $osversion in
|
case $osversion in
|
||||||
"24.04 LTS (Noble Numbat)")
|
"22.04.4 LTS (Jammy Jellyfish)" | "24.04 LTS (Noble Numbat)")
|
||||||
sudo apt install --upgrade -y libhamlib-utils libhamlib-dev libhamlib4 fonts-noto-color-emoji git build-essential cmake python3 portaudio19-dev python3-pyaudio python3-pip python3-colorama python3-venv curl wget
|
sudo apt install --upgrade -y fonts-noto-color-emoji git build-essential cmake python3 portaudio19-dev python3-pyaudio python3-pip python3-colorama python3-venv wget
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
|
@ -97,12 +121,59 @@ then
|
||||||
nvm install 20
|
nvm install 20
|
||||||
echo "nvm is version" `npm -v`
|
echo "nvm is version" `npm -v`
|
||||||
echo "node is version" `node -v`
|
echo "node is version" `node -v`
|
||||||
rm install.sh
|
rm -f install.sh
|
||||||
else
|
else
|
||||||
echo "Something went wrong. $HOME/.nvm environment not created properly."
|
echo "Something went wrong. $HOME/.nvm environment not created properly."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "*************************************************************************"
|
||||||
|
echo "Installing hamlib into FreeDATA-hamlib"
|
||||||
|
echo "*************************************************************************"
|
||||||
|
|
||||||
|
if [ -d "FreeDATA-hamlib.old" ];
|
||||||
|
then
|
||||||
|
rm -rf FreeDATA-hamlib.old
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -d "FreeDATA-hamlib" ];
|
||||||
|
then
|
||||||
|
mv FreeDATA-hamlib FreeDATA-hamlib.old
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -d "FreeDATA-hamlib" ];
|
||||||
|
then
|
||||||
|
curdir=`pwd`
|
||||||
|
wget https://github.com/Hamlib/Hamlib/releases/download/4.5.5/hamlib-4.5.5.tar.gz
|
||||||
|
if [ -f "hamlib-4.5.5.tar.gz" ];
|
||||||
|
then
|
||||||
|
tar -xplf hamlib-4.5.5.tar.gz
|
||||||
|
else
|
||||||
|
echo "Something went wrong. hamlib-4.5.5.tar.gz not downloaded."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [ -d "hamlib-4.5.5" ];
|
||||||
|
then
|
||||||
|
cd hamlib-4.5.5
|
||||||
|
./configure --prefix=$curdir/FreeDATA-hamlib
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
cd ..
|
||||||
|
else
|
||||||
|
echo "Something went wrong. hamlib-4.5.5 directory not found."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [ ! -f "$curdir/FreeDATA-hamlib/bin/rigctl" ];
|
||||||
|
then
|
||||||
|
echo "Something went wrong." $curdir"/FreeDATA.hamlib/bin/rigctl not found."
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "Cleaning up files from hamlib build."
|
||||||
|
rm -f hamlib-4.5.5.tar.gz
|
||||||
|
rm -rf hamlib-4.5.5
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
echo "*************************************************************************"
|
echo "*************************************************************************"
|
||||||
echo "Checking for old FreeDATA directories"
|
echo "Checking for old FreeDATA directories"
|
||||||
echo "*************************************************************************"
|
echo "*************************************************************************"
|
||||||
|
|
|
@ -3,8 +3,9 @@
|
||||||
# Simple script to run FreeDATA in Linux
|
# Simple script to run FreeDATA in Linux
|
||||||
# Dj Merrill - 25 Apr 2024
|
# Dj Merrill - 25 Apr 2024
|
||||||
#
|
#
|
||||||
# Run this script in the directory that contains the "FreeDATA" and
|
# Run this script in the directory that contains the "FreeDATA",
|
||||||
# "FreeDATA-venv" directories created by the install-freedata.sh script
|
# "FreeDATA-venv", and "FreeDATA-hamlib" directories
|
||||||
|
# created by the install-freedata-linux.sh script
|
||||||
#
|
#
|
||||||
# Two log files are created in this directory:
|
# Two log files are created in this directory:
|
||||||
# FreeDATA-server.log: debug output from the server process
|
# FreeDATA-server.log: debug output from the server process
|
||||||
|
@ -13,8 +14,23 @@
|
||||||
# We expect the config.ini file to be at $HOME/.config/FreeDATA/config.ini
|
# We expect the config.ini file to be at $HOME/.config/FreeDATA/config.ini
|
||||||
# If it isn't found, we copy config.ini.example there
|
# If it isn't found, we copy config.ini.example there
|
||||||
#
|
#
|
||||||
|
# 1.3: 02 May 2024
|
||||||
|
# Add support for hamlib installed by FreeDATA install script
|
||||||
|
# 1.2: 30 Apr 2024
|
||||||
|
# 1.1: 26 Apr 2024
|
||||||
|
# 1.0: 25 Apr 2024 Initial release
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# Set path to find our hamlib install
|
||||||
|
export PATH=./FreeDATA-hamlib/bin:$PATH
|
||||||
|
export LD_LIBRARY_PATH=./FreeDATA-hamlib/lib:$LD_LIBRARY_PATH
|
||||||
|
|
||||||
|
if [ ! -f "FreeDATA-hamlib/bin/rigctl" ];
|
||||||
|
then
|
||||||
|
echo "Something went wrong. FreeDATA-hamlib/bin/rigctl not found."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Activate the Python Virtual Environment
|
# Activate the Python Virtual Environment
|
||||||
source ./FreeDATA-venv/bin/activate
|
source ./FreeDATA-venv/bin/activate
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue