Added new synergy v1.x build script for fedora

This commit is contained in:
Tristan Ancelet 2023-11-26 14:36:02 -06:00
parent 7e1c698858
commit 6bb33bad72

View File

@ -0,0 +1,98 @@
#!/bin/bash
####################################################################################
# build-synergy-fedora-39.sh #
####################################################################################
# This script is just meant to show how to compile synergy-core manually, in the #
# case someone doesn't want to pay for the license to download an installer. #
# #
# Understand that even if you do compile it here you will need a license to access #
# many of the advanced features (however it will still let you use the software). #
# #
# Note as well, this is the older version of the software (synergy 1). To get #
# Synergy 3.x you will need to purchase the license to use it. Otherwise, I #
# haven't been able to find that repo (unless I'm overlooking something) #
# #
####################################################################################
# BEGIN: Variables
declare -a NEEDED_PACKAGES=(
# Cmake Deps
cmake
## Well...for git and stuff
git
# Compiler dependencies
libX11-devel
libXtst-devel
glib2-devel
gdk-pixbuf2-devel
libnotify-devel
libXinerama-devel
## For qt5_add_translation macro
qt5-qttools-devel
## For X11/extensions/XKBrules.h
libxkbfile-devel
)
## URL to git repo
REPO_URL='https://github.com/symless/synergy-core'
## Getting REPO name for later use
REPO_NAME="${REPO_URL##*\/}"
# END: Variables
# BEGIN: Pre-Work Check
## Clean cache
sudo dnf clean all
## Make package manager cache any new changes to repo (to ensure that all packages are accurate)
sudo dnf makecache
## I could do an elegant check for each individual package, but this is much easier
sudo dnf install -y ${NEEDED_PACKAGES[@]}
if [[ $? -ne 0 ]]; then
echo "Package install exited uncleanly, please address and run again"
exit 0
fi
# END: Pre-Work Check
# BEGIN: Work
## Move to downloads dir, to clone the repo and do work
cd ~/Downloads
## Clone repo
git clone $REPO_URL
## Moving to git repo
cd $REPO_NAME
## INIT-ing and updating submodules (needed to build)
git submodule init && git submodule update
## Make and cd into the directory that you're building the project in
mkdir build && cd build
## Making the buildfile and preparing for the build
cmake ..
## Build the project
make && make install
# END: Work