From 7f3c00c32c585376f4d0ab57ad34f852052dbf78 Mon Sep 17 00:00:00 2001 From: Dominik Deak Date: Wed, 15 Jul 2020 19:26:54 +1000 Subject: [PATCH] Work on build script. --- .gitignore | 4 ++-- Build/.keep | 0 BuildLinux.sh | 30 +++++++++++++++++++----------- 3 files changed, 21 insertions(+), 13 deletions(-) delete mode 100644 Build/.keep diff --git a/.gitignore b/.gitignore index 158b474..b6b0c6b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -Build/* -!Build/.keep \ No newline at end of file +Binaries/* +!Binaries/.keep \ No newline at end of file diff --git a/Build/.keep b/Build/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/BuildLinux.sh b/BuildLinux.sh index eda021c..081ed33 100755 --- a/BuildLinux.sh +++ b/BuildLinux.sh @@ -1,9 +1,9 @@ #!/bin/bash scriptPath="$( cd "$(dirname "${0}")" ; pwd -P )" -buildPath="${scriptPath}/Build" -binariesPath="${scriptPath}/Binaries" synergyCorePath="${scriptPath}/Synergy-Core" +buildPath="${synergyCorePath}/build" +binariesPath="${scriptPath}/Binaries" source /etc/os-release || exit 1 cat "${synergyCorePath}/Build.properties" | perl -pe "s/(SYNERGY\w+) *= */export \1=/" > "${buildPath}/version" @@ -52,25 +52,34 @@ buildAppImage() { buildDeb() { - pushd "${buildPath}" || exit 1 + pushd "${synergyCorePath}" || exit 1 - pushd "${synergyCorePath}" || exit 1 + printf "synergy (${synergyVersion}) ${SYNERGY_VERSION_STAGE}; urgency=medium\n" > "debian/changelog" + debuild --set-envvar CMAKE_BUILD_TYPE=MINSIZEREL --set-envvar SYNERGY_ENTERPRISE=ON -us -uc + git clean -fd - printf "synergy (${synergyVersion}) ${synergyStage}; urgency=medium\n" > "debian/changelog" - debuild --set-envvar CMAKE_BUILD_TYPE=MINSIZEREL --set-envvar SYNERGY_ENTERPRISE=ON -us -uc - git clean -fd + popd - popd + pushd "${buildPath}" || exit 1 mv "${synergyCorePath}/../"*.deb "${binariesPath}" - rm "${synergyCorePath}/../synergy_${synergyVersion}"* - rm "${synergyCorePath}/../synergy-dbgsym_${synergyVersion}"* + + rename "s/(\\d+\\.\\d+.\\d+)/\$1-${linuxVersion}/g" "${binariesPath}"/*.deb + + mv "${synergyCorePath}/../synergy_${synergyVersion}"* "${buildPath}" + mv "${synergyCorePath}/../synergy-dbgsym_${synergyVersion}"* "${buildPath}" popd } buildClean() { + pushd "${synergyCorePath}" || exit 1 + + git clean -fd + + popd + rm -fR "${buildPath}/"* rm -fR "${binariesPath}/"* @@ -79,7 +88,6 @@ buildClean() { } - if [ "${1}" = "--help" ] || [ "${1}" = "-h" ]; then echo \