From 19c1d335160ad56849c547536f088b08889fa8b5 Mon Sep 17 00:00:00 2001 From: casey langen Date: Tue, 15 Feb 2022 16:54:44 -0800 Subject: [PATCH] The archive script also now generates debs. --- .cmake/GenerateDeb.cmake | 4 ++-- script/archive-standalone-nix.sh | 20 ++++++++++++-------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.cmake/GenerateDeb.cmake b/.cmake/GenerateDeb.cmake index 1fb42ed9d..c95cdc96f 100644 --- a/.cmake/GenerateDeb.cmake +++ b/.cmake/GenerateDeb.cmake @@ -1,6 +1,6 @@ -if (${GENERATE_DEB} MATCHES "1" AND CMAKE_SYSTEM_NAME MATCHES "Linux") +if (${GENERATE_DEB} MATCHES "true" AND CMAKE_SYSTEM_NAME MATCHES "Linux") if (${BUILD_STANDALONE} MATCHES "true") - set(CPACK_PACKAGE_FILE_NAME "musikcube_${musikcube_VERSION}_standalone_${DEB_ARCHITECTURE}") + set(CPACK_PACKAGE_FILE_NAME "musikcube_standalone_${musikcube_VERSION}_${DEB_ARCHITECTURE}") else() set(DEB_BOOST_VERSION "1.55.0") set(DEB_MICROHTTPD_VERSION "10") diff --git a/script/archive-standalone-nix.sh b/script/archive-standalone-nix.sh index 52bbfd48c..ff1b1a1ad 100755 --- a/script/archive-standalone-nix.sh +++ b/script/archive-standalone-nix.sh @@ -1,6 +1,6 @@ #!/bin/bash -# set -x +set -x VERSION=$1 @@ -21,7 +21,7 @@ fi ARCH=$(uname -m) OS_ARCH="${FRIENDLY_OS_NAME}_${ARCH}" OUTNAME="musikcube_standalone_${OS_ARCH}_$VERSION" -OUTDIR="dist/$OUTNAME" +OUTDIR="dist/$VERSION/$OUTNAME" SCRIPTDIR=`dirname "$0"` DLL_EXT="so" @@ -31,7 +31,7 @@ fi OS_SPECIFIC_BUILD_FLAGS="" if [ $OS == "Linux" ]; then - OS_SPECIFIC_BUILD_FLAGS="-DENABLE_PIPEWIRE=true" + OS_SPECIFIC_BUILD_FLAGS="-DENABLE_PIPEWIRE=true -DGENERATE_DEB=true -DDEB_ARCHITECTURE=$ARCH -DCMAKE_INSTALL_PREFIX=/usr" fi printf "\n" @@ -50,8 +50,7 @@ else make ${JOBS} || exit $? fi -rm -rf $OUTDIR -rm dist/$OUTNAME* 2> /dev/null +rm -rf dist/$VERSION 2> /dev/null mkdir -p $OUTDIR/lib mkdir -p $OUTDIR/plugins @@ -75,11 +74,16 @@ strip $OUTDIR/lib/* strip $OUTDIR/libmusikcore.${DLL_EXT} strip $OUTDIR/plugins/*.${DLL_EXT} -cd dist +cd dist/$VERSION/ tar cvf $OUTNAME.tar $OUTNAME bzip2 $OUTNAME.tar -cd .. +cd ../../ + +if [ $OS == "Linux" ]; then + cpack + mv *.deb dist/$VERSION/ +fi printf "\n\n\n ***** DONE *****\n\n\n" -ls -al dist/$OUTNAME.tar.bz2 +ls -al dist/$VERSION printf "\n\n"