Added the ability to generate a standalone deb.

This commit is contained in:
casey langen 2022-02-15 16:16:37 -08:00
parent 315fac1664
commit 65389f229e
5 changed files with 32 additions and 22 deletions

View File

@ -7,7 +7,7 @@ jobs:
- run: apt-get update
- run: DEBIAN_FRONTEND="noninteractive" TZ="America/Los_Angeles" apt-get install -y git ssh sshpass build-essential clang cmake libboost-thread1.71-dev libboost-system1.71-dev libboost-filesystem1.71-dev libboost-date-time1.71-dev libboost-atomic1.71-dev libboost-chrono1.71-dev libogg-dev libvorbis-dev libavutil-dev libavformat-dev libswresample-dev libncursesw5-dev libasound2-dev libpulse-dev pulseaudio libmicrohttpd-dev libmp3lame-dev libcurl4-openssl-dev libev-dev libssl-dev libtag1-dev libsystemd-dev
- checkout
- run: cmake -DENABLE_PCH=true -DGENERATE_DEB=1 -DDEB_ARCHITECTURE=amd64 -DDEB_PLATFORM=ubuntu -DDEB_DISTRO=focal -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release .
- run: cmake -DENABLE_PCH=true -DGENERATE_DEB=true -DDEB_ARCHITECTURE=amd64 -DDEB_PLATFORM=ubuntu -DDEB_DISTRO=focal -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release .
- run: make -j2
- run: make package
- run: ./script/copy-artifacts-to-host.sh /root/project/*.deb
@ -21,7 +21,7 @@ jobs:
- run: apt-get update
- run: DEBIAN_FRONTEND="noninteractive" TZ="America/Los_Angeles" apt-get install -y git ssh sshpass build-essential clang cmake libboost-thread1.71-dev libboost-system1.71-dev libboost-filesystem1.71-dev libboost-date-time1.71-dev libboost-atomic1.71-dev libboost-chrono1.71-dev libogg-dev libvorbis-dev libavutil-dev libavformat-dev libswresample-dev libncursesw5-dev libasound2-dev libpulse-dev pulseaudio libmicrohttpd-dev libmp3lame-dev libcurl4-openssl-dev libev-dev libssl-dev libtag1-dev libsystemd-dev libpipewire-0.3-dev libspa-0.2-dev
- checkout
- run: cmake -DENABLE_PCH=true -DENABLE_PIPEWIRE=true -DGENERATE_DEB=1 -DDEB_ARCHITECTURE=amd64 -DDEB_PLATFORM=ubuntu -DDEB_DISTRO=hirsute -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release .
- run: cmake -DENABLE_PCH=true -DENABLE_PIPEWIRE=true -DGENERATE_DEB=true -DDEB_ARCHITECTURE=amd64 -DDEB_PLATFORM=ubuntu -DDEB_DISTRO=hirsute -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release .
- run: make -j2
- run: make package
- run: ./script/copy-artifacts-to-host.sh /root/project/*.deb
@ -35,7 +35,7 @@ jobs:
- run: apt-get update
- run: DEBIAN_FRONTEND="noninteractive" TZ="America/Los_Angeles" apt-get install -y git ssh sshpass build-essential clang cmake libboost-thread1.74-dev libboost-system1.74-dev libboost-filesystem1.74-dev libboost-date-time1.74-dev libboost-atomic1.74-dev libboost-chrono1.74-dev libogg-dev libvorbis-dev libavutil-dev libavformat-dev libswresample-dev libncursesw5-dev libasound2-dev libpulse-dev pulseaudio libmicrohttpd-dev libmp3lame-dev libcurl4-openssl-dev libev-dev libssl-dev libtag1-dev libsystemd-dev libpipewire-0.3-dev libspa-0.2-dev
- checkout
- run: cmake -DENABLE_PCH=true -DENABLE_PIPEWIRE=true -DGENERATE_DEB=1 -DDEB_ARCHITECTURE=amd64 -DDEB_PLATFORM=ubuntu -DDEB_DISTRO=impish -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release .
- run: cmake -DENABLE_PCH=true -DENABLE_PIPEWIRE=true -DGENERATE_DEB=true -DDEB_ARCHITECTURE=amd64 -DDEB_PLATFORM=ubuntu -DDEB_DISTRO=impish -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release .
- run: make -j2
- run: make package
- run: ./script/copy-artifacts-to-host.sh /root/project/*.deb
@ -101,7 +101,7 @@ jobs:
- run: apt-get update
- run: DEBIAN_FRONTEND="noninteractive" TZ="America/Los_Angeles" apt-get install -y git ssh sshpass build-essential clang cmake libboost-thread1.71-dev libboost-system1.71-dev libboost-filesystem1.71-dev libboost-date-time1.71-dev libboost-atomic1.71-dev libboost-chrono1.71-dev libogg-dev libvorbis-dev libavutil-dev libavformat-dev libswresample-dev libncursesw5-dev libasound2-dev libpulse-dev pulseaudio libmicrohttpd-dev libmp3lame-dev libcurl4-openssl-dev libev-dev libssl-dev libtag1-dev libsystemd-dev
- checkout
- run: cmake -DENABLE_PCH=true -DGENERATE_DEB=1 -DDEB_ARCHITECTURE=amd64 -DDEB_PLATFORM=mint -DDEB_DISTRO=una -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release .
- run: cmake -DENABLE_PCH=true -DGENERATE_DEB=true -DDEB_ARCHITECTURE=amd64 -DDEB_PLATFORM=mint -DDEB_DISTRO=una -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release .
- run: make -j2
- run: make package
- run: ./script/copy-artifacts-to-host.sh /root/project/*.deb
@ -115,7 +115,7 @@ jobs:
- run: apt-get update
- run: DEBIAN_FRONTEND="noninteractive" TZ="America/Los_Angeles" apt-get install -y git ssh sshpass build-essential clang cmake libboost-thread1.67-dev libboost-system1.67-dev libboost-filesystem1.67-dev libboost-date-time1.67-dev libboost-atomic1.67-dev libboost-chrono1.67-dev libogg-dev libvorbis-dev libavutil-dev libavformat-dev libswresample-dev libncursesw5-dev libasound2-dev libpulse-dev pulseaudio libmicrohttpd-dev libmp3lame-dev libcurl4-openssl-dev libev-dev libssl-dev libtag1-dev libsystemd-dev
- checkout
- run: cmake -DGENERATE_DEB=1 -DDEB_ARCHITECTURE=amd64 -DDEB_PLATFORM=debian -DDEB_DISTRO=buster -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release .
- run: cmake -DGENERATE_DEB=true -DDEB_ARCHITECTURE=amd64 -DDEB_PLATFORM=debian -DDEB_DISTRO=buster -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release .
- run: make -j2
- run: make package
- run: ./script/copy-artifacts-to-host.sh /root/project/*.deb
@ -129,7 +129,7 @@ jobs:
- run: apt-get update
- run: DEBIAN_FRONTEND="noninteractive" TZ="America/Los_Angeles" apt-get install -y git ssh sshpass build-essential clang cmake libboost-thread1.74-dev libboost-system1.74-dev libboost-filesystem1.74-dev libboost-date-time1.74-dev libboost-atomic1.74-dev libboost-chrono1.74-dev libogg-dev libvorbis-dev libavutil-dev libavformat-dev libswresample-dev libncursesw5-dev libasound2-dev libpulse-dev pulseaudio libmicrohttpd-dev libmp3lame-dev libcurl4-openssl-dev libev-dev libssl-dev libtag1-dev libsystemd-dev
- checkout
- run: cmake -DGENERATE_DEB=1 -DDEB_ARCHITECTURE=amd64 -DDEB_PLATFORM=debian -DDEB_DISTRO=bullseye -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release .
- run: cmake -DGENERATE_DEB=true -DDEB_ARCHITECTURE=amd64 -DDEB_PLATFORM=debian -DDEB_DISTRO=bullseye -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release .
- run: make -j2
- run: make package
- run: ./script/copy-artifacts-to-host.sh /root/project/*.deb

View File

@ -1,5 +1,7 @@
if (GENERATE_DEB MATCHES "1")
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
if (${GENERATE_DEB} MATCHES "1" AND CMAKE_SYSTEM_NAME MATCHES "Linux")
if (${BUILD_STANDALONE} MATCHES "true")
set(CPACK_PACKAGE_FILE_NAME "musikcube_${musikcube_VERSION}_standalone_${DEB_ARCHITECTURE}")
else()
set(DEB_BOOST_VERSION "1.55.0")
set(DEB_MICROHTTPD_VERSION "10")
set(DEB_LIBCURL_VERSION "3")
@ -51,15 +53,16 @@ if (GENERATE_DEB MATCHES "1")
set(DEPENDENCIES "${DEPENDENCIES}, libtag1v5")
endif()
set(CPACK_PACKAGE_FILE_NAME "musikcube_${musikcube_VERSION}_${DEB_PLATFORM}_${DEB_DISTRO}_${DEB_ARCHITECTURE}")
set(CPACK_DEBIAN_PACKAGE_DEPENDS ${DEPENDENCIES})
endif()
set(CPACK_GENERATOR "DEB")
set(CPACK_PACKAGE_DESCRIPTION "musikcube, a terminal-based music player and library")
set(CPACK_PACKAGE_VERSION_MAJOR "${musikcube_VERSION_MAJOR}")
set(CPACK_PACKAGE_VERSION_MINOR "${musikcube_VERSION_MINOR}")
set(CPACK_PACKAGE_VERSION_PATCH "${musikcube_VERSION_PATCH}")
set(CPACK_DEBIAN_PACKAGE_DEPENDS ${DEPENDENCIES})
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "casey langen")
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE ${DEB_ARCHITECTURE})
set(CPACK_PACKAGE_FILE_NAME "musikcube_${musikcube_VERSION}_${DEB_PLATFORM}_${DEB_DISTRO}_${DEB_ARCHITECTURE}")
include(CPack)
endif()
endif()

View File

@ -1,5 +1,5 @@
# plugin dynamic libraries
if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
if (APPLE)
file(GLOB plugins "bin/plugins/*.dylib")
install(FILES ${plugins} DESTINATION share/musikcube/plugins)
else ()
@ -7,6 +7,13 @@ else ()
install(FILES ${plugins} DESTINATION share/musikcube/plugins)
endif ()
if (${BUILD_STANDALONE} MATCHES "true")
file(GLOB libraries "bin/lib/*")
install(FILES ${libraries} DESTINATION share/musikcube/lib)
file(GLOB_RECURSE share "bin/share/*")
install(FILES ${share} DESTINATION share/musikcube/share)
endif()
# sdk header files
file(GLOB sdk_headers "src/musikcore/sdk/*.h")
install(FILES ${sdk_headers} DESTINATION include/musikcube/musikcore/sdk)
@ -33,7 +40,7 @@ if (CMAKE_SYSTEM_NAME MATCHES "Linux")
endif()
# libmusikcore shared library
if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
if (APPLE)
install(FILES "bin/libmusikcore.dylib" DESTINATION share/musikcube)
else()
install(FILES "bin/libmusikcore.so" DESTINATION share/musikcube)

View File

@ -1,6 +1,6 @@
#cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr .
#cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/usr .
#cmake -DGENERATE_DEB=1 -DDEB_ARCHITECTURE=i386|amd64|armhf -DDEB_PLATFORM=ubuntu -DDEB_DISTRO=eoan -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release .
#cmake -DGENERATE_DEB=true -DDEB_ARCHITECTURE=i386|amd64|armhf -DDEB_PLATFORM=ubuntu -DDEB_DISTRO=eoan -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release .
#cmake -DCMAKE_BUILD_TYPE=Release - -DBUILD_STANDALONE=true .
cmake_minimum_required(VERSION 3.0)

View File

@ -4,6 +4,6 @@ SCRIPT_DIR=`dirname "$0"`
rm -rf bin
${SCRIPT_DIR}/clean-nix.sh
cmake -DENABLE_PCH=true -DGENERATE_DEB=1 -DDEB_ARCHITECTURE=armhf -DDEB_PLATFORM=rpi -DDEB_DISTRO=buster -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release .
cmake -DENABLE_PCH=true -DGENERATE_DEB=true -DDEB_ARCHITECTURE=armhf -DDEB_PLATFORM=rpi -DDEB_DISTRO=buster -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release .
make -j4
cpack