commit e905eb4da81de393c1c282c08e4b2eae94115bba
Author: Uwe Klotz <uklotz(a)mixxx.org>
Date: Wed Mar 18 12:04:47 2020 +0100
Use %cmake macro and add %check section with ctest
.gitignore | 3 +-
mixxx.spec | 106 ++++++++++++++++++++-----------------------
sources | 2 +-
usb_hidapi_udev_rules0.patch | 30 ++++++------
usb_hidapi_udev_rules1.patch | 13 +++---
5 files changed, 72 insertions(+), 82 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 50f047c..91c9a9c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1 @@
-/mixxx-release-2.2.3.tar.gz
-/mixxx-e16b6a63b28eab4d3c3ce919ed661a91d7fc664d.tar.gz
+/mixxx-9c15f9eb257f4a65419d1e582f7907897bd28ed4.tar.gz
diff --git a/mixxx.spec b/mixxx.spec
index 578025b..8b3593e 100644
--- a/mixxx.spec
+++ b/mixxx.spec
@@ -2,22 +2,22 @@
%global extraver alpha
# Optional: Only used for untagged snapshot versions
-%global gitcommit e16b6a63b28eab4d3c3ce919ed661a91d7fc664d
+%global gitcommit 9c15f9eb257f4a65419d1e582f7907897bd28ed4
# Format: <yyyymmdd>
-%global gitcommitdate 20200316
+%global gitcommitdate 20200318
%if "%{?gitcommit}" == ""
-# (Pre-)Releases
-%global sources release-%{version}%{?extraver:-%{extraver}}
+ # (Pre-)Releases
+ %global sources release-%{version}%{?extraver:-%{extraver}}
%else
-# Snapshots
-%global sources %{gitcommit}
-%global snapinfo %{?gitcommit:%{?gitcommitdate}git%{?gitcommit:%(c=%{gitcommit}; echo
${c:0:7})}}
+ # Snapshots
+ %global sources %{gitcommit}
+ %global snapinfo %{?gitcommit:%{?gitcommitdate}git%{?gitcommit:%(c=%{gitcommit}; echo
${c:0:7})}}
%endif
Name: mixxx
Version: 2.3.0
-Release: 0.1%{?extraver:.%{extraver}}%{?snapinfo:.%{snapinfo}}%{?dist}
+Release: 0.2%{?extraver:.%{extraver}}%{?snapinfo:.%{snapinfo}}%{?dist}
Summary: Mixxx is open source software for DJ'ing
Group: Applications/Multimedia
License: GPLv2+
@@ -83,28 +83,21 @@ through the GUI or with external controllers including
MIDI and HID devices.
-%global debug_package %{nil}
-
-
%prep
%autosetup -p1 -n %{name}-%{sources}
echo "#pragma once" > src/build.h
-%if 0%{?extraver:1}
+%if "%{?extraver}" != ""
echo "#define BUILD_BRANCH \"%{extraver}\"" >> src/build.h
%endif
-%if 0%{?snapinfo:1}
+%if "%{?snapinfo}" != ""
echo "#define BUILD_REV \"%{snapinfo}\"" >> src/build.h
%endif
%build
-ccache -s
mkdir -p cmake_build
cd cmake_build
-cmake \
- -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
- -DCMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES=%{_includedir} \
- -DCMAKE_INSTALL_PREFIX=%{_prefix} \
+%cmake \
-DCMAKE_BUILD_TYPE=Release \
-DOPTIMIZE=portable \
-DINSTALL_GTEST=OFF \
@@ -124,47 +117,25 @@ cmake \
-DVINYLCONTROL=ON \
-DWAVPACK=ON \
..
-cmake \
- --build . \
- --target mixxx \
- %{?_smp_mflags}
+%make_build
%install
-
-# Executable
-install -Dpsm 0755 \
- -t %{buildroot}%{_bindir} \
- cmake_build/%{name}
-
-# Icon
-install -Dpm 0644 \
- -t %{buildroot}%{_datadir}/pixmaps \
- res/images/%{name}_icon.svg \
-
-# Resources
-for subdir in controllers fonts keyboard skins translations
-do
- pushd .
- cd res/$subdir
- find . \
- -type f \
- -exec install -Dpm 0644 "{}"
"%{buildroot}%{_datadir}/%{name}/$subdir/{}" \;
- popd
-done
-
-# Docs
-install -Dpm 0644 \
- -t %{buildroot}%{_docdir}/%{name} \
- README \
- README.md \
- Mixxx-Manual.pdf
+pushd .
+cd cmake_build
+%make_install
+popd
# USB HID permissions
-# Order custom rules before 70-uaccess.rules
-install -Dpm 0644 \
- res/linux/%{name}-usb-uaccess.rules \
+# - Relocate .rules file
+# - Order custom rules before 70-uaccess.rules
+install -d \
+ %{buildroot}%{_udevrulesdir}
+mv \
+ %{buildroot}%{_prefix}%{_sysconfdir}/udev/rules.d/%{name}-usb-uaccess.rules \
%{buildroot}%{_udevrulesdir}/69-%{name}-usb-uaccess.rules
+rm -rf \
+ %{buildroot}%{_prefix}%{_sysconfdir}
# Desktop launcher
desktop-file-install \
@@ -174,18 +145,31 @@ desktop-file-install \
res/linux/%{name}.desktop
# AppStream metadata
-appstream-util \
- validate-relax \
- --nonet \
- res/linux/%{name}.appdata.xml
install -Dpm 0644 \
-t %{buildroot}%{_datadir}/appdata \
res/linux/%{name}.appdata.xml
+%check
+pushd .
+cd cmake_build
+# TODO: Renable ControllerEngineTest after fixing the failures
+# See also:
https://github.com/mixxxdj/mixxx/projects/2#card-34576534
+ctest \
+ --exclude-regex ControllerEngineTest \
+ %{?_smp_mflags} \
+ --verbose
+popd
+
+appstream-util \
+ validate-relax \
+ --nonet \
+ %{buildroot}%{_datadir}/appdata/%{name}.appdata.xml
+
+
%files
%license COPYING LICENSE
-%doc Mixxx-Manual.pdf README README.md
+%doc Mixxx-Manual.pdf README
%{_bindir}/%{name}
%{_datadir}/%{name}/
%{_datadir}/applications/%{name}.desktop
@@ -195,6 +179,12 @@ install -Dpm 0644 \
%changelog
+* Wed Mar 18 2020 Uwe Klotz <uklotz(a)mixxx.org> -
2.3.0-0.2.alpha.20200318gitdf88442
+- New upstream snapshot 2.3.0-pre-alpha
+- Build debuginfo packages
+- Use cmake macros for the build
+- Verify the build results by executing ctest
+
* Tue Mar 17 2020 Uwe Klotz <uklotz(a)mixxx.org> -
2.3.0-0.1.alpha.20200316gite16b6a6
- New upstream snapshot 2.3.0-pre-alpha
- Replaced build system SCons with CMake
diff --git a/sources b/sources
index 70f64e6..817d8ec 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (mixxx-e16b6a63b28eab4d3c3ce919ed661a91d7fc664d.tar.gz) =
3c6454bbea7977272159ff9ef81b03627d9a29be7319fb5ae491b1661d71f12ce078e18a60dd0783599c0f7cdca1c83ef48ba1df1190b98cb8a924b21e42e6ab
+SHA512 (mixxx-9c15f9eb257f4a65419d1e582f7907897bd28ed4.tar.gz) =
f949f94d09dc5fb51b4aff03a9fa4d61e264c7cb97bb3716bc5b6ed33d0c55ca0a902b3d34f2c105b8e241a827c1f803b417b5df8a59de8578720f0faf761649
diff --git a/usb_hidapi_udev_rules0.patch b/usb_hidapi_udev_rules0.patch
index 1fc400c..fab9276 100644
--- a/usb_hidapi_udev_rules0.patch
+++ b/usb_hidapi_udev_rules0.patch
@@ -1,4 +1,4 @@
-From 5d1a915b655cf9060238275d8078f00c910f4f5a Mon Sep 17 00:00:00 2001
+From c9bb987664fbcb12b522cbb0827c30f2b71fa13b Mon Sep 17 00:00:00 2001
From: Uwe Klotz <uklotz(a)mixxx.org>
Date: Thu, 12 Mar 2020 11:44:29 +0100
Subject: [PATCH 1/2] Change USB HID udev rules from GROUP/MODE to TAG uaccess
@@ -11,29 +11,29 @@ Subject: [PATCH 1/2] Change USB HID udev rules from GROUP/MODE to TAG
uaccess
rename res/linux/{mixxx.usb.rules => mixxx-usb-uaccess.rules} (56%)
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index aa5fba2edf..e95b430532 100644
+index bbcd0a8628..c9c6acd325 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -879,7 +879,7 @@ install(
-
+@@ -922,7 +922,7 @@ install(
# udev rule file for USB HID and Bulk controllers
install(
-- FILES ${CMAKE_CURRENT_SOURCE_DIR}/res/linux/mixxx.usb.rules
-+ FILES ${CMAKE_CURRENT_SOURCE_DIR}/res/linux/mixxx-usb-uaccess.rules
- DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/udev/rules.d
+ FILES
+- ${CMAKE_CURRENT_SOURCE_DIR}/res/linux/mixxx.usb.rules
++ ${CMAKE_CURRENT_SOURCE_DIR}/res/linux/mixxx-usb-uaccess.rules
+ DESTINATION
+ ${CMAKE_INSTALL_SYSCONFDIR}/udev/rules.d
)
-
diff --git a/SConscript b/SConscript
index 4a8d90d1fc..0eb8785093 100644
--- a/SConscript
+++ b/SConscript
@@ -287,7 +287,7 @@ dotdesktop_files = Glob('#res/linux/mixxx.desktop')
dotappstream_files = Glob('#res/linux/mixxx.appdata.xml')
-
+
#udev rule file for USB HID and Bulk controllers
-hidudev_files = Glob('#res/linux/mixxx.usb.rules')
+hidudev_files = Glob('#res/linux/mixxx-usb-uaccess.rules')
-
+
#Icon file for menu entry
icon_files = Glob('#res/images/mixxx_icon.svg')
@@ -1009,7 +1009,7 @@ def BuildUbuntuPackage(target, source, env):
@@ -42,7 +42,7 @@ index 4a8d90d1fc..0eb8785093 100644
os.system('cp -r build/debian .')
- os.system('cp res/linux/mixxx.usb.rules ./debian/mixxx.mixxx-usb.udev')
+ os.system('cp res/linux/mixxx-usb-uaccess.rules
./debian/mixxx.mixxx-usb.udev')
-
+
scons_flags = ' '.join([
'optimize=portable',
diff --git a/res/linux/mixxx.usb.rules b/res/linux/mixxx-usb-uaccess.rules
@@ -54,7 +54,7 @@ index 7187e8a0b0..1e1a9a842a 100644
+++ b/res/linux/mixxx-usb-uaccess.rules
@@ -1,25 +1,26 @@
# This udev rule allows Mixxx to access HID and USB Bulk controllers when running as a
normal user
-
+
-# Allow write access for all users in the "users" group for USB devices from
known vendors
-# that make HID or USB bulk controllers. Note that the udev rule must match on the USB
device level;
-# matching the USB interface descriptor with bInterfaceClass does not work.
@@ -62,7 +62,7 @@ index 7187e8a0b0..1e1a9a842a 100644
+# descriptor with bInterfaceClass does not work.
+
+# Install and execute before 70-uaccess.rules, e.g.
.../udev/rules.d/69-mixxx-usb-uaccess.rules
-
+
# Native Instruments
-SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device",
ATTRS{idVendor}=="17cc", GROUP="users", MODE="0660"
+SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device",
ATTRS{idVendor}=="17cc", TAG+="uaccess"
@@ -87,9 +87,9 @@ index 7187e8a0b0..1e1a9a842a 100644
# Gemini
-SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device",
ATTRS{idVendor}=="23c7", GROUP="users", MODE="0660"
+SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device",
ATTRS{idVendor}=="23c7", TAG+="uaccess"
-
+
# Only some distribuions require the below
-KERNEL=="hiddev*", NAME="usb/%k", GROUP="users"
+KERNEL=="hiddev*", NAME="usb/%k", GROUP="uaccess"
---
+--
2.25.1
diff --git a/usb_hidapi_udev_rules1.patch b/usb_hidapi_udev_rules1.patch
index e9c49ea..86f286c 100644
--- a/usb_hidapi_udev_rules1.patch
+++ b/usb_hidapi_udev_rules1.patch
@@ -1,4 +1,4 @@
-From 9f01191fa5d61e993301f9e1d56bddee20460dd9 Mon Sep 17 00:00:00 2001
+From df88442557004d2afea0e8d6263f7e91057a471d Mon Sep 17 00:00:00 2001
From: Uwe Klotz <uklotz(a)mixxx.org>
Date: Thu, 12 Mar 2020 12:00:12 +0100
Subject: [PATCH 2/2] Extend, update, and sort list of USB vendor ids
@@ -13,7 +13,7 @@ index 1e1a9a842a..0f8a67809b 100644
+++ b/res/linux/mixxx-usb-uaccess.rules
@@ -1,26 +1,50 @@
# This udev rule allows Mixxx to access HID and USB Bulk controllers when running as a
normal user
-
+
+# Sources:
+#
http://www.linux-usb.org/usb.ids
+#
https://www.the-sz.com/products/usbid/
@@ -21,9 +21,9 @@ index 1e1a9a842a..0f8a67809b 100644
+
# Note that the udev rule must match on the USB device level; matching the USB
interface
# descriptor with bInterfaceClass does not work.
-
+
# Install and execute before 70-uaccess.rules, e.g.
.../udev/rules.d/69-mixxx-usb-uaccess.rules
-
+
-# Native Instruments
-SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device",
ATTRS{idVendor}=="17cc", TAG+="uaccess"
-# Hercules
@@ -71,8 +71,9 @@ index 1e1a9a842a..0f8a67809b 100644
+
+# Missing:
+# - American Musical Supply (AMS/Mixars)
-
+
# Only some distribuions require the below
KERNEL=="hiddev*", NAME="usb/%k", GROUP="uaccess"
---
+--
2.25.1
+