diff --git a/compile.conf b/compile.conf index 12c12d0..c46bb39 100644 --- a/compile.conf +++ b/compile.conf @@ -1,40 +1,8 @@ -[QtTermTCP] -version=0.1 -wget=http://www.cantab.net/users/john.wiseman/Downloads/QtTermSource.zip -install=$HOME/.local/bin/QtTermTCP +[HamClock] +version=4.22 +wget=https://github.com/tardate/ESPHamClock/archive/refs/tags/4.22.zip +install=$HOME/.local/bin/hamclock gui=true -steps=qmake, make, mv QtTermTCP $HOME/.local/bin/ +steps=cd src, make, make hamclock-1600x960, mv hamclock-1600X960 $HOME/.local/bin/hamclock -[Kiwix-Desktop] -version=2.75.1 -git=https://github.com/kiwix/kiwix-desktop.git -install=/usr/local/bin/kiwix-desktop -steps=/usr/lib/qt6/bin/qmake, make, sudo make install -[Kiwix-Tools] -version=3.8.2 -git=https://github.com/kiwix/kiwix-tools.git -install=/usr/local/bin/ -steps=meson setup build, ninja -C build, sudo ninja -C build install - -[Dump1090] -version=1.0.0 -git=https://github.com/antirez/dump1090.git -install=$HOME/.local/bin/dump1090 -steps=make, mv dump1090 $HOME/.local/bin/dump1090 - -[yaac] -version=1.0.0 -wget=https://www.ka2ddo.org/ka2ddo/YAAC.zip -install=$HOME/.local/bin/yaac/YAAC.jar -desktop=$HOME/.local/share/HamPack/desktop/yaac.desktop -gui=true -steps=rm -rf $HOME/.local/bin/yaac, mkdir -p $HOME/.local/bin/yaac, mv /tmp/hampack-build/yaac $HOME/.local/bin/yaac - -[potacat] -version=1.1.1 -git=https://github.com/Waffleslop/POTACAT.git -install=$HOME/.local/bin/POTACAT.AppImage -desktop=$HOME/.local/share/HamPack/desktop/potacat.desktop -gui=true -steps=bash $HOME/.local/share/HamPack/patch-potacat.sh, npm install, npm run dist:linux, mv dist/*.AppImage $HOME/.local/bin/POTACAT.AppImage \ No newline at end of file diff --git a/serverrefresh b/hampackserverrefresh similarity index 100% rename from serverrefresh rename to hampackserverrefresh diff --git a/serverupdate b/hampackserverupdate similarity index 100% rename from serverupdate rename to hampackserverupdate diff --git a/install-compiled.sh b/install-compiled.sh index ffccaad..ed80145 100755 --- a/install-compiled.sh +++ b/install-compiled.sh @@ -2,9 +2,9 @@ # # Purpose : Compile and install applications from compile.conf -CONF_FILE="$HOME/.local/share/HamPack/compile.conf" +CONF_FILE="$HOME/.local/share/HamPackServer/compile.conf" TMP_DIR="/tmp/hampack-build" -VERSION_FILE="$HOME/.local/state/HamPack/.installed_versions" +VERSION_FILE="$HOME/.local/state/HamPackServer/.installed_versions" # Get the installed version of an app get_installed_version() { diff --git a/install.sh b/install.sh index 3fde07a..029bcbf 100755 --- a/install.sh +++ b/install.sh @@ -28,14 +28,14 @@ print_logo cd ~ sudo -v -echo "Getting the latest version of HamPack..." +echo "Getting the latest version of HamPackServer..." rm -rf ~/.local/share/HamPack -git clone https://gitea.young.computer/david/HamPack.git ~/.local/share/HamPack > /dev/null +git clone https://gitea.young.computer/david/HamPackServer.git ~/.local/share/HamPackServer > /dev/null -sudo cp ~/.local/share/HamPack/hampackrefresh ~/.local/bin/hampackrefresh -sudo cp ~/.local/share/HamPack/hampackupdate ~/.local/bin/hampackupdate +sudo cp ~/.local/share/HamPack/hampackserverrefresh ~/.local/bin/hampackserverrefresh +sudo cp ~/.local/share/HamPack/hampackserverupdate ~/.local/bin/hampackserverupdate -cd ~/.local/share/HamPack +cd ~/.local/share/HamPackServer # Source utility functions source utils.sh @@ -52,42 +52,87 @@ source packages.conf cd ~/ -# Install yay AUR helper if not present -#if ! command -v yay &> /dev/null; then -# echo "Installing yay AUR helper..." -# sudo pacman -S --needed git base-devel --noconfirm -# if [[ -d "yay" ]]; then -# echo "yay directory already exists, removing it..." -# rm -rf yay -# fi -# echo "Cloning yay repository..." -# git clone https://aur.archlinux.org/yay.git -# cd yay -# echo "Building yay..." -# makepkg -si --noconfirm -# cd .. -# rm -rf yay -#else -# echo "yay is already installed." -#fi - -echo "Installing system utilities..." -install_packages "${UTILITIES[@]}" - -echo "Installing applications..." -install_packages "${APPLICATIONS[@]}" +echo "Installing servers..." +install_packages "${SERVERS[@]}" cd ~/.local/share/HamPack -echo "Installing Flatpak applications..." -. install-flatpaks.sh +if [ ! -d "$HOME/.nvm" ]; then + curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash +else + echo "nvm is already installed, skipping." +fi -echo "Installing stand-alone compiled applications..." +if ! command -v node &> /dev/null; then + nvm install --lts +else + echo "Node.js is already installed, skipping." +fi +if ! pacman -Qi apache &> /dev/null; then + echo "Installing Apache..." + sudo pacman -S --noconfirm apache + sudo systemctl enable httpd + sudo systemctl start httpd +else + echo "Apache is already installed, skipping." +fi + +if ! pacman -Qi mariadb &> /dev/null; then + echo "Installing MariaDB (MySQL)..." + sudo pacman -S --noconfirm mariadb + sudo mariadb-install-db --user=mysql --basedir=/usr --datadir=/var/lib/mysql + sudo systemctl enable mariadb + sudo systemctl start mariadb +else + echo "MariaDB is already installed, skipping." +fi + +if ! pacman -Qi php php-curl php-mbstring php-xml &> /dev/null; then + sudo pacman -S php php-curl php-mbstring php-xml +else + echo "PHP packages are already installed, skipping." +fi + +echo "Enabling PHP extensions in /etc/php/php.ini..." +for ext in curl mbstring xml pdo_mysql mysqli; do + sudo sed -i "s/^;extension=${ext}$/extension=${ext}/" /etc/php/php.ini +done + +# Install Cloudlog +CLOUDLOG_DIR="/srv/http/cloudlog" +CLOUDLOG_DB="cloudlog" +CLOUDLOG_DB_USER="cloudlog" +CLOUDLOG_DB_PASS="cloudlog" + +if [ ! -d "$CLOUDLOG_DIR" ]; then + echo "Installing Cloudlog..." + sudo git clone https://github.com/magicbug/Cloudlog.git "$CLOUDLOG_DIR" + + # Set ownership and permissions (Arch Apache runs as 'http') + sudo chown -R http:http "$CLOUDLOG_DIR" + sudo chmod -R g+rw "$CLOUDLOG_DIR" + + # Create MariaDB database and user + echo "Creating Cloudlog database..." + sudo mysql -u root < /dev/null 2>&1; then echo "HamPack is installed. A newer kernel has been installed, a reboot is recommended." read -rp "Reboot now? [y/N] " response diff --git a/packages.conf b/packages.conf index c5fe427..a6c3e26 100644 --- a/packages.conf +++ b/packages.conf @@ -1,48 +1,10 @@ -# Ham utilities -UTILITIES=( +# Ham servers +SERVERS=( alsa-utils - aria2 - at-spi2-core - base-devel - cmake - docopt - fldigi - flrig - gpds - gpsbabel - gtk4 - hamlib - jdk-openjdk - libappindicator-gtk3 - libkiwix - libnotify - libsecret - libxcrypt-compat - libxtst - libzim - meson - ninja - nss - pat-bin - python-yattag # must come before chirp-next - qgis - qt6-base - qt6-tools - qt6-webengine - splat - util-linux-libs - voacapl - wine - winetricks - xdg-utils - zim-tools - zimwriterfs ) -# Ham applications -APPLICATIONS=( - gridtracker2 - chattervox-bin - chirp-next +# Ham server utilities +UTILITIES=( + direwolf )