summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt47
-rw-r--r--packaging/CPackConfig.cmake16
-rw-r--r--packaging/CPackDebUploadPPA.cmake62
-rw-r--r--packaging/CPackPackageDescription.txt7
-rw-r--r--packaging/debian/control.in (renamed from packaging/debian/control)60
-rwxr-xr-xpackaging/debian/rules63
6 files changed, 139 insertions, 116 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 303f47ab0a..299716305c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1488,13 +1488,15 @@ else()
endif()
add_dependencies(mixxx-lib mixxx-res mixxx-script)
+file(READ src/_version.h MIXXX_VERSION_FILECONTENT)
+string(REGEX REPLACE "^.*#define MIXXX_VERSION \"(.*)\".*$" "\\1" MIXXX_VERSION "${MIXXX_VERSION_FILECONTENT}")
+# a dummy configure to force a reconfigure when the version changes
+configure_file(src/_version.h src/_version.h)
+
# Windows-only resource file
if(WIN32)
string(TIMESTAMP MIXXX_YEAR "%Y")
- file(READ src/_version.h MIXXX_VERSION_FILECONTENT)
- string(REGEX REPLACE "^.*#define MIXXX_VERSION \"(.*)\".*$" "\\1" MIXXX_VERSION "${MIXXX_VERSION_FILECONTENT}")
-
# Remove anything after ~ or - in the version number and replace the dots with commas
string(REGEX REPLACE "^([^~-]+).*$" "\\1" MIXXX_FILEVERSION "${MIXXX_VERSION}")
string(REPLACE "." "," MIXXX_FILEVERSION "${MIXXX_FILEVERSION}")
@@ -2510,7 +2512,8 @@ endif()
# Packaging
set(CPACK_PACKAGE_VENDOR "Mixxx Project")
set(CPACK_PACKAGE_CONTACT "RJ Skerry-Ryan <rryan@mixxx.org>")
-set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/cmake/cpack_package_description.txt")
+set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Digital Disc Jockey Application")
+set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/packaging/CPackPackageDescription.txt")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "Mixxx")
set(CPACK_PACKAGE_EXECUTABLES "mixxx;Mixxx")
set(CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/res/images/mixxx_install_logo.bmp")
@@ -2522,12 +2525,42 @@ set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README")
set(CPACK_STRIP_FILES ON)
set(CPACK_CREATE_DESKTOP_LINKS "mixxx")
+set(CPACK_SOURCE_IGNORE_FILES "\\\\.#;/#;.*~;\\\\.o$")
+list(APPEND CPACK_SOURCE_IGNORE_FILES "/\\\\.git/")
+list(APPEND CPACK_SOURCE_IGNORE_FILES "/\\\\.github/")
+list(APPEND CPACK_SOURCE_IGNORE_FILES "/cache/")
+list(APPEND CPACK_SOURCE_IGNORE_FILES "/.*_build/")
+list(APPEND CPACK_SOURCE_IGNORE_FILES "/\\\\.sconf_temp/")
+list(APPEND CPACK_SOURCE_IGNORE_FILES "${CMAKE_CURRENT_BINARY_DIR}/")
+set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}-Source")
+
set(CPACK_DEBIAN_PACKAGE_SECTION "sound")
set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
-set(CPACK_DEBIAN_PACKAGE_SUGGESTS "pdf-viewer")
+set(CPACK_DEBIAN_PACKAGE_SUGGESTS "pdf-viewer, pulseaudio-utils")
set(CPACK_DEBIAN_PACKAGE_REPLACES "mixxx-data")
-set(CPACK_DEBIAN_PACKAGE_DEPENDS "libqt5opengl5, libqt5svg5, libqt5xml5, libqt5sql5, libqt5sql5-sqlite")
+set(CPACK_DEBIAN_PACKAGE_DEPENDS "libqt5sql5-sqlite")
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
+set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "${CPACK_PACKAGE_HOMEPAGE_URL}")
+file(READ ${CPACK_PACKAGE_DESCRIPTION_FILE} CPACK_DEBIAN_PACKAGE_DESCRIPTION)
+set(CPACK_DEBIAN_PACKAGE_DESCRIPTION_MERGED "${CPACK_DEBIAN_PACKAGE_DESCRIPTION}")
+string(PREPEND CPACK_DEBIAN_PACKAGE_DESCRIPTION_MERGED "${CPACK_PACKAGE_DESCRIPTION_SUMMARY}" "\n")
+string(REPLACE "\n\n" "\n.\n" CPACK_DEBIAN_PACKAGE_DESCRIPTION_MERGED "${CPACK_DEBIAN_PACKAGE_DESCRIPTION_MERGED}")
+string(REPLACE "\n" "\n " CPACK_DEBIAN_PACKAGE_DESCRIPTION_MERGED "${CPACK_DEBIAN_PACKAGE_DESCRIPTION_MERGED}")
+if("3.16.0" VERSION_GREATER CMAKE_VERSION)
+ # This hack is no longer required with cpack version 3.16.3
+ set(CPACK_PACKAGE_DESCRIPTION "${CPACK_DEBIAN_PACKAGE_DESCRIPTION_MERGED}")
+endif()
+
+# The upstream version must not contain hyphen
+string(REPLACE "-" "~" CPACK_DEBIAN_UPSTREAM_VERSION "${MIXXX_VERSION}")
+set(CPACK_DEBIAN_DEBIAN_VERSION 0ubuntu1)
+set(CPACK_DEBIAN_DEBIAN_VERSION_EXTRA "${GIT_BRANCH}~git${GIT_COMMIT_COUNT}")
+string(REPLACE "_" "" CPACK_DEBIAN_DEBIAN_VERSION_EXTRA "${CPACK_DEBIAN_DEBIAN_VERSION_EXTRA}")
+set(CPACK_DEBIAN_PACKAGE_VERSION "${CPACK_DEBIAN_UPSTREAM_VERSION}-ppa1~${GIT_BRANCH}~git${GIT_COMMIT_COUNT}~bionic")
+set(CPACK_DEBIAN_DISTRIBUTION_RELEASES bionic focal groovy)
+set(CPACK_DEBIAN_SOURCE_DIR ${CMAKE_SOURCE_DIR})
+set(CPACK_DEBIAN_UPLOAD_PPA_SCRIPT "${CMAKE_CURRENT_SOURCE_DIR}/packaging/CPackDebUploadPPA.cmake")
+
set(CPACK_WIX_UPGRADE_GUID "921DC99C-4DCF-478D-B950-50685CB9E6BE")
set(CPACK_WIX_LICENSE_RTF "${CMAKE_CURRENT_SOURCE_DIR}/build/wix/LICENSE.rtf")
@@ -2536,6 +2569,8 @@ set(CPACK_WIX_PROPERTY_ARPHELPLINK "${CPACK_PACKAGE_HOMEPAGE_URL}")
set(CPACK_WIX_UI_BANNER "${CMAKE_CURRENT_SOURCE_DIR}/build/wix/images/banner.bmp")
set(CPACK_WIX_UI_DIALOG "${CMAKE_CURRENT_SOURCE_DIR}/build/wix/images/dialog.bmp")
+set(CPACK_PROJECT_CONFIG_FILE "${CMAKE_SOURCE_DIR}/packaging/CPackConfig.cmake" )
+
include(CPack)
if(APPLE AND MACOS_BUNDLE)
diff --git a/packaging/CPackConfig.cmake b/packaging/CPackConfig.cmake
new file mode 100644
index 0000000000..2514ac5815
--- /dev/null
+++ b/packaging/CPackConfig.cmake
@@ -0,0 +1,16 @@
+# unlike CMakeLists.txt this file is include at cpack time, once per generator after CPack has set CPACK_GENERATOR
+# to the actual generator being used. It allows per-generator setting of CPACK_* variables at cpack time.
+
+if (CPACK_GENERATOR MATCHES "DEB")
+ set( CPACK_INSTALL_SCRIPT ${CPACK_DEBIAN_INSTALL_SCRIPT} )
+endif()
+
+if (CPACK_GENERATOR MATCHES "External")
+ if (DEB_UPLOAD_PPA)
+ set(CPACK_EXTERNAL_ENABLE_STAGING true)
+ set(CPACK_INSTALLED_DIRECTORIES "${CPACK_DEBIAN_SOURCE_DIR};/")
+ set(CPACK_IGNORE_FILES "${CPACK_SOURCE_IGNORE_FILES}")
+ set(CPACK_INSTALL_CMAKE_PROJECTS "")
+ set(CPACK_EXTERNAL_PACKAGE_SCRIPT "${CPACK_DEBIAN_UPLOAD_PPA_SCRIPT}" )
+ endif ()
+endif()
diff --git a/packaging/CPackDebUploadPPA.cmake b/packaging/CPackDebUploadPPA.cmake
new file mode 100644
index 0000000000..4e28eb24c3
--- /dev/null
+++ b/packaging/CPackDebUploadPPA.cmake
@@ -0,0 +1,62 @@
+# This file is executed during cpack time.
+# The command is
+# cpack -G External -D DEB_UPLOAD_PPA=true
+
+find_program(CPACK_DEBIAN_DEBUILD debuild)
+if(NOT CPACK_DEBIAN_DEBUILD)
+ message(FATAL_ERROR "debuild not found, required for cpack -G External -D DEB_UPLOAD_PPA=true" )
+endif()
+
+find_program(CPACK_DEBIAN_DPUT dput)
+if(NOT CPACK_DEBIAN_DPUT )
+ message(FATAL_ERROR "dput not found, required for cpack -G External -D DEB_UPLOAD_PPA=true" )
+endif()
+
+find_program(CPACK_DEBIAN_DEBCHANGE debchange)
+if(NOT CPACK_DEBIAN_DEBCHANGE)
+ message(FATAL_ERROR "debchange not found, required for cpack -G External -D DEB_UPLOAD_PPA=true" )
+endif()
+
+find_program(CPACK_DEBIAN_MARKDOWN markdown)
+if(NOT CPACK_DEBIAN_MARKDOWN)
+ message(FATAL_ERROR "debchange not found, required for cpack -G External -D DEB_UPLOAD_PPA=true" )
+endif()
+
+
+message( NOTICE "Creating mixxx_${CPACK_DEBIAN_UPSTREAM_VERSION}.orig.tar.gz" )
+execute_process(
+ COMMAND tar -czf "mixxx_${CPACK_DEBIAN_UPSTREAM_VERSION}.orig.tar.gz" ${CPACK_PACKAGE_FILE_NAME}
+ WORKING_DIRECTORY ${CPACK_TOPLEVEL_DIRECTORY}
+)
+
+message( NOTICE "Creating debian folder" )
+file(COPY ${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}/packaging/debian
+ DESTINATION ${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME})
+
+execute_process(
+ COMMAND ${CPACK_DEBIAN_MARKDOWN} ${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}/CHANGELOG.md -o NEWS.html
+ WORKING_DIRECTORY ${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}/debian
+)
+
+configure_file(${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}/debian/control.in
+ ${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}/debian/control
+ @ONLY)
+file(REMOVE ${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}/debian/control.in)
+
+
+foreach(RELEASE ${CPACK_DEBIAN_DISTRIBUTION_RELEASES})
+
+ file(COPY ${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}/packaging/debian/changelog
+ DESTINATION ${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}/debian)
+ execute_process(COMMAND ${CPACK_DEBIAN_DEBCHANGE} -v "${CPACK_DEBIAN_UPSTREAM_VERSION}-${CPACK_DEBIAN_DEBIAN_VERSION}~${CPACK_DEBIAN_DEBIAN_VERSION_EXTRA}~${RELEASE}" -M "Build of ${CPACK_DEBIAN_UPSTREAM_VERSION}"
+ WORKING_DIRECTORY ${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME})
+ execute_process(COMMAND ${CPACK_DEBIAN_DEBCHANGE} -r -D ${RELEASE} -M "Build of ${CPACK_DEBIAN_UPSTREAM_VERSION}"
+ WORKING_DIRECTORY ${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME})
+
+ execute_process(COMMAND ${CPACK_DEBIAN_DEBUILD} -S -sa
+ WORKING_DIRECTORY ${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}
+ RESULT_VARIABLE CPACK_DEBIAN_DEBUILD_RET)
+ if(NOT CPACK_DEBIAN_DEBUILD_RET EQUAL "0")
+ message(FATAL_ERROR "${CPACK_DEBIAN_DEBUILD} retuned exit code ${CPACK_DEBIAN_DEBUILD_RET}")
+ endif()
+endforeach(RELEASE ${CPACK_DEBIAN_DISTRIBUTION_RELEASES})
diff --git a/packaging/CPackPackageDescription.txt b/packaging/CPackPackageDescription.txt
new file mode 100644
index 0000000000..c6261978c8
--- /dev/null
+++ b/packaging/CPackPackageDescription.txt
@@ -0,0 +1,7 @@
+Mixxx is a digital DJ system, where Wave, Ogg, FLAC and MP3 files can be
+mixed on a computer for use in live performances. Filters, crossfader, and
+speed control are provided. Mixxx can sync the 4 decks automatically, using
+an algorithm to detect the beat.
+
+Mixxx works with ALSA or Jack, can be controlled from the GUI or from external
+controllers, including MIDI devices and joysticks, and supports skins.
diff --git a/packaging/debian/control b/packaging/debian/control.in
index 8626978613..b83cd4182a 100644
--- a/packaging/debian/control
+++ b/packaging/debian/control.in
@@ -1,10 +1,11 @@
Source: mixxx
-Section: sound
-Priority: optional
-Maintainer: RJ Skerry-Ryan <rryan@mixxx.org>
+Section: @CPACK_DEBIAN_PACKAGE_SECTION@
+Priority: @CPACK_DEBIAN_PACKAGE_PRIORITY@
+Maintainer: @CPACK_PACKAGE_CONTACT@
Build-Depends: debhelper (>= 11),
pkg-config,
docbook-to-man,
+ markdown,
libglu1-mesa-dev,
# qt5-default depends on qtbase5-dev, which includes headers for
# QtConcurrent
@@ -55,10 +56,10 @@ Build-Depends: debhelper (>= 11),
# for running mixxx-test
xvfb
Standards-Version: 4.1.4
-Homepage: http://www.mixxx.org/
+Homepage: @CPACK_DEBIAN_PACKAGE_HOMEPAGE@
Package: mixxx
-Section: sound
+Section: @CPACK_DEBIAN_PACKAGE_SECTION@
Architecture: linux-any
Depends: ${shlibs:Depends},
${misc:Depends},
@@ -67,55 +68,12 @@ Depends: ${shlibs:Depends},
libqt5xml5,
libqt5sql5,
libqt5sql5-sqlite,
-# for pasuspender
- pulseaudio-utils
-Suggests: pdf-viewer
+Suggests: @CPACK_DEBIAN_PACKAGE_SUGGESTS@
Replaces: mixxx-data
-Description: Free Digital DJ software. Start making live DJ mixes today.
- Mixxx is free DJ software that gives you everything you need to perform live DJ
- mixes. Blend songs together with automatic BPM matching and remix on-the-fly
- with looping and hot cues. Whether you're a pro DJ or just getting started,
- Mixxx has you covered.
- .
- Mixxx works with ALSA, JACK, OSS and supports many popular DJ controllers.
- .
- Features include:
- - Parallel or split scratchable waveform displays
- - Waveform summaries
- - Spinning vinyl widgets
- - MP3, OGG, WAVE, FLAC, and optional unprotected aac (m4a) playback
- - Extra playback formats through plugins
- - Wave and Ogg recording with optional MP3 support
- - Fast, database-powered library
- - Crates and playlists for organizing your music
- - Reads iTunes, Traktor, and Rhythmbox libraries
- - History section keeps track of your setlists
- - Internet Broadcasting with Shoutcast and Icecast
- - Microphone Support
- - Automatic crossfading with Auto DJ
- - Pitch-independent time stretch (key lock)
- - Adjustable pitch range
- - Ramping pitchbend controls
- - ReplayGain volume normalization
- - Quantized loops, hotcues, and beatloops
- - Synchronization and auto-beatmatching
- - BPM detection and estimation
- - Bulk BPM analysis
- - Adjustable EQ shelves
- - Crossfader curve control
- - Sampler Decks
- - Vinyl emulation with Serato, Traktor, and Mixvibes timecode support
- - Multichannel soundcard support (playback and capture)
- - Headphone cueing with multiple soundcard support
- - Skinnable interface with several skins bundled
- - Support for many DJ MIDI and HID controllers out-of-the-box
- - Advanced MIDI/HID scripting engine
- - Multiple simultaneous MIDI/HID controllers
- - Multi-core CPU support
- - 24-bit/96000 Hz playback and capture
+Description: @CPACK_DEBIAN_PACKAGE_DESCRIPTION_MERGED@
Package: mixxx-test
-Section: sound
+Section: @CPACK_DEBIAN_PACKAGE_SECTION@
Architecture: linux-any
Depends: ${shlibs:Depends},
${misc:Depends},
diff --git a/packaging/debian/rules b/packaging/debian/rules
index 25f157c66f..0c9da01e9b 100755
--- a/packaging/debian/rules
+++ b/packaging/debian/rules
@@ -1,69 +1,14 @@
#!/usr/bin/make -f
-# -*- makefile -*-
# Documentation: https://www.debian.org/doc/debian-policy/ch-source.html#main-building-script-debian-rules
-# Build flags are passed in from the SConscript. The following line is replaced
-# via exact-string matching so do not change it!
-MIXXX_SCONS_FLAGS = ""
-# If ARCH is set to a different architecture when running pbuilder, pbuilder
-# will be set to create an environment to build packages for the architecture
-# specified in ARCH.
-ifneq (,$(findstring i386,$(ARCH)))
- MIXXX_SCONS_FLAGS += machine=x86
-endif
-ifneq (,$(findstring amd64,$(ARCH)))
- MIXXX_SCONS_FLAGS += machine=x86_64
-endif
-
-# parallel builds for scons
-ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
- NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
- MIXXX_SCONS_FLAGS += -j$(NUMJOBS)
-endif
-
-ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
- MIXXX_SCONS_FLAGS += test=1
-endif
-
-MIXXX_SCONS_FLAGS += prefix=/usr
-MIXXX_SCONS_FLAGS += install_root=$(CURDIR)/debian/tmp/usr
-
-%:
- dh $@ --parallel
-
-# dh_auto_configure will attempt to run cmake instead of scons
-# nothing needs to be done for the configure step; scons is run in the build step below
override_dh_auto_configure:
- :
+ dh_auto_configure -- -DCMAKE_BUILD_TYPE=RelWithDebInfo
override_dh_auto_build:
- scons $(MIXXX_SCONS_FLAGS)
docbook-to-man debian/mixxx.sgml > mixxx.1
+ dh_auto_build
-override_dh_auto_test:
-ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
- xvfb-run -- ./mixxx-test --gtest_output=xml:test_results.xml
-endif
-
-override_dh_auto_clean:
- scons $(MIXXX_SCONS_FLAGS) -c || true
- rm -rf .sconf_temp/ cache/ lin*_build/
- dh_clean .sconsign.dblite cachecustom.py \
- config.log src/build.h build/*.pyc mixxx.1 lib/*/lib/*.a
- dh_auto_clean
-
-override_dh_auto_install:
- scons $(MIXXX_SCONS_FLAGS) install
- mkdir $(CURDIR)/debian/tmp/usr/share/mixxx-test
- cp test_results.xml $(CURDIR)/debian/tmp/usr/share/mixxx-test/
- cp mixxx-test $(CURDIR)/debian/tmp/usr/bin
- find $(CURDIR)/debian/tmp \( -name COPYING -o -name Thumbs.db \
- -o -name shifter.sh -o -name '*.xsl' -o -name '*.php' \) \
- -exec rm -f {} \;
- find $(CURDIR)/debian/tmp -name '*.js' -exec chmod -x {} \;
- find $(CURDIR)/debian/tmp/usr/share/mixxx/ -type f -exec chmod -x {} \;
-
-override_dh_gencontrol:
- dh_gencontrol -- $(SUBSTVARS)
+%:
+ dh $@ --buildsystem=cmake