diff options
author | Daniel Schürmann <daschuer@mixxx.org> | 2020-12-09 01:57:43 +0100 |
---|---|---|
committer | Daniel Schürmann <daschuer@mixxx.org> | 2020-12-09 23:20:12 +0100 |
commit | 6f92dbffd2cf8c4ec4a08f5117b53864814304ce (patch) | |
tree | 068cbdee13456b99525aa3ad3056e7e7dec52142 /packaging | |
parent | 67ebbe0ddb632432747887f4b809acffc25961b5 (diff) |
Added CPack files for uploading PPA packages
Diffstat (limited to 'packaging')
-rw-r--r-- | packaging/CPackConfig.cmake | 16 | ||||
-rw-r--r-- | packaging/CPackDebUploadPPA.cmake | 62 | ||||
-rw-r--r-- | packaging/CPackPackageDescription.txt | 7 | ||||
-rw-r--r-- | packaging/debian/control.in (renamed from packaging/debian/control) | 60 | ||||
-rwxr-xr-x | packaging/debian/rules | 63 |
5 files changed, 98 insertions, 110 deletions
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 |